advanced

Monte Carlo Simulation for Trading Systems: Resampling Trades to Find the Real Drawdown Risk

How Monte Carlo resampling of a trade record works, shuffle vs bootstrap vs block bootstrap, and a worked 20,000-path simulation of drawdowns, losing streaks and loss odds.

Monte Carlo simulation for a trading system means generating thousands of alternative trade sequences consistent with the system’s record, usually by resampling its historical trades, and measuring the spread of outcomes such as maximum drawdown, longest losing streak and final return. Its main lesson is that the drawdown in a track record is one draw from a wide distribution, and usually not the worst one you should plan for.

In short: in our worked example, a 250-trade hypothetical record risked at 1% per trade had a historical maximum drawdown of 21.8%. Resampling the same trades 20,000 times put the 95th percentile drawdown at 27.5% and the 99th at 34.2%; a block bootstrap that preserves losing clusters pushed the 95th percentile to 29.2%. Even if the edge were exactly as observed, there was a 12.4% chance of losing money over the next 250 trades, rising to 48% if trading costs took 0.1R per trade. And the edge itself was not statistically established: 10% of bootstrap samples had an average trade of zero or less, and allowing for that uncertainty raised the chance of a loss to 20%. Monte Carlo tells you how much variety a given edge produces. It cannot tell you whether the edge is real.

This article explains a risk-analysis method with a worked simulation computed in Python. It does not evaluate any real provider or system.

A common misconception: “max drawdown was 12%, so that’s the risk”

Signal providers and expert advisor sellers often quote a single maximum drawdown from their record or backtest, as if it were a property of the system. It isn’t. It is a property of one particular ordering of one particular sample of trades. Run the same strategy over a different year and the trades arrive in a different order, the losing streaks fall in different places, and the drawdown changes, sometimes a lot. The figure on the sales page is a single observation; you need its distribution. (The basic arithmetic of drawdowns and recovery is in drawdown and risk of ruin.)

How resampling works

Start with a list of trades in R multiples, where 1R is the amount risked. Under fixed fractional sizing at a fraction f of equity, the equity curve is

equity after n trades = (1 + f x R1) x (1 + f x R2) x … x (1 + f x Rn)

and the maximum drawdown is the largest percentage fall from a running peak. To build a distribution, you create many alternative trade lists and recompute both. There are three standard ways to create them, and they answer different questions.

MethodHow each path is builtWhat variesWhat it assumes
Shuffle (permutation)The same trades in a random orderOrder only; final equity is identical on every pathThe set of trades is fixed; only the sequence is random
IID bootstrapDraw trades at random with replacementOrder and mix of tradesTrades are independent and identically distributed
Block bootstrapDraw runs of consecutive trades with replacementOrder and mix, keeping local clustersDependence is short-range and captured within blocks

The block version used below is the stationary bootstrap of Dimitris Politis and Joseph Romano (“The Stationary Bootstrap,” Journal of the American Statistical Association, vol. 89, 1994), in which block lengths are random with a chosen mean. It is the resampling scheme Halbert White applies in “A Reality Check for Data Snooping” (Econometrica, 2000), a widely cited test of whether the best of many forecasting rules beats chance, and it is designed for time series whose observations are not independent.

A fourth approach, parametric simulation, fits a distribution (for example, win probability plus win and loss size distributions) and draws from it. It can generate outcomes larger than any in the sample, which is both its strength and its weakness: the tails are whatever you assumed.

The worked example: a hypothetical 250-trade record

To have a record with realistic features, we generated one from a two-regime model: in a “good” regime the system wins 50% of trades, in a “bad” regime 34%. Wins are drawn from a normal distribution with mean +1.8R and standard deviation 0.4R; losses are -1R minus a small random amount (the absolute value of a normal draw with standard deviation 0.08R) to mimic slippage. After each trade the system moves from the good to the bad regime with probability 3% and back with probability 8%, so bad stretches last about 12 trades on average and losses cluster, which is how many real systems behave when market conditions change. The resulting record, which is the only thing a trader would actually see:

StatisticValue
Trades250
Win rate41.6%
Average trade+0.115R
Standard deviation per trade1.42R
Longest losing streak9
Ending equity at 1% risk per trade+29.9%
Maximum drawdown at 1% risk per trade21.8%

The t-statistic of this record is 0.115 / 1.42 x sqrt(250) = 1.28. By the standards in statistical significance of a track record, it does not establish an edge. Keep that in mind; we return to it below.

Result 1: the drawdown distribution

We built 20,000 paths of 250 trades with each method, all at 1% risk per trade.

MethodMedian max drawdown90th percentile95th percentile99th percentileChance of a 20%+ drawdownWhere the historical 21.8% falls
Shuffle15.0%20.7%22.6%26.5%12.4%93rd percentile
IID bootstrap15.3%24.1%27.5%34.2%22.7%84th percentile
Stationary bootstrap (mean block 20 trades)16.7%25.7%29.2%35.5%30.5%78th percentile

Several lessons are visible in one table.

  1. The typical drawdown was smaller than the historical one. The record happened to contain a cluster of losses, which produced a drawdown worse than most reorderings. The median path had a drawdown around 15%.
  2. But the tails are much worse. One path in twenty had a drawdown of 27.5% or more under the IID bootstrap; one in a hundred, 34% or more. Those are the figures to plan around, not 21.8%.
  3. Clustering matters. The shuffle and the IID bootstrap both destroy the regime structure in the original record. The stationary bootstrap keeps runs of consecutive trades together and produces fatter drawdown tails. If losses in your system cluster (and in most systems they do, because market conditions persist), the IID figures understate risk.
  4. The shuffle is the narrowest. Because it uses exactly the same trades, it only measures sequence risk. It is useful for showing that the historical drawdown was partly bad luck in ordering, but it is not a forecast.

Choosing the block length

The stationary bootstrap needs one tuning choice, the average block length, and the answer moves with it. A mean block of one trade is the IID bootstrap; a mean block as long as the record reproduces the record itself. The sensible value is roughly the length of the clusters you expect in the data. The 20-trade mean used here suits this record: its bad regime lasts about a dozen trades on average, so a typical block captures a whole losing stretch plus some context. Politis and Romano’s method makes blocks random in length so that the resampled series stays stationary, which avoids the artificial seams of fixed blocks.

In practice it is worth running two or three block lengths and reporting the range. If the 95th percentile drawdown climbs steadily as blocks get longer, the record contains dependence that the IID figures ignore, and the longer-block results are the more honest ones. If it barely moves, trades are close to independent and the simpler bootstrap is adequate. A provider who shows only an IID Monte Carlo of a strategy that averages down, holds through drawdowns, or trades in correlated bursts is showing the most flattering version of the analysis.

Result 2: losing streaks and final returns

MethodMedian longest losing streak95th percentile streak5th percentile ending equityMedian ending equity95th percentile ending equityChance of ending below start
Shuffle913+29.9%+29.9%+29.9%0% (by construction)
IID bootstrap914-10.3%+29.6%+87.5%12.4%
Stationary bootstrap912-12.6%+29.1%+96.3%14.7%

A system that loses 58% of its trades will produce streaks of 12 to 14 consecutive losses in one 250-trade run in about one case in twenty. At 1% risk, 14 straight losses is a 13.1% drawdown on its own (0.99 to the 14th power is 0.869). A follower who quits after ten losses in a row will quit this system regularly, usually just before the regime turns.

The ending-equity spread is wide even though every bootstrap path is drawn from the same trades: from a 10% loss to an 88% gain between the 5th and 95th percentiles. The single historical +29.9% sits in the middle, which says little about what the next 250 trades will deliver.

Result 3: sizing changes the drawdown distribution, not the edge

Using the same IID bootstrap paths at different risk levels:

Risk per tradeMedian max drawdown95th percentile drawdownChance of a 30%+ drawdownMedian ending equityChance of ending below start
0.5%7.9%14.6%0.0%+14.6%11.3%
1.0%15.3%27.5%2.8%+29.6%12.4%
2.0%28.9%48.5%45.3%+59.9%14.6%
3.0%40.9%64.2%86.3%+87.8%17.1%

The median drawdown roughly doubles when risk doubles from 0.5% to 1%, then grows a little less than proportionally, because fixed fractional sizing shrinks positions after losses. The tail probabilities move far faster: the chance of a 30%+ drawdown goes from 2.8% at 1% risk to 45% at 2% and 86% at 3%. The chance of finishing below the start also rises with size, because of volatility drag on compounded returns. How to choose a fraction from this kind of table, and why the growth-optimal fraction is dangerous, is the subject of position sizing and the Kelly criterion.

Result 4: what if the edge is smaller than it looked?

Resampling assumes the historical average trade is the true average. Live trading usually does worse: spreads and commissions, slippage on copied signals, and decay of whatever edge existed. (The cost side is covered in transaction costs in retail FX.) Subtracting a fixed amount from every resampled trade:

Cost or decay per tradeAverage tradeChance of a loss over 250 trades95th percentile drawdownMedian ending equity
None+0.115R12.4%27.5%+29.6%
0.1R+0.015R48.3%37.8%+1.0%
0.2R-0.085R85.9%49.3%-21.4%
0.3R-0.185R98.6%59.6%-38.8%

A tenth of R per trade is not much. On a 20-pip stop it is 2 pips per round trip, a cost that spread, commission and slippage together can easily reach. It turns a system that looks comfortably profitable into a coin flip. This sensitivity, more than any drawdown figure, is what most Monte Carlo reports on sales pages leave out.

Result 5: the edge itself is uncertain

The bootstrap also gives a direct read on how well the record pins down the average trade. Across the 20,000 IID bootstrap samples, the mean trade had a 95% interval of -0.061R to +0.288R, and 10.3% of samples had a mean of zero or less. That matches the t-statistic of 1.28 (a one-sided p-value of about 10%).

So the drawdown tables above describe the risk if the system has an edge of about 0.115R. The record is equally consistent with a system that has no edge at all, in which case every table shifts towards the bottom rows of Result 4. A fuller analysis builds that uncertainty into the simulation itself, which is the next step.

Result 6: adding parameter uncertainty with a double bootstrap

The single bootstrap treats the 250 historical trades as the true population. A double bootstrap treats them as one sample from an unknown population. For each path, first draw 250 trades with replacement to create a plausible alternative “true” population (one with its own win rate and average trade), then draw the 250 future trades from that population. Paths built from unlucky populations have a smaller edge; paths built from lucky ones have a larger edge. We ran 20,000 fresh paths each way at 1% risk (a new random run, so the single-bootstrap figures differ slightly from Result 1):

MethodChance of ending below startMedian max drawdown95th percentile drawdown99th percentile drawdown5th to 95th percentile ending equity
Single bootstrap12.1%15.3%27.5%34.1%-10.0% to +88.8%
Double bootstrap20.2%15.4%32.8%42.3%-22.5% to +118%

The double bootstrap is a simple way of propagating parameter uncertainty: each simulated future gets its own plausible edge, drawn from how much the record’s own average could have varied. It is not the only way. A parametric version would draw the win rate from a beta distribution centred on 41.6% and the average win and loss from their sampling distributions, then simulate trades from those. The two approaches usually agree on the main point, which is that uncertainty about the edge matters as much as luck in the sequence.

The median barely moves, but the tails widen sharply: the chance of a loss rises from about one in eight to one in five, and the 99th percentile drawdown from 34% to 42%. The single bootstrap is a conditional answer (what happens if the observed edge is exactly right). The double bootstrap is closer to the question a follower actually faces, which is what happens given only this record. Neither includes the extra trials and selection that usually sit behind a record you are shown.

How many paths are enough?

Monte Carlo percentiles are themselves estimates. To see how stable they are, we repeated the IID bootstrap 200 times at each path count and measured how much the 95th and 99th percentile drawdown estimates moved between repeats:

Paths per runAverage 95th percentile estimateSpread between runs (standard deviation)Average 99th percentile estimateSpread between runs
10026.8%1.9 points32.3%2.8 points
1,00027.3%0.7 points33.8%1.2 points
10,00027.4%0.2 points33.9%0.3 points

With 100 paths, the 99th percentile rests on the one or two worst paths and is both noisy and biased low. A few thousand paths are enough for stable tail percentiles in a record of this size, and computing tens of thousands takes seconds. The binding constraint is never the number of simulations. It is the 250 trades they are all drawn from.

How professionals use these numbers

  • Setting expectations before going live. The 95th or 99th percentile drawdown, not the historical one, is the number to compare with your tolerance and capital.
  • Defining a stop rule for the system itself. If live drawdown exceeds, say, the 99th percentile of the simulated distribution, that is evidence the system has changed (or never worked), not just bad luck. Decide this threshold in advance.
  • Comparing backtest with live. If live results sit persistently in the bottom tail of the simulation built from the backtest, the backtest was probably optimistic. See backtests vs live results.
  • Comparing sizing rules. The same resampled paths can be run through fixed fractional, fixed lot or volatility-scaled sizing to see which produces acceptable tails.

What can go wrong

  • It only resamples what happened. A bootstrap can never produce a loss larger than the worst trade in the sample. A record from a calm period contains no flash crash or central bank shock, and neither will any of its 20,000 resampled paths. Parametric tails or explicit stress scenarios are needed for that.
  • Garbage in, garbage out. Monte Carlo on an overfitted backtest produces a precise-looking distribution of fictional outcomes. Resampling does nothing about selection bias across the many versions that were tested; that requires the tools in overfitting and data snooping.
  • Dependence is assumed away. The IID bootstrap assumes trades are independent. Overlapping trades on correlated pairs, regime clustering and averaging-down systems all violate that. Use block resampling or resample by day of account returns rather than by trade.
  • Stationarity. Every resampling method assumes the future is drawn from the same distribution as the past. Market regimes, spreads and liquidity change.
  • Open trade risk. A record of closed trades omits the intra-trade drawdown of positions that went deep into loss before recovering. For systems that hold losers, simulate on daily equity instead.
  • A small sample gives a noisy distribution. With 250 trades, the tail percentiles themselves are estimated from very little information about rare events.

The short version

Monte Carlo simulation resamples a system’s trades to show the range of drawdowns, streaks and returns the same edge could produce. In our 250-trade example at 1% risk, the historical drawdown of 21.8% sat at the 84th percentile of the IID bootstrap distribution, whose 95th and 99th percentiles were 27.5% and 34.2%; a block bootstrap that keeps losing clusters together produced fatter tails. A cost of 0.1R per trade raised the chance of a loss over 250 trades from 12% to 48%. And the bootstrap distribution of the mean showed a 10% chance that the true edge was zero or negative. Monte Carlo measures the risk of an edge you already have evidence for; it is not itself evidence that the edge exists.

Related: Statistical Significance of a Track Record · Slippage and Execution on Copied Trades · Drawdown and Risk of Ruin

#monte carlo#bootstrap#drawdown#trading system#resampling#losing streak#risk management