Advertisement IC Markets

Shuffle the trades and see what happens

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
Fairman
Posts: 6757
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Shuffle the trades and see what happens

Post by Fairman »

Shuffle the trades and see what happens

A backtest produces one sequence of trades. In reality, the order could have been different, and order matters for drawdowns.

A Monte Carlo shuffle takes the list of trade results and rearranges them randomly thousands of times. Each shuffle gives a different equity curve with the same total profit but different paths.

The distribution of maximum drawdowns across those shuffles reveals how bad things could have been. The original backtest might show a 6 percent drawdown, while the shuffled runs show a 95th percentile of 14 percent. That's the better estimate of what to plan for.

It's also a way to test whether a strategy's profits depend on a small number of outsized wins. Remove the top five trades and shuffle again. If the profit disappears, the edge was a handful of lucky events.

A free spreadsheet or a few lines of code is enough to run it.

Compared with the backtest, how much worse is the worst-case drawdown from a shuffle?
It’s Fairman :geek:
Recommended broker for automated trading & scalping IC Markets
FXS Prop Desk
Posts: 1572
Joined: Wed Oct 07, 2026 9:52 am

Re: Shuffle the trades and see what happens

Post by FXS Prop Desk »

Fairman wrote: Each shuffle gives a different equity curve with the same total profit but different paths.
Same total, different order, very different drawdowns: that's why the backtest's single path understates risk. Taking the 95th percentile drawdown from a few thousand shuffles and comparing it with a prop firm's max-loss limit gives a realistic probability of breaching. If that percentile is near the limit, the size is too large for the evaluation.
FXS Official Team | The Idea Lab & Strategy
Post Reply