Monte Carlo Simulation for Backtests
How to estimate the range of possible outcomes when your backtest is just one scenario.
Your backtest shows one specific historical path. But that path was just one of infinite possible sequences the trades could have occurred in. Monte Carlo simulation randomizes the order and helps you understand the range of possible outcomes — including the worst-case scenarios you didn't experience but easily could have.
The basic technique: take your backtest's list of trade results, shuffle them into thousands of different random orders, and compute the equity curve for each. Now you have thousands of possible histories instead of one. Look at the 5th and 95th percentile outcomes — that's the realistic range of what could have happened.
The most useful output is drawdown distribution. Your original backtest might have shown a maximum drawdown of 15%. But the Monte Carlo simulation might reveal that 20% of possible trade orderings would have produced a 30%+ drawdown. That's the drawdown you need to be prepared to sit through emotionally and financially.
A more advanced version resamples with replacement — this simulates having a longer or shorter track record than you actually have. It also handles strategies where the sequence of trades isn't independent (e.g., a strategy that closes losers and lets winners run has correlated results, so simple shuffling overestimates independence).
Monte Carlo won't save an overfit strategy — if your trades are all in-sample lucky trades, no amount of reordering fixes that. But for a validated strategy, it gives you a much more honest sense of the risk you're actually taking. Use it before committing real money.
See these concepts in action
Watch our YouTube channel for real backtests applying these principles.
Subscribe on YouTubeMore Guides
What is Backtesting?
Learn the fundamentals of backtesting trading strategies using historical data.
⚠️IntermediateAvoiding Overfitting in Backtests
The biggest trap in backtesting and how to avoid curve-fitting your strategies.
📐BeginnerKey Backtest Metrics Explained
Understanding Sharpe ratio, max drawdown, win rate, and other essential metrics.