monte-carlo

Run Monte Carlo simulations against a saved backtest using the Udgaard API.

Updated Jun 10, 2025
One-click install
npx skills add https://github.com/skrymer/trading --skill monte-carlo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: monte-carlo
Source: https://github.com/skrymer/trading/tree/main/.claude/skills/monte-carlo
Command: npx skills add https://github.com/skrymer/trading --skill monte-carlo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Monte Carlo validation helps quantify path risk and edge confidence for a backtested strategy by running multiple randomizations and resampling against the Udgaard API, returning interpretable metrics for live-sizing decisions.

Core Features & Use Cases

  • Orchestrates Monte Carlo simulations against a saved backtest using the Udgaard API, supporting TRADE_SHUFFLING and BOOTSTRAP_RESAMPLING techniques.
  • Delegates interpretation to an analyst agent (monte-carlo-analyst) to generate final risk and sizing recommendations.
  • Requires a recent backtestId stored in memory; results are compared to the original backtest metrics to assess edge stability.
  • Useful for sizing and risk assessment before live deployment.

Quick Start

Run a backtest to obtain a backtestId, then invoke the Monte Carlo simulate API with a selected technique and that backtestId to generate a risk-analysis report.

Frequently Asked Questions about monte-carlo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I quantify backtest risk using Monte Carlo simulation?

Monte Carlo simulation quantifies backtest risk by running multiple randomizations and resampling against the Udgaard API, returning interpretable metrics for probabilistic sizing and edge confidence before live deployment.

What is the difference between trade shuffling and bootstrap resampling for backtest validation?

Trade shuffling randomizes the sequence of historical trades to test path dependency, while bootstrap resampling generates new random samples from the original trade distribution to assess the statistical reliability of your strategy edge.

How do I run a Monte Carlo analysis on a saved backtest?

To run Monte Carlo analysis, you need a recent backtestId stored in memory. You invoke the Monte Carlo simulate API with a selected resampling technique and that backtestId to generate a risk-and-sizing report.

Can I use Monte Carlo simulation for position sizing and risk assessment before live trading?

Yes, Monte Carlo simulation is specifically useful for sizing and risk assessment before live deployment. It compares randomized results against original backtest metrics to evaluate edge stability and generate probabilistic sizing recommendations.

Do I need an existing backtestId to perform statistical analysis on my trading strategy?

Yes, you must run a backtest to obtain a valid backtestId stored in memory before invoking Monte Carlo simulation. This identifier anchors the randomization and resampling processes against your specific historical trading data.