Advertisement IC Markets

Permutation tests for a trading rule: shuffle the signals, keep the market, and see where the real result lands

Discuss 1-minute to 15-minute price action setups, fading intraday momentum, key support/resistance zones, and proven short-term trading methodologies.
Post Reply
Shadow Trader
Posts: 6144
Joined: Wed Sep 09, 2026 5:19 pm

Permutation tests for a trading rule: shuffle the signals, keep the market, and see where the real result lands

Post by Shadow Trader »

A backtest gives you one number, like +180 pips over six months. What it doesn't tell you is how special that number is. Could a rule that enters at random times on the same chart have done just as well? A permutation test answers that directly, and it doesn't need any statistical assumptions about the shape of returns.

One version works like this. Keep the price data exactly as it is. Keep your rule's number of trades, its average holding time and its mix of longs and shorts. Then shuffle the entry times randomly and compute the result. Do that a thousand times. You now have a distribution of what random timing with the same trading style produces on that market. Count how many of the random runs did as well as or better than your real result. If it's 20 out of 1,000, the rough p-value is 0.02.

This is helpful because it accounts for the market's own drift. If EURUSD trended strongly down during your test, a rule that's mostly short will look good regardless of timing. The shuffled versions will also be mostly short, so they'll look good too, and your real result has to beat them, not just beat zero.

Another version, described by Timothy Masters, permutes the price changes themselves to destroy any patterns in the series while keeping the overall distribution, then re-runs the whole optimisation on each permuted series. That checks whether your optimisation process finds "edges" even in data that has none, which is a stricter test.

Either way, the real result should sit far out in the tail of the random ones. If it sits in the middle, the rule's timing isn't adding much beyond the direction it happens to favour. That's a quick, honest check worth running before going live with anything.
Recommended broker for automated trading & scalping IC Markets
Post Reply