Help Center · Monte Carlo Analysis

Monte Carlo analysis, explained simply.

A guide for anyone who has run a backtest and wants to know: "How bad could this strategy get, even if the historical numbers look good?"

Topic 1

What is Monte Carlo analysis?

It takes the trades a strategy actually made in the past, and simulates thousands of alternate orders in which those same trades could have occurred.

Imagine you flipped a coin 50 times and got 30 heads and 20 tails. If you flipped 50 different coins tomorrow, would you get the same 30–20 split? Probably not. You might get 25–25, or 33–17. Monte Carlo analysis answers the question: how much can the result vary if the same underlying odds played out in a different order?

For a trading strategy, it does the same thing with trades. It knows the strategy took, say, 47 trades over the last 5 years. Some were winners, some were losers, with specific rupee amounts. Monte Carlo takes those 47 trades and re-shuffles them — or resamples them — into thousands of alternative sequences. Each sequence produces a different equity curve, a different final capital, and a different maximum drawdown.

After 5,000 such simulations, you get a distribution: not just one outcome, but a spread of plausible outcomes that could have happened from the same underlying trades.

Topic 2

Why use Monte Carlo

Because a single historical backtest shows you one path the strategy took — not the range of paths it could have taken.

A backtest produces one number: "this strategy made +40% over the last 5 years." But the trades didn't have to happen in that order. If the market had moved slightly differently, the same trades might have been made in a different sequence — and the sequence has a huge effect on the final result. Early losses hurt more than late ones (because they kill compounding), and a cluster of losses in the middle is more painful than a few isolated ones.

Monte Carlo quantifies this:

  • Probability of loss — what fraction of simulated paths ended below the starting capital? This is often the single most useful number in the entire report.
  • Worst-case outcomes — where did the worst 5% of paths end up? Knowing that 5% of simulations fell below ₹1.3 lakh is very different from assuming the strategy always ends around ₹2 lakh.
  • Drawdown risk — how deep was the worst drawdown in the simulations? A strategy making +40% with 60% drawdowns is very different from one making +40% with 12% drawdowns.
  • Ruin probability — what fraction of paths fell below a critical threshold (say, half the starting capital)? That's the answer to "can this strategy actually blow up?"
  • Losing streaks — how many losses in a row did simulations experience? This matters psychologically as much as financially.

Bottom line: a backtest tells you what happened. Monte Carlo tells you what could have happened — and how bad the bad cases can be.

Topic 3

How it works — with a simple example

Take the trades the strategy actually made. Reshuffle them thousands of times. Count what happened.

Say a strategy produced these 8 trades over two years (as percentages of starting capital):

The historical trades
+5% -3% +8% -5% +2% -4% +6% -2%

In this specific order, the strategy ended slightly up. But is that guaranteed to happen again?

Monte Carlo takes those same 8 trades and reorders them. Sometimes it puts the winning streaks first, sometimes the losing streaks first, and sometimes it mixes them up. Over 5,000 simulations, you see the full range.

Original

+5% -3% +8% -5% +2% -4% +6% -2%
→

One resampled path

-5% -4% -3% -2% +2% +5% +6% +8% Four losses first — a much worse journey, even though the same trades appear.

By running this reshuffling thousands of times, we can compute percentiles. From a real StockWise run on a Nifty 50 index strategy:

Metric Result
Simulations run 5,000
Median final capital ₹1,80,957
Worst 5% of paths ended below ₹1,31,461
Best 5% of paths ended above ₹2,54,423
Probability of ending below start 68.3%
Median maximum drawdown -22.29%
Chance of > 30% drawdown 22.2%
Risk of ruin (dropping below 50%) 0.12%

Each of these numbers is a fact about the distribution, not a prediction. They tell you how much variety exists within the strategy's own trades.

Topic 4

Key terms you'll see

Six terms cover 90% of a Monte Carlo report. Each is one or two sentences.

Simulation

One resampled path. A run with 5,000 simulations means 5,000 different sequences of the same trades.

Median (p50)

Half of simulations ended above this value, half below. It's the "middle" outcome, and usually a better guide than the average (which can be skewed by extreme cases).

5th percentile (p5)

The value below which only 5% of simulations ended. The bottom edge of the plausible range.

95th percentile (p95)

The value below which 95% of simulations ended — i.e., only 5% did better. The upper edge of the plausible range.

Probability of loss

The fraction of simulations whose final capital was below the starting capital. The single most important number for risk assessment.

Risk of ruin

The fraction of simulations where the strategy fell below a critical threshold (often 50% of starting capital). Even a small probability here is worth taking seriously.

Topic 5

Reading the results

A Monte Carlo report says something about the strategy's risk profile, not about the strategy's expected return.

The report gives you two kinds of information: what outcomes are possible, and how likely the bad ones are. The first two cards on the Outcome tab show the range; the next three tell you where the risks sit.

The critical number to look at first is probability of loss. A strategy with a positive median return but a 60% probability of loss is very different from one with the same median and a 15% probability of loss. Both might have the same final "backtest" number, but they feel completely different to hold.

Second most important: the 5th percentile outcome. This is the "bottom edge of plausible." If that number is far below your starting capital, the strategy has a real chance of losing money — even if the median is positive.

Third: drawdown risk. A strategy with a 30% or 40% drawdown will make you question whether it works. If the simulations frequently show drawdowns of that size, you need to be prepared for them in real trading.

Low risk

Robust across the spread

Median positive, probability of loss under 20%, drawdowns moderate, ruin probability negligible. This is what you want to see.

Mixed

Positive but with real risk

Median positive but probability of loss between 20% and 50%. The strategy can work, but you need to endure losing stretches.

High risk

Downside dominates

Median negative, or probability of loss above 50%. The simulation results themselves say the strategy is more likely to lose than win.

A useful mental model: if you ran this strategy 100 times on 100 different market histories that all had the same trades, what would the distribution of outcomes look like? That distribution is what Monte Carlo shows.

Topic 6

What Monte Carlo does not do

It does not predict the future. It shows how the strategy's own past behaviour could have played out in different orders.

The single biggest misunderstanding about Monte Carlo is that it forecasts what will happen. It does not. It makes one assumption — that the past trades are representative of the kind of trades the strategy produces — and then explores what could have happened within that assumption.

Two specific caveats:

  • If the past trades are unrepresentative of the future, Monte Carlo inherits that flaw. A strategy that worked in one specific market regime might not work in another, and Monte Carlo over its historical trades won't reveal that.
  • Monte Carlo cannot see correlations. It treats every trade as independent. If trades in the real world are correlated (e.g., the whole market drops on the same day), the true drawdown could be worse than the simulation shows.

Because of these limits, the correct way to read a Monte Carlo report is:

"In the simulations based on this strategy's historical trade characteristics, X% of paths produced this outcome." Not "the strategy has an X% chance of producing this outcome." That distinction matters.

Monte Carlo is a tool for understanding the shape of the risk. It works best in combination with walk-forward analysis, which tells you whether the trades being simulated are themselves robust. A strategy that fails walk-forward analysis should not be trusted, no matter how good its Monte Carlo numbers look.

Ready to see your strategy's risk profile?

Open StockWise, run a walk-forward analysis, then feed its trades into Monte Carlo.

Download StockWise