NOONOO TRADINGStart in the bot

Monte Carlo Simulation: Reshuffling Trades to Explore Drawdown Risk

A backtest shows one equity curve. That curve is the result of trades occurring in one particular order. Changing the order alone can change the account's experience dramatically.

The trap of having only one equity curve

Suppose a strategy has a record of 200 trades, with a final return of +34% and maximum drawdown of −12%. Those figures accurately describe the one order in which those 200 trades occurred.

What if you keep the same 200 trades but rearrange them? The final return is almost unchanged in the guide's compounded-return model, since multiplication is order-independent. But maximum drawdown changes. Scattered losses produce shallower drawdowns, while losses clustered together produce deeper ones.

The original guide's same-ten-trades illustration (±5% per trade, six wins and four losses)

Order A: +5 −5 +5 −5 +5 +5 −5 +5 +5 −5
→ The guide states maximum drawdown of approximately −9.8%

Order B: −5 −5 −5 −5 +5 +5 +5 +5 +5 +5
→ The guide states maximum drawdown of approximately −18.5%

The final balance is the same in both cases. The original illustration describes roughly twice the depth to endure.

In practice, drawdown rather than final return often makes people abandon a strategy. Starting with an expectation of −12% and experiencing −25% may prompt a trader to stop even if the strategy has not broken.

Monte Carlo simulation addresses this by randomly reshuffling trades thousands of times to explore the range of equity curves the strategy's trade sample can produce.

The process: shuffle, rebuild and examine the distribution

The input is a list of returns from fully closed trades, taken from either a backtest or live trading.

Step 1 Create an array of returns from 200 trades.
Step 2 Randomly shuffle it and construct an equity curve.
Step 3 Record final return, maximum drawdown and longest losing streak.
Step 4 Repeat steps 2–3 5,000 times.
Step 5 Summarize the 5,000 observations as distributions.

The output is a distribution, not a single number: for example, “median maximum drawdown was −14%, and 5% of cases were deeper than −27%,” rather than just “maximum drawdown was −12%.”

Two resampling methods are common.

Shuffling without replacement keeps all 200 trades and changes only their order. It preserves the trade composition completely, measuring ordering luck alone. Final return stays almost fixed while drawdown varies.

Bootstrap sampling with replacement randomly draws one of the 200 trades, returns it to the pool, and repeats 200 times. Some trades appear repeatedly; others are omitted. Final returns also vary. The original guide treats this as a more conservative approach, with a stronger assumption that the sample represents the future.

The guide favors sampling with replacement as a default because there is no reason the next 200 real trades must have precisely the same composition as the previous 200.

Reading results through percentiles

With 5,000 results, examine percentiles rather than relying on the mean. An average drawdown offers little preparation for adverse outcomes.

Example maximum-drawdown distribution (5,000 simulations; percentiles ordered by drawdown severity)

Median, 50th percentile: −14.2%
75th percentile: −18.6%
90th percentile: −24.1%
95th percentile: −27.3%
99th percentile: −34.8%

Original backtest: −12%
→ The guide's planning figure is around −27%.

The proposed operating rule is: if you cannot endure the 95th-percentile drawdown, do not trade at that size. Endurance concerns capital, but also whether that drawdown would make you interfere with or abandon the rules.

Two other measures are useful.

Probability of finishing at a loss is the proportion of the 5,000 runs ending with a negative return. In a bootstrap example, even if the original backtest returned +34%, a 20% negative-outcome rate means one in five sampled paths finished at a loss.

Longest losing streak is especially important psychologically. The original guide illustrates that even a 55% win-rate strategy can experience eight to ten consecutive losses across 200 trades. Knowing such sequences in advance changes how they are experienced.

The guide's illustrative longest-losing-streak distribution (55% win rate, 200 trades)

Median: seven losses
90th percentile: ten losses
99th percentile: thirteen losses

→ Eight losses fall within the example's normal range, rather than automatically indicating a broken strategy.
→ The example uses thirteen losses as a planning reference for response rules.

Using the results to determine position size

A major practical use is position sizing, rather than simply judging a strategy. Set the drawdown you can tolerate first, then work backward to a trade size.

Goal Keep the 95th-percentile maximum drawdown within −20%.

Risk per trade 2% → 95th-percentile drawdown −27.3%
Risk per trade 1.5% → −20.6%
Risk per trade 1.2% → −16.5%

→ The original example selects 1.5% or less per trade.
(Drawdown moves approximately in proportion to trade size in this illustration.)

The order matters: define tolerable drawdown first, then select a size that fits, instead of starting with a desired return. Where the Kelly criterion gives a theoretical optimal bet, Monte Carlo explores whether that bet's path is endurable. The guide notes that this often leads to half-Kelly or less.

Risk of ruin can be estimated from the same runs by counting the proportion in which equity falls below a chosen threshold, such as 50% of starting capital.

What can invalidate the results

Monte Carlo is powerful but not universal. These problems can make precise-looking results uninformative.

Too little data: Shuffling 30 trades 5,000 times does not create information beyond those 30 trades. The guide suggests at least 100 trades, preferably 200 or more. A distribution based on 30 trades can create an illusion of precision.

Dependent trades: Randomly rearranging trades assumes their order has no relevant dependence. Trend-following strategies often win in clusters during trends and lose in clusters during ranges. Shuffling can make drawdowns appear shallower than reality. With linked trades such as averaging down or pyramiding, treating each fill as an independent sample is inappropriate.

Contaminated source records: A backtest with look-ahead bias or missing fees and slippage only produces a distribution of contaminated numbers. Monte Carlo examines sequence risk; it does not validate data quality. It complements the chronological validation of walk-forward analysis, rather than replacing it.

An overoptimized strategy: Curve-fitted results also yield optimistic drawdown distributions. First use walk-forward validation to screen parameter contamination, then run Monte Carlo on trades from validation periods.

Changing market structure: Resampling cannot invent an event absent from the past 200 trades, such as an exchange outage, vanishing liquidity or a regulatory announcement. The worst outcome may lie outside the distribution, beyond its 99th percentile.

Where to run it

No elaborate tool is required. A spreadsheet can perform hundreds of runs from trade returns, and Python can implement the basic process in roughly twenty lines. Many commercial backtesting tools include a Monte Carlo tab.

More important than the tool is when to run it: once before going live and again after roughly 100 live trades. The second run is especially useful. If the live-trade distribution is noticeably worse than the backtest distribution, execution assumptions or cost estimates may be missing something. That is a reason to revisit the backtesting process.

Three key points

① Monte Carlo resamples trade records thousands of times to examine equity-curve distributions. With simple reshuffling, final return is nearly unchanged while maximum drawdown and longest losing streak vary substantially.
② Use percentiles rather than averages. The guide's rule is to avoid a size whose 95th-percentile drawdown you cannot tolerate, and calculate size from acceptable drawdown.
③ Too few trades, linked trades or contaminated backtests undermine the result. Events outside the sample are not captured by the distribution.

Caution

The drawdown distributions, percentiles, losing-streak lengths and position-size results above illustrate calculations and decision processes; they are not measured performance of a particular strategy. Actual values depend on win rate, reward-to-risk ratio, trading frequency and sample size, so the figures cannot be applied directly. No simulation guarantees future returns or a maximum-loss limit. Leveraged trading can lose all principal. Investment decisions and their consequences remain your responsibility.

NOONOO TRADING invites you to follow live trading in our free chat.

Start in the bot

📈 OKX trading fee discount for new registrations

Register for the OKX Fee Discount →