Quantify your true risk. Calculate probability of ruin, understand worst-case scenarios, and trade with confidence knowing the full range of possible outcomes.
Monte Carlo simulation is a statistical method that reveals the true risk profile of your trading strategy by showing you thousands of possible outcomes instead of just one.
Here's the problem: When you backtest a strategy, you see one specific sequence of trades that happened to occur in historical data. But what if those trades had happened in a different order? What if your first 20 trades had all been losers instead of winners? Your account might have been wiped out before you could profit.
Monte Carlo simulation solves this by randomly shuffling your historical trades thousands of times, creating thousands of alternative "what if" scenarios. Each simulation shows a different possible equity curve - some better, some worse than your backtest.
The result? You get a probability distribution that shows your best case, worst case, and most likely outcomes. You can calculate critical risk metrics like probability of ruin (chance your account hits zero), value at risk (maximum expected loss), and confidence intervals (range where your returns will likely fall).
See the probability of catastrophic losing streaks that didn't happen in your backtest but could occur in live trading. Understand worst-case scenarios.
Calculate the exact probability your account will hit zero. Professional traders use this to ensure less than 1-5% ruin probability.
See the full range of possible returns, not just one outcome. Understand median vs mean returns and tail risk.
Know with 95% confidence that your returns will fall within a specific range. Set realistic expectations and avoid nasty surprises.
The Monte Carlo process transforms your single backtest into thousands of possible scenarios:
Run a backtest and gather all your trades (win/loss, return %, duration). You need at least 30-50 trades for meaningful Monte Carlo analysis, preferably 100+.
Randomly shuffle the order of trades. If your backtest had 100 trades, create a new random sequence of those same 100 trades. Each shuffle represents an alternative "universe" where the same trades happened but in a different order.
Apply the randomized trades to your starting capital to generate an equity curve. Track the account balance after each trade, including any drawdowns that might trigger ruin.
Run steps 2-3 for 1,000-10,000 iterations. Each iteration produces one possible outcome. Aggregate all outcomes to create a probability distribution.
Analyze the distribution to calculate: probability of ruin (% hitting zero), value at risk (5th percentile loss), confidence intervals (range where 95% of outcomes fall), median return, maximum drawdown distribution.
| Aspect | Traditional Backtest | Monte Carlo Simulation |
|---|---|---|
| Outcomes Shown | One result (what happened) | Thousands of results (what could happen) |
| Risk Visibility | Hidden (lucky/unlucky sequences) | Revealed (all possible sequences) |
| Probability of Ruin | Unknown | Calculated precisely |
| Confidence Intervals | Not available | 95%, 99% ranges shown |
| Worst Case | One possible worst drawdown | True worst-case distribution |
| Trade Sequence | Historical order only | All possible orders tested |
| Best For | Strategy validation | Risk quantification |
Use your actual intended trading capital. Monte Carlo results are capital-dependent. A strategy with 5% ruin risk at $10,000 capital might have 25% ruin risk at $5,000 capital.
Tip: Run multiple simulations with different capital amounts to find the minimum safe capital for your strategy.
Common confidence intervals to calculate:
| Metric | Good | Red Flag |
|---|---|---|
| Iterations | 5K-10K runs | <1K (noisy tails) |
| Probability of ruin | <1-2% | >5% |
| Max DD (95th pct) | Within risk budget (e.g., <25%) | Exceeds risk budget or >35% |
| Return distribution | Median close to backtest; tails understood | Huge gap between median and best/worst with no plan |
| Streak risk | Worst losing streak manageable with sizing rules | Streak wipes >30% before circuit breaker |
Excellent risk profile. Less than 1 in 100 chance of hitting your ruin threshold. Professional-grade safety. Strategy is suitable for live trading with proper risk management.
Example: Out of 10,000 simulations, fewer than 100 resulted in account ruin.
Acceptable risk for experienced traders. Some risk exists but manageable with proper position sizing and discipline. Monitor drawdowns carefully.
Example: Out of 10,000 simulations, 100-500 resulted in ruin. Consider reducing position size by 30-50%.
High risk. Not recommended for live trading. More than 1 in 20 chance of significant losses. Reduce position size dramatically, increase capital, or improve strategy before trading.
Example: Out of 10,000 simulations, more than 500 resulted in ruin. Red flag for strategy viability.
The backtest looked great (+85% return, 1.8 Sharpe), but Monte Carlo revealed a 12% probability of ruin - unacceptably high for live trading. In 1,200 out of 10,000 simulations, the account was wiped out despite using the exact same trades.
The problem: The backtest got "lucky" with trade sequence. Wins came early, providing cushion for later losses. In 12% of random sequences, losses clustered early, causing ruin before the winning trades could occur.
Reduced position size from 10% per trade to 4% per trade and increased starting capital to $15,000. Ran Monte Carlo again:
Strategy now has professional-grade risk profile suitable for live trading.
Use at least 5,000 iterations for reliable statistics. Don't make trading decisions based on 100 or 500 simulations - the distribution won't be smooth enough and tail risks will be underestimated.
Simulate with the exact capital you'll trade with. Risk metrics are capital-dependent. A strategy safe at $20K might be dangerous at $10K. Test multiple capital levels to find your minimum safe amount.
Professional traders keep ruin probability below 1-5%. If your simulation shows >5%, reduce position size by 30-50% and re-run. Don't trade strategies with double-digit ruin probabilities.
Run Monte Carlo on your walk-forward test results for ultimate validation. This shows risk assuming the strategy maintains its edge on unseen data. Most robust validation possible.
The median (50th percentile) return is more realistic than the mean, which can be inflated by rare outlier wins. Plan your trading around median outcomes, not best-case scenarios.
Pay attention to the 5th and 95th percentiles. The worst 5% of outcomes show your tail risk. Ask: "Can I survive these worst-case scenarios?" If not, adjust position sizing.
Running only 100-500 simulations produces jagged distributions and underestimates tail risks. You might miss rare but catastrophic scenarios. Always use 5,000+ iterations for trading decisions. Computing is cheap; blown accounts are expensive.
Monte Carlo needs at least 30-50 trades to be meaningful. With only 10-15 trades, the randomization doesn't have enough data points to create diverse scenarios. Either extend your backtest period or acknowledge limited statistical confidence.
Traders focus on median returns and ignore ruin probability. A strategy with +80% median return but 15% ruin probability is a ticking time bomb. Your first live trading attempt might hit that 15% scenario. Always prioritize survivability over returns.
95% confidence interval of [+10% to +90%] doesn't mean you'll definitely profit. It means there's still 5% chance of outcomes outside this range - including complete losses. The confidence interval shows where most outcomes fall, not guaranteed results.
Testing with $100K when you'll trade with $10K gives false confidence. Risk metrics scale with capital. A strategy with 2% ruin risk at $100K might have 30% ruin risk at $10K. Always simulate with your actual trading capital.
Monte Carlo simulation is a statistical technique that randomly reorders your historical trades thousands of times to show the range of possible outcomes. Instead of seeing one backtest result, you see hundreds or thousands of "what if" scenarios, revealing the true risk and probability distribution of your strategy. It answers: "What if my winning trades had come later instead of earlier?"
Run at least 1,000 iterations for basic analysis, 5,000 for reliable statistics, and 10,000+ for critical trading decisions. More iterations provide smoother probability distributions and more accurate tail risk estimates, especially for calculating probability of ruin and extreme drawdowns. Think of it like polling: 100 people gives rough ideas, 1,000 gives solid data, 10,000 gives precision.
Probability of ruin is the likelihood your account will hit zero (or a specified threshold) over your trading period. For example, a 5% probability of ruin means in 5 out of 100 possible trade sequences, your account would be wiped out. Professional traders typically target less than 1-5% probability of ruin. It's the single most important risk metric.
Value at Risk (VaR) tells you the maximum loss you can expect at a given confidence level. For example, 95% VaR of -$5,000 means there's only a 5% chance you'll lose more than $5,000. It's a key metric for understanding tail risk and worst-case scenarios. Banks and hedge funds use VaR extensively for risk management.
Monte Carlo simulation complements backtesting rather than replacing it. Backtesting shows what happened with your strategy in historical data. Monte Carlo shows what could happen by randomizing trade sequences, revealing hidden risks like the possibility of catastrophic losing streaks that might not have occurred in your backtest. Use both together for complete validation.
Monte Carlo simulation doesn't prevent losses, but it reveals risks before they occur. By understanding probability of ruin, maximum drawdowns, and confidence intervals, you can adjust position sizing, set realistic expectations, and avoid strategies with unacceptable risk profiles before risking real capital. It's like crash-testing your strategy in thousands of simulations before going live.