Monte Carlo Simulation in Trading: Why Your Backtest Is Lying to You
Learn how Monte Carlo simulation exposes fragile trading strategies that look profitable in backtests but fail in live trading. Step-by-step guide with examples.
Your strategy backtested at +200% over 6 months. You're ready to go live with real money. But there's a problem: that backtest might be worthless.
Here's why, and how Monte Carlo simulation reveals the truth.
The Problem with Regular Backtests
A standard backtest runs your strategy against historical data in the exact order events occurred. It produces one result: "the strategy made X% with Y% drawdown."
But this single result is misleading because:
What Monte Carlo Simulation Does
Monte Carlo simulation takes your backtest trades and randomizes the order thousands of times. Each randomization produces a different equity curve with different drawdowns and returns.
The process:Example: Same Strategy, Different Stories
Consider a strategy with 100 trades: 55 winners (avg +2%) and 45 losers (avg -1.5%).
Original backtest order:The strategy is still profitable, but the real risk is 2-3x higher than the backtest suggested.
How to Interpret Monte Carlo Results
Confidence Interval
Look at the range of outcomes, not just the average:| Percentile | Meaning |
|---|---|
| 5th percentile return | "Bad luck" scenario — still expect this to happen |
| 50th percentile (median) | Typical outcome |
| 95th percentile return | "Good luck" scenario — don't plan on this |
| 95th percentile drawdown | Plan your risk management for this level |
Red Flags
Your strategy might be fragile if:Green Flags
A robust strategy shows:How to Run Monte Carlo on Your Strategy
Method 1: Trading Copilot (Easiest)
Trading Copilot's Strategy Workshop includes Monte Carlo simulation built into the backtester:Pro tier includes automatic parameter optimization that accounts for Monte Carlo robustness.
Method 2: Python (DIY)
import numpy as np
def monte_carlo(trades, simulations=1000, initial_capital=10000):
results = []
for _ in range(simulations):
shuffled = np.random.permutation(trades)
equity = [initial_capital]
for trade_return in shuffled:
equity.append(equity[-1] * (1 + trade_return))
results.append({
'final': equity[-1],
'max_dd': max_drawdown(equity),
'return_pct': (equity[-1] / initial_capital - 1) * 100
})
return results
Method 3: TradingView + Spreadsheet
Export your TradingView backtest trades to CSV, then run Monte Carlo in Google Sheets or Excel using random shuffling.
Advanced Monte Carlo Techniques
Walk-Forward Analysis
Instead of shuffling trade order, split data into training/testing periods. Optimize on training data, test on unseen data. More realistic than simple shuffling.Regime-Aware Simulation
Group trades by market regime (trending/ranging/volatile) and shuffle within groups. Preserves the correlation between market conditions and strategy performance.Drawdown-Based Sizing
Use Monte Carlo results to determine position sizing: if 95th percentile drawdown is 25%, and your max tolerance is 15%, reduce position size by 40%.FAQ
How many simulations should I run?
At minimum 1,000. For publication-quality results, 10,000. Beyond 10,000, the improvement in accuracy is negligible. Trading Copilot runs 1,000 by default.
Can Monte Carlo simulation predict future returns?
No. It estimates the range of possible outcomes given your strategy's historical trades. It's a risk assessment tool, not a crystal ball.
Does this work for crypto specifically?
Yes, and it's arguably more important for crypto because of higher volatility. A strategy that looks stable in backtests can have terrifying drawdowns when trade order changes — Monte Carlo reveals this.
What if my Monte Carlo results look bad?
Either improve the strategy (better entries, tighter risk management) or reduce position sizing. A strategy with a 30% probability of -40% drawdown isn't necessarily bad — you just need to size it small enough that -40% is survivable.
Test your strategy's robustness: Run Monte Carlo on Trading Copilot — free backtesting with 1,000-simulation Monte Carlo included.
Try Trading Copilot
AI-powered market analysis with 15+ real indicators. 3 free uses/day, no credit card required.