NexusFi: Find Your Edge


Home Menu

 



Monte Carlo Simulation for Trading Strategies: Stress-Testing Your Edge Before You Risk Capital

Overview #

You ran your backtest. The equity curve slopes upward. The profit factor is 1.8. You're ready to go live.

But here's the question nobody asks: what if those same trades happened in a different order? What if your three biggest winners clustered at the end instead of saving you from an early drawdown? What if that drawdown hit first and wiped your account before the winners arrived?

That's the question Monte Carlo simulation answers. It takes your backtest results, scrambles the trade order thousands of times, and shows you the full range of equity paths your strategy could have produced

What Monte Carlo Simulation Does #

The core mechanic is simple. Take your backtest's list of trades. Randomly reorder them. Build a new equity curve from that reordered sequence. Repeat thousands of times.

As @kevinkdog explains, "You run a backtest, and you get a sequence of trades, and from that you build an equity curve. From that equity curve, you know your return, your max drawdown, etc. But, what if you had the same trades, but just in a different order? That is what Monte Carlo simulation does. It takes your trades, and scrambles them up, giving you many different equity curves." [1]

The theory behind this: going forward, the exact sequence of winning and losing trades is unknowable. Any permutation of your historical trades is a plausible future scenario. By generating thousands of these permutations, you build a probability distribution of outcomes

Most implementations (including NinjaTrader's built-in tool) use bootstrapping

Run 1,000 or 2,500 simulations and you get a statistically meaningful picture of what your strategy's future performance distribution looks like

Monte Carlo equity curve fan showing 200 simulated paths
200 Monte Carlo equity paths from the same set of trades in randomized order.

Reading the Output #

Monte Carlo output is a Cumulative Distribution Function (CDF)

“The 50% mark on the x-axis is the mean cumulative profit. The 10-percentile had a cumulative profit of 6%. This means that, the return is 6% for the worst 10% of the Monte Carlo simulations. The 90-percentile mark says that for the best 10% of the Monte Carlo simulations, the cumulative profit is 15%.”

[3]

The key percentiles that matter:

5th percentile

25th percentile

50th percentile (median)

75th-95th percentile

The drawdown CDF is equally important. @serac uses it as a kill switch: "If I was fairly confident on the accuracy of my backtest, and experienced a drawdown way to the left of this curve, I would consider halting the strategy." [3] In practice, if your live drawdown exceeds the 5th percentile drawdown from Monte Carlo, your strategy has likely broken

CDF curve showing cumulative profit distribution with percentile markers
Cumulative Distribution Function of Monte Carlo outcomes with key percentile markers.

Five Practical Applications #

1. Curve Fitting Detection #

This is Monte Carlo's most powerful use. A curve-fitted strategy relies on a few large winning trades that happened at specific moments in history. When you scramble the trade order, those key trades get distributed differently

“If your strategy is curve-fitted, it is likely that it will not pass the Monte-Carlo-Simulation very well, as some of the N equity curves will not include the (probably few large) trades that the strategy has been fitted to.”

[2]

A strong strategy shows a tight CDF

2. Capital Requirements #

How much starting capital do you actually need? Your backtest might show a $5,000 drawdown, but that's ONE possible sequence. Monte Carlo shows you the distribution of possible drawdowns.

“If I start with $10,000, what are the chances that I'll get wiped out trading this strategy? How much capital do I need to safely trade this strategy?”

[1]

Use the 5th percentile maximum drawdown as your planning number. Multiply by 1.5x for a safety margin (live trading always produces worse drawdowns than simulated). That's your minimum account size. If you can't fund that amount, you can't trade that strategy

3. Risk of Ruin Estimation #

@Fat Tails demonstrates this application: select k trades from your sample, repeat N times, and read the probability of reaching a target or hitting ruin directly from the CDF chart. [4] This replaces simplified risk-of-ruin formulas (which assume Bernoulli distributions with fixed win/loss sizes) with a more realistic estimate that uses your actual trade distribution

4. Position Sizing Evaluation #

Monte Carlo lets you compare position sizing approaches head-to-head. @kevinkdog demonstrates this by comparing a fixed 1-contract approach against a modified martingale using 2,500 Monte Carlo simulations: the martingale approach showed higher median final equity ($180 vs $150) but much larger drawdowns. [5] The CDF makes the tradeoff explicit

5. Robustness Margin Testing #

This is the most underappreciated Monte Carlo technique. Remove your best trades before running the simulation and see what happens.

“I have thrown out the best 35% of the trades. This brought the 50% to about breakeven of 0% return. This means that I could miss 35% of my best winning trades, and break even.”

[3] That 35% is your robustness margin. A strategy where removing the top 5% of trades kills profitability is fragile

“You MUST do Monte Carlo simulations. This is the most under utilized tool and prob the most important thing NT has for testing. ALWAYS remove at least 5-10% of your best and worse trades. If that probability curve is out of whack, go back to the drawing board.”

[6]

Robustness margin chart showing median equity as top trades are removed
Robustness margin test.

When Monte Carlo Fails #

Monte Carlo simulation has a critical assumption that limits its applicability: trade independence.

The math only works when each trade's outcome is independent of the trade before it. @Fat Tails flags the key exception: "If your trades are positively or negatively correlated

Strategies where Monte Carlo is unreliable:

  • Pyramiding / scaling in: Each add depends on the prior entry being profitable. Scrambling the trades destroys the dependency structure.
  • Mean reversion grids: Entries at multiple levels depend on price reaching each level sequentially. Reordering breaks the logic.
  • Strategies with strong serial correlation: If winning trades cluster (momentum following) or alternate (mean reversion with fixed intervals), the order matters and shouldn't be randomized.
  • Portfolio strategies: When multiple instruments hedge each other, randomizing individual trades breaks the correlation structure that produces the hedged return.

Beyond trade independence, Monte Carlo also can't model:

Regime changes: It assumes the distribution of trade outcomes is stable. A strategy that worked in low-vol 2019 and broke in high-vol 2020 will show a mixed distribution

Market impact: The simulation uses your historical fills. In reality, scaling up position size degrades fills. A strategy that works at 1 contract might fail at 10

Correlation with market conditions: Trade outcomes aren't truly random. They cluster around market events, economic releases, and volatility regimes. Monte Carlo treats them as independent draws from a static urn.

Running a Monte Carlo Analysis #

Step-by-Step Process #

  1. Get your trade list: Export all trades from your backtest
  1. Choose your simulation count: 1,000 simulations is the minimum for reasonable statistics. 2,500 gives smoother CDFs. More than 10,000 adds computation time without meaningful precision gain.
  1. Run the base simulation: Resample all trades with replacement, build equity curves. Record final equity, max drawdown, longest losing streak, and profit factor for each simulation.
  1. Run the robustness test: Remove the top 5% of trades by P&L. Re-run the full Monte Carlo. Then remove 10%. Then 15%. Find your break-even point
  1. Read the CDFs: Check the 5th percentile for worst-case planning, 50th for expected outcome, drawdown CDF for position sizing.
  1. Set kill-switch thresholds: If live drawdown exceeds the 5th percentile Monte Carlo drawdown, halt the strategy. If live win rate drops below the 10th percentile simulated win rate over 50+ trades, re-evaluate.

Minimum Viability Thresholds #

A strategy worth deploying capital to should meet ALL of these Monte Carlo criteria:

  • 5th percentile cumulative profit is positive (95% chance of making money)
  • Median max drawdown is survivable at your planned position size
  • Strategy remains profitable after removing top 10% of trades
  • Win rate at 25th percentile still exceeds breakeven (accounting for average win/loss ratio)

Fail any one of these and you either have insufficient edge or insufficient robustness.

Further Reading #

Prerequisites

Further Exploration:

Citations

  1. @kevinkdogKJ Trading Systems Kevin Davey - Ask Me Anything (AMA) (2017) 👍 2
    “That is what Monte Carlo simulation does. It takes your trades, and scrambles them up, giving you many different equity curves.”
  2. @Fat TailsNinja Trader Monte Carlo (2011) 👍 7
    “If your strategy is curve-fitted, it is likely that it will not pass the Monte-Carlo-Simulation very well.”
  3. @seracWalk Forward Experiment (2012) 👍 10
    “The 50% mark on the x-axis is the mean cumulative profit.”
  4. @Fat TailsRisk of Ruin (2012) 👍 7
    “A better approach to determine the probability of reaching a fraction/multiple of your initial bankroll is a Monte Carlo Analysis.”
  5. @kevinkdogPosition sizing strategy for scalping (2023) 👍 3
    “Running some Monte Carlo (random number) simulations.”
  6. @traderlangeTip for backtesting on Renko charts (2014) 👍 7
    “You MUST do Monte Carlo simulations. This is the most under utilized tool.”

Help Improve This Article

NexusFi Elite Members can help keep Academy articles accurate and comprehensive.

Unlock the Full NexusFi Academy

746 in-depth articles across 17 categories — written by traders, backed by community research. Includes knowledge maps, citations with community excerpts, and the ability to help improve articles.

We add approximately 312 new Academy articles every month and update approximately 607 with fresh content to keep them highly relevant.

Strategies (80)
  • Volume Profile Trading
  • Order Flow Analysis
  • plus 78 more
Market Structure (41)
  • Initial Balance: The First Hour That Defines Your Entire Trading Day
  • Opening Range: Why the First 15 Minutes Define Your Entire Trading Session
  • plus 39 more
Concepts (42)
  • Futures Order Types: Market, Limit, Stop, and Conditional Orders
  • Renko Charts and Range Bars for Futures Trading: The Complete Guide
  • plus 40 more
Exchanges (40)
  • Futures Exchanges: Understanding Where and How Futures Trade
  • plus 38 more
Indicators (49)
  • Delta Analysis & Cumulative Volume Delta (CVD)
  • Market Internals: Reading the Broad Market to Trade Index Futures
  • plus 47 more
Risk Management (40)
  • Risk Management for Futures Trading
  • Position Sizing Methods for Futures Trading
  • plus 38 more
+ 11 More Categories
746 articles total across 17 categories
Automation (40) • Instruments (41) • Data (40) • Prop Firms (40) • Platforms (53) • Psychology (40) • Brokers (40) • Prediction Markets (40) • Regulation (40) • Cryptocurrency (40) • Infrastructure (40)
Become an Elite Member


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top