·5 min read·Trading Copilot

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.

monte-carlobacktestingtrading-strategyrisk-managementquantitativecrypto-trading

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:

  • Trade order matters. The same trades in a different order can produce wildly different drawdowns
  • You got lucky with sequence. Maybe the biggest winners happened to come early, building a cushion
  • Overfitting is invisible. A strategy tuned to historical data often fails on new data
  • 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:
  • Take all trades from your backtest (e.g., 200 trades)
  • Randomly shuffle the order
  • Calculate the equity curve for this shuffled sequence
  • Repeat 1,000+ times
  • Analyze the distribution of outcomes
  • What you get:
  • Median return — The "typical" outcome, not the lucky one
  • Worst-case drawdown — The maximum drawdown across all simulations
  • 95th percentile drawdown — The drawdown you should plan for
  • Probability of ruin — Chance of account hitting your pain threshold
  • Example: Same Strategy, Different Stories

    Consider a strategy with 100 trades: 55 winners (avg +2%) and 45 losers (avg -1.5%).

    Original backtest order:
  • • Return: +45%
  • • Max drawdown: -12%
  • • Looks great! ✅
  • Monte Carlo (1000 simulations):
  • • Median return: +38%
  • • 95th percentile drawdown: -28%
  • • Worst-case drawdown: -41%
  • • Probability of >30% drawdown: 8%
  • 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:
    PercentileMeaning
    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 drawdownPlan your risk management for this level

    Red Flags

    Your strategy might be fragile if:
  • Median return is much lower than backtest return (sequence dependent)
  • 95th percentile drawdown exceeds your tolerance (you'll quit)
  • Probability of ruin > 5% (unacceptable risk)
  • Wide spread between best and worst outcomes (inconsistent)
  • Green Flags

    A robust strategy shows:
  • Median close to backtest (not sequence dependent)
  • Tight distribution (consistent outcomes)
  • Low probability of ruin (<1%)
  • Acceptable worst-case drawdown (can survive psychologically)
  • 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:
  • Select a strategy template (EMA crossover, RSI reversal, etc.)
  • Set parameters and run backtest
  • Click "Monte Carlo" — runs 1,000 simulations automatically
  • View distribution of returns and drawdowns
  • 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.