Appearance
Monte Carlo
A backtest only shows you one historical path. Monte Carlo reshuffling asks: "How would this strategy have performed if the same daily returns had occurred in a different order?"
By randomly reshuffling the sequence of your strategy's daily returns thousands of times, MarketHeist builds a probability distribution of outcomes — including how bad things could have gotten and how likely the observed result was.
How it works
After running a backtest, click Monte Carlo in the analysis panel. MarketHeist:
- Takes the strategy's actual daily return series (e.g., 3,000 daily returns).
- Creates N simulated paths (default: 1,000) by randomly reshuffling the return sequence each time.
- Computes the final portfolio value and maximum drawdown for each shuffled path.
- Displays the distribution of outcomes as a histogram and percentile bands on the equity curve.
INFO
Monte Carlo reshuffling preserves the distribution of daily returns exactly — the same set of numbers, reordered. This means it captures sequence-of-returns risk without making assumptions about the underlying return distribution. It does not model correlation with external factors or regime changes.
Reading the return distribution
The histogram shows the distribution of terminal wealth across all simulated paths. Look for:
- Median terminal value: The 50th percentile outcome — your "typical" expected result if the same returns recur in a different order.
- 5th percentile: The bad-case outcome. 95% of paths do better than this; 5% do worse.
- 95th percentile: The good-case outcome.
A narrow distribution (5th and 95th percentiles close together) means the strategy's final result is relatively stable regardless of the ordering of returns — the path doesn't matter much, the returns themselves drive performance.
A wide distribution means the strategy is highly sensitive to when the gains and losses occur — sequence-of-returns risk is high.
Probability of ruin
Probability of ruin is the fraction of Monte Carlo paths that fall below a specified drawdown threshold (e.g., -50%) at any point during the simulation. This is distinct from final terminal value — it captures the risk of hitting an unacceptable loss at some point along the way, even if the strategy eventually recovers.
| Probability of Ruin | Interpretation |
|---|---|
| < 1% | Very low risk of catastrophic drawdown |
| 1–5% | Manageable — acceptable for many risk tolerances |
| 5–15% | Elevated — consider reducing position size or adding risk controls |
| > 15% | High — the strategy has a meaningful probability of severe loss |
TIP
Probability of ruin is most useful when you're deciding on position sizing or maximum leverage. A strategy with 2% probability of -50% ruin at 1× leverage may have 15% probability of ruin at 2× leverage — Monte Carlo helps quantify this scaling.
What Monte Carlo does and does not tell you
It does tell you:
- The range of outcomes that could have resulted from the same set of return days in different sequences
- Whether the observed backtest result was an outlier or a typical result for this strategy's return stream
- Sequence-of-returns risk — how sensitive outcomes are to the timing of wins and losses
It does not tell you:
- Whether the strategy will perform similarly in the future (that requires walk-forward validation)
- How the strategy performs in regimes not represented in the backtest history
- Whether parameters are overfit (that requires parameter sweep and walk-forward)
Combining with other validation tools
Monte Carlo is most useful as a final stress-test after you've already validated robustness through parameter sweep and walk-forward:
- Parameter Sweep → confirms parameters are in a stable plateau, not a lucky spike
- Walk-Forward Optimization → confirms performance holds on unseen data
- Monte Carlo → quantifies the probability range of outcomes and catastrophic-loss risk
Next steps
- Walk-Forward Optimization — out-of-sample validation
- Metrics Glossary — formal definitions of all statistics