Statistics7 min read

Monte Carlo Simulation: Stress-Testing Your Strategy

Your backtest shows 200% return. Looks great. But what if those trades had happened in a different order? Would you have survived the drawdown, or would a margin call have wiped you out first? Monte Carlo simulation answers that question.

What Monte Carlo Does

Standard backtesting runs trades in the exact order they occurred historically. That's one possible outcome — but it's not the only one. The same trades in a different sequence produces a completely different equity curve.

Monte Carlo simulation shuffles the trade order hundreds of times and rebuilds the equity curve for each permutation. Instead of one result, you get a distribution of possible outcomes. This reveals whether your strategy is robust or just got lucky with trade timing.

Why Trade Order Matters

Imagine a strategy with 100 trades: 60 winners and 40 losers. If the first 15 trades are all losers, your equity drops 15% before a single win. Can you stomach that? Would your broker's margin call kick in? Would you manually close the strategy?

Now imagine the same 100 trades but the losers are spread evenly throughout. The equity curve is smooth. Same trades, same total P/L — but completely different psychological experience and risk profile.

Monte Carlo tests both scenarios — and 498 more — to tell you how likely each outcome is.

Survival Probability

The key output is survival probability — the percentage of simulations where the equity curve never breaches a maximum drawdown threshold.

95% survival — only 5 out of 100 random orderings would have hit your max drawdown. The strategy is robust to sequencing risk.
60% survival — 40 out of 100 random orderings would have blown past your max drawdown. The strategy's profitability depends heavily on lucky trade ordering.

Real-World Example

Strategy X

Return: 200%

MC Survival: 60%

High return, high risk — 4 in 10 simulated orderings hit max drawdown.

Strategy Y

Return: 150%

MC Survival: 95%

Lower return, but only 5 in 100 orderings fail. Far more reliable.

Strategy Y is the better choice for most traders. The 50% extra return on Strategy X comes with dramatically higher risk of blowout.

How TradeTestr Uses Monte Carlo

The Strategy Lab runs 500 Monte Carlo simulations per backtest. Each setup in the leaderboard shows:

  • Median P/L — the middle outcome across all 500 simulations
  • 5th and 95th percentile — the range where 90% of outcomes fall
  • Survival rate — percentage of simulations that don't breach max drawdown
  • Median max drawdown — the typical worst-case dip

These stats feed into the composite score that ranks setups on the leaderboard. A setup with high return but low survival gets penalised.

The Takeaway

Raw backtest numbers tell you what did happen. Monte Carlo tells you what could happen. Use both.

Browse the Strategy Lab to see which setups survived 500 simulations — not just one lucky sequence.

Related Articles

→ What Is Backtesting?→ The Honest Truth About Backtesting→ Position Sizing in CFD Trading

← Back to Blog · Strategy Lab → · Open Backtester →