Your best backtest is lying: Sharpe ratios and multiple testing
You test 100 trading ideas on five years of data. The best one has a Sharpe ratio of 1.2 and a p-value of 0.004. Is it real? If all 100 ideas were worthless, you would expect the best to have a Sharpe around 1.13. The p-value answers the wrong question: it treats the winner as if it were the only thing you tried.
A Sharpe ratio is an estimate with an error bar
The annualised Sharpe ratio is the mean return over the volatility, scaled by √252 for daily data. The volatility is estimated quite precisely. The mean is not: its standard error is σ/√T. So the Sharpe estimate inherits almost all of the mean’s noise:
(Lo, 2002). Multiply by √252 to annualise, with T = 252 × years, and you get the rule of thumb in step 1: the standard error of an annualised Sharpe is about one over the square root of the number of years. The ½SR² term is negligible for daily data, where the daily Sharpe is around 0.06.
That is a sobering number. Three years of a strategy with a measured Sharpe of 1.0 gives a 95% interval of roughly 1.0 ± 1.13. You can’t tell it apart from zero. The Sharpe ratio is also the t-statistic of the mean divided by √years, which gives step 2.
Two things make the error bar wider in practice:
- Fat tails and negative skew. With skewness γ₃ and kurtosis γ₄ of the period returns, the variance becomes . Option-selling strategies, with big negative skew, have Sharpe ratios that are noisier than they look.
- Autocorrelated returns. Smoothed or illiquid returns make volatility look low and the Sharpe look high. Annualising with √252 assumes independent days.
The best of N is biased upwards
Now try N strategies, all with true Sharpe zero, and keep the best. Each estimate is roughly , so the best is the maximum of N normals. Its distribution is exact:
and its expected value is well approximated by step 3, a result from extreme value theory used by Bailey and López de Prado. With five years of data:
| Strategies tried | Expected best Sharpe | Simulated |
|---|---|---|
| 1 | 0.00 | 0.01 |
| 10 | 0.70 | 0.70 |
| 100 | 1.13 | 1.13 |
| 1,000 | 1.46 | 1.45 |
The growth is slow, like , but it starts fast. Ten tries already buys you a Sharpe of 0.7 from nothing. Note that “tries” includes every parameter value, lookback window, universe filter and stop-loss level you tested, not just the strategies you wrote up.
Every backtest (true Sharpe = 0), best in orange
Where the best Sharpe lands: exact distribution
Set 100 strategies and 5 years, and run it a few times. The orange curve will usually look like a strategy you’d want to trade: a steady climb, Sharpe above 1, naive p-value below 1%. Every one of them is a coin flip. Then compare the two p-values. The naive one asks “how likely is a Sharpe this high from one noise strategy?” The adjusted one, , asks “how likely is it that the best of N noise strategies is this high?”, and it’s usually unremarkable.
Three ways to keep yourself honest
1. Raise the bar (Bonferroni). To keep a 5% chance of any false discovery across N tests, test each at 5%/N. With 100 tries, the one-sided critical z is 3.29 instead of 1.645. Over five years that means a Sharpe of 3.29/√5 ≈ 1.47. Bonferroni is conservative when the strategies are correlated (they usually are), because correlated tries are worth fewer independent tries. Harvey, Liu and Zhu (2016) argued from the size of the factor zoo that a new factor should clear t ≈ 3, not 2.
2. Deflate the Sharpe. Replace zero with the expected maximum under the null, SR₀, and ask how likely it is that the true Sharpe exceeds that:
with everything in per-period units. For normal daily returns this reduces to step 4. A best-of-100 Sharpe of 1.5 over five years has SR₀ = 1.13 and DSR = Φ(0.37 × √5) ≈ 0.79. That’s a 79% chance it beats luck, which is far from the 99.96% a naive test would claim. Bailey and López de Prado suggest estimating N as the number of effectively independent trials, for example by clustering the correlated ones.
3. Hold data out. Choose the strategy on one period and evaluate it once on a later period you never touched. The out-of-sample Sharpe of the winner is an unbiased estimate of its true Sharpe. The catch is that the hold-out only works once. Every time you look at it and go back to tweak, it becomes in-sample.
import numpy as np
from scipy.stats import norm
EULER = 0.5772156649
def expected_max_sharpe(n_trials, years):
"""Expected best annualised Sharpe among n_trials strategies with true Sharpe 0."""
if n_trials == 1:
return 0.0
z = (1 - EULER) * norm.ppf(1 - 1 / n_trials) + EULER * norm.ppf(1 - 1 / (n_trials * np.e))
return z / np.sqrt(years)
def deflated_sharpe(sr_ann, n_trials, years, skew=0.0, kurt=3.0, periods=252):
"""Probability the true Sharpe beats the best-of-n luck benchmark."""
T = periods * years
sr, sr0 = sr_ann / np.sqrt(periods), expected_max_sharpe(n_trials, years) / np.sqrt(periods)
denom = np.sqrt(1 - skew * sr + (kurt - 1) / 4 * sr**2)
return norm.cdf((sr - sr0) * np.sqrt(T - 1) / denom)
print(expected_max_sharpe(100, 5)) # ≈ 1.13
print(deflated_sharpe(1.5, 100, 5)) # ≈ 0.79What to report with a backtest
- The number of variants tried, honestly counted, and how correlated they were.
- The Sharpe with its standard error, not just the point estimate.
- A deflated Sharpe or a multiple-testing-adjusted p-value.
- Out-of-sample performance on data that played no part in choosing the strategy.
Where people slip in interviews
- “The p-value is 0.004, so it’s real.” Not if it’s the best of hundreds. Ask how many things were tried.
- Thinking a Sharpe of 1 is precisely measured. Over 4 years its standard error is 0.5.
- Counting only the strategies written up. Every parameter setting and data filter you looked at is a trial.
- Annualising with √252 when returns are autocorrelated. Positive autocorrelation makes the true annual vol higher, so the Sharpe is overstated.
- Reusing the hold-out. Once you’ve tuned against the test set, it’s a training set.
Try these before you open the answer
Warm-upA strategy has a measured Sharpe of 1.0 over 4 years of daily data. What is its t-statistic?Show answer
Borderline significant, and only if this was the only thing tried.
Sample sizeHow many years of data do you need for a true Sharpe of 0.5 to reach t = 2 on average?Show answer
MaxYou tried 20 uncorrelated variants on 3 years of data. What Sharpe do you expect the best one to show if none works?Show answer
BonferroniWith 100 tries and 5 years of data, what Sharpe does the best strategy need to pass a Bonferroni test at 5% (one-sided)?Show answer
P-valuesThe best of 100 noise strategies (5 years) shows Sharpe 1.2. What are the naive and the adjusted p-values?Show answer
. Naive: . Adjusted for 100 tries: . A best of 1.2 happens about a third of the time with no skill at all.
CorrelationYou ran 100 backtests, but they are 10 lookback windows on each of 10 signals, and different windows of the same signal are almost perfectly correlated. Roughly what N should you use?Show answer
About 10. Highly correlated variants behave like a single trial, so the effective number of independent tries is close to the number of distinct signals.
StretchWhy does selling out-of-the-money puts tend to show a high, unreliable Sharpe ratio?Show answer
The returns are many small gains and rare large losses: strong negative skew and fat tails. A short sample often contains no crash, so the measured volatility is too low and the Sharpe too high. The SE formula with and terms shows the estimate is noisier than the normal-returns rule suggests.
The table and the worked numbers were checked by simulating thousands of noise strategies. The figure simulates daily returns in your browser and draws the exact distribution of the maximum.