Bottom line: The best of N tested strategies has an inflated Sharpe by construction, roughly sqrt(2·ln N) standard errors worth. Testing 100 variants and reporting the winner’s 1.8 Sharpe is reporting noise. Deflate by the number of trials before believing it.

The inflation

The expected maximum of N independent zero-skill Sharpe estimates grows with N:

Variants tested Expected max Sharpe (zero skill, 5 yr)
1 0.00
10 0.85
100 1.35
1,000 1.75
10,000 2.10

A 1.8 Sharpe from a 1,000-variant search is what you get from pure luck. The deflated ratio subtracts that benchmark.

Deflation

1
2
3
4
5
from math import sqrt, log, erfc
def deflated(sr, n_trials, n_obs, skew=0.0, kurt=3.0):
emc = sqrt(2 * log(n_trials)) if n_trials > 1 else 0
se = sqrt((1 - skew * sr + (kurt - 1) / 4 * sr**2) / (n_obs - 1))
return (sr - emc * se) / se

Report the deflated figure alongside the raw one. Below roughly 1.0 deflated, the strategy is indistinguishable from a lucky draw.

Trial counting honestly

Count every parameter set actually evaluated, including the ones deleted after a bad first look. Twenty grid points × five entry rules × three exits = 300 trials, not “one idea”. Grid search over six parameters at five levels each is 15,625 trials.

Out-of-sample is the real test

Hold out the last 30% of the period untouched until the parameter choice is final. One clean out-of-sample run beats any amount of deflation on the in-sample set.

Walk-forward

Rolling re-optimisation on a window, evaluated on the next window, repeated. It measures the process rather than one fitted parameter set, and it degrades the way live trading does.

What the curve looks like

A factor with a flat parameter plateau across a 20% range survives out-of-sample. A factor that only works at 12.0 and dies at 11.5 and 12.5 is fitted. Always check the neighbourhood before the summary statistic.

Operating notes

Count trials before running anything, and keep a running tally in the research log. Twenty variants deleted after a bad first look still count — those are the ones people forget and they are the ones that inflate the winner.

1
2
3
from math import sqrt, log
emc = sqrt(2 * log(n_trials)) if n_trials > 1 else 0
print(f"expected max under zero skill: {emc:.2f} SE")

If the raw Sharpe is under that, the strategy is indistinguishable from luck.

Plateau over peak

Sweep one parameter across a range and plot it. A peak at 12.0 that dies at 11.5 and 12.5 is fitted; a flat top across 10–14 is real. Plateau width is a better out-of-sample predictor than the maximum.

Hold-out discipline

Reserve the last 30% chronologically and do not touch it until the parameter set is final. One clean run on it. If you look twice, deflate by the looks as additional trials.

Walk-forward

Re-optimise on a rolling window, evaluate on the next, repeat. It measures the process rather than one fit, and its degradation resembles live trading’s.

FAQ

Why is the best of many tested strategies’ Sharpe ratio inflated?

The best of N tested strategies has an inflated Sharpe by construction, roughly sqrt(2·ln N) standard errors worth. A 1.8 Sharpe from a 1,000-variant search is what you get from pure luck. The deflated ratio subtracts that benchmark before you believe the number.

How many trials should I count when deflating a Sharpe ratio?

Count every parameter set actually evaluated, including ones deleted after a bad first look. Twenty grid points × five entry rules × three exits is 300 trials, not “one idea”. Grid search over six parameters at five levels each is 15,625 trials.

What deflated Sharpe ratio is too low to trust?

Below roughly 1.0 deflated, the strategy is indistinguishable from a lucky draw. Report the deflated figure alongside the raw one. If the raw Sharpe is under the expected max under zero skill, the strategy is indistinguishable from luck.

How much data should I hold out to test a strategy out-of-sample?

Hold out the last 30% of the period untouched until the parameter choice is final. One clean out-of-sample run beats any amount of deflation on the in-sample set. If you look twice, deflate by the looks as additional trials.

What does a fitted parameter curve look like compared with a real one?

A factor that only works at 12.0 and dies at 11.5 and 12.5 is fitted. A factor with a flat parameter plateau across a 20% range survives out-of-sample. Plateau width is a better out-of-sample predictor than the maximum.