One Equity Curve Is One Sample

Take the trades a backtest produced, put them in a different order, and compute the equity curve again. Same trades, same total, same win rate — and a different maximum drawdown, a different shape, quite possibly a different decision about whether to run the thing. Nothing about the strategy changed; the sequence did, and the sequence was never a property of the strategy.

That is uncomfortable and it is also the most useful thing to know about a backtest: the curve you got is one draw from a distribution, and reading it as the result treats an accident of ordering as a finding.

Educational material, not trading advice. Algorithmic crypto trading is high-risk and most retail algo traders lose money.

The curve you got is one draw

A single path cannot express uncertainty, so it invites you to read precision that isn’t there. Every metric computed from one path — the ratio, the drawdown, the terminal value — is a point estimate with an error bar you have not calculated. The drawdown is the worst offender, because it is an extreme-value statistic: it depends entirely on where the losses happened to cluster, which is the part of the sample most driven by luck.

Resampling methods give you the missing error bars using nothing but the data you already have. They do not require new data, a model of prices, or any distributional assumption you have to defend. They require the courage to look.

Reordering the trades you already have

The simplest version: sample trade returns with replacement, in random order, as many trades as the original had, and rebuild the curve. Do it a few thousand times.

draws = rng.choice(trade_returns, size=(n_paths, len(trade_returns)))
curves = np.cumprod(1.0 + draws, axis=1)

What that holds fixed is the set of trade outcomes: the mean, the dispersion, the shape of the win and loss tails. What it destroys is everything about ordering — clustering, streaks, and any dependence between consecutive trades.

That destruction is the method’s assumption, and it is usually wrong in a specific direction. Trading returns cluster: bad stretches arrive together, because the conditions that hurt one trade tend to hurt the next. Shuffling breaks up the clusters, so the drawdown distribution from a plain trade bootstrap is systematically optimistic — it shows you a gentler world than the one your strategy lives in. Useful as a floor on how bad things get, not as an estimate of it.

Block bootstrap: keeping the clumps

Sample contiguous blocks of the return series rather than individual observations, and the serial dependence survives the resampling. Choose a block length longer than the dependence you believe exists — long enough to contain a typical bad stretch — then draw blocks with replacement until you have a path of the original length.

The trade-off is direct: longer blocks preserve more structure and give you fewer effectively independent pieces, so the resulting distribution is more realistic and less well resolved. Shorter blocks do the reverse. Running the whole analysis at two or three block lengths and reporting that the conclusion is stable across them is worth more than picking one and defending it.

A related and simpler variant, when the strategy’s positions are what you care about: keep the return series intact and resample blocks of the strategy’s position sequence instead. This preserves the market’s own clustering perfectly, because you never touch it.

What to read off the distribution

Report intervals, not points. Concretely:

  • Where your realized path sits in the distribution. Near the median is unremarkable and reassuring. Near the top decile means the backtest you are excited about is a favourable draw of a strategy whose typical outcome is duller.
  • The drawdown percentiles. The realized maximum drawdown is one sample of an extreme statistic, and it is very often milder than the median of the resampled distribution. Sizing a position off the drawdown you happened to observe is sizing off the luckiest number in your report — the mechanics of which are in how maximum drawdown is calculated.
  • The width of the interval on your headline metric. For illustration, if a resampled interval on a risk-adjusted ratio spans from clearly negative to clearly attractive, the honest statement is “this sample cannot distinguish this strategy from no edge.” That is a legitimate result and it is much cheaper to learn now. The sampling-error problem it makes visible is the one described in what the Sharpe ratio actually measures.
  • The proportion of paths that end below where they started. More interpretable than a ratio for most people, and harder to talk yourself out of.

What resampling cannot tell you

It resamples your sample, so every limitation of the sample survives intact. Three in particular.

A regime absent from the data stays absent from every path. If your history contains no violent unwind, none of your thousand bootstrapped paths contains one either, and the interval you produce is an interval conditional on the future resembling the past. Resampling quantifies sampling noise, not regime risk — see regime change and why strategies decay for the distinction.

Selection bias passes straight through. Bootstrapping the winner of a large parameter search gives you an honest interval around a dishonest point estimate. The resampled distribution will be centred on the inflated result, because that is the data you fed it. The correction for that is a different tool entirely, covered in multiple testing: why your best result is probably noise.

And it says nothing about whether your trades were achievable. Resampling fills and costs you modelled optimistically simply produces a well-quantified distribution of fiction.

There is also a nearby technique it is easy to confuse this with: randomizing the strategy rather than the outcomes, to ask whether the rule beats chance. That is a different question with different machinery — see what to compare a strategy against.

Making it routine

The point of resampling is that it is cheap enough to be default. A few thousand paths on a trade list is milliseconds of compute; the reason it is rare is habit, not cost. Two conventions make it stick: have the backtest emit the resampled interval alongside every metric it already reports, so a point estimate never appears alone, and fix the random seed so the interval is reproducible and does not shift between runs for reasons unrelated to the strategy.

Then the comparison between two candidate strategies stops being “which number is bigger” and becomes “do these intervals even separate?” — which is usually no, and knowing that is the value.

The takeaway

A backtest is a hypothesis test, and a hypothesis test with no error bar is an anecdote with a chart. Resampling turns the single path you were handed into the distribution it was drawn from, using no new information and no new assumptions beyond how much sequence structure you choose to preserve. It will make almost every result you have look less certain than it did. That is not the method being pessimistic — it is the method being correct, and it is far cheaper to absorb that from a bootstrap than from a live account.