Learn / Track VI / lesson 2 of 5
Overfitting and the deflated Sharpe ratio
Why the best of many backtests is almost always worse than it looks, and how to correct for how hard you searched.
The selection problem
Try enough variations of a strategy and one will look excellent purely by chance. The best result from a search is a biased estimate of the truth, and the bias grows with the number of trials.
Suppose every variant you try has a true Sharpe of zero. With independent trials, the expected maximum Sharpe you will observe is approximately
where is the inverse normal CDF, is the Euler–Mascheroni constant, and is the standard deviation of the Sharpe estimates across trials. For 100 trials this is roughly ; for 1,000, about .
With three years of daily data, the standard error of an annualised Sharpe is about 0.58. Test 100 worthless strategies and the best will show an annualised Sharpe of around 1.4. Test 1,000 and the winner shows about 1.9. Neither has any edge.
The deflated Sharpe ratio
Bailey and López de Prado’s deflated Sharpe ratio (DSR) asks: given how many trials you ran, and given the skewness and kurtosis of the returns, what is the probability that the true Sharpe exceeds zero?
Here is the per-period Sharpe, the number of observations, and the skewness and kurtosis, and the expected maximum Sharpe under the null from the formula above. A DSR above 0.95 is reasonable evidence of a real edge. Run it on your own numbers with the Sharpe significance tool.
Notice the denominator: negative skew and fat tails increase the uncertainty of the Sharpe estimate, so strategies that sell tail risk need even more evidence.
Symptoms of an overfit strategy
- Many parameters relative to the number of trades.
- Oddly specific values (an RSI period of 13, a stop at 2.37 ATR).
- Performance that collapses when a parameter moves a little — a sharp peak rather than a broad plateau in parameter space.
- Great in-sample results, ordinary or negative out-of-sample.
- A narrative invented after seeing the backtest.
Defences
- Count your trials honestly, including the ones you abandoned, and deflate.
- Hold out data you never touch until the very end — and only once.
- Prefer plateaus to peaks: choose parameters from the middle of a broad region of good performance.
- Fewer degrees of freedom: simpler rules, fewer filters.
- Validate properly: walk-forward and purged cross-validation.
- Demand a reason: an economic or behavioural story for the edge, stated before testing.
The vault is a superb idea library, but every published backtest in it is the survivor of an unknown number of trials by its author. Treat each one as a hypothesis to re-test on fresh data with honest costs, not as evidence.