Basic Prerequisites: Probability & Measure Theory (order statistics, extreme-value distributions) and 01 · From Zero.
1. Intuition & Practical Objective
Test one hypothesis at the 5% level and you have a 5% chance of a false positive. Test 100 and the chance that at least one is a false positive - under the null of no skill anywhere - is 99.4%. This is the multiple-testing problem, and it is not a subtle statistical caveat: it is the arithmetic reason a large theory-free parameter sweep is guaranteed to “find” something.
The practical objective of this page is to put a number on the bar a backtest must clear once you admit how many trials it survived. Two equivalent framings:
- Extreme-value framing (Bailey & López de Prado): the reported Sharpe is ; its expected value under the null is a known order statistic of draws. (→ feeds the DSR, page 04.)
- -value framing (Harvey & Liu / White): the single-test -value must be inflated to a multiple-testing that reflects the search. (→ the haircut Sharpe.)
Both answer “how high does the bar go?”, and they agree in spirit: the bar rises with , slowly (logarithmically) but without limit.
2. Mathematical Ground Truth & Derivations
2.1 Family-wise error rate (FWER)
With independent tests at level ,
So : , , . Bonferroni controls FWER by inflating each : ; Holm applies the same idea sequentially, , and is uniformly more powerful. For thousands of tests FWER is too conservative, and the false-discovery-rate (Benjamini–Hochberg) controls instead the proportion of false rejections among the rejected (Harvey & Liu §“multiple testing framework”).
2.2 Expected maximum Sharpe under null trials
Let be i.i.d. trial Sharpe estimates with mean and variance (in per-period units). Standardize: . The expected maximum of standard normals has two standard forms:
EVT approximation (loose, ubiquitous):
Exact order-statistic form (used by the DSR):
The selection threshold in Sharpe units is then
The approximation is not innocent. The crude EVT form overstates the true expected maximum by ~28% at (3.225 vs 2.531) - using it makes you over-penalise a good strategy. Monte Carlo settles which is right (see §3). The order-statistic version is the one to use.
2.3 The Harvey–Liu haircut
Transform Sharpe to a -statistic, (net of any factor adjustment, non-annualized). Compute the single-test two-sided -value . Under independent tests the multiple-testing -value is
The haircut Sharpe is found by equating a single test’s -value to : solve and set . Because , . Harvey & Liu’s rule: the haircut is non-linear - very high Sharpes are barely penalised, marginal ones are heavily penalised (a flat 50% is wrong in both directions).
2.4 How many trials are optimal? The 1/e-law
Since each added trial raises the false-positive floor, there is an optimal stopping rule (the “secretary problem”, Bruss 1984): sample a random of the theory-justified configurations, measure them, then keep drawing one at a time until one beats all previous - take it. Every further trial after that is pure overfitting. Theory, not compute, should choose the search.
2.5 Independent vs effective
is the count of independent trials. If you ran correlated trials with average off-diagonal correlation , the implied independent count is
Using raw overstates the threshold; treating correlated trials as independent understates it. Report the full sweep and an estimate of - a strategy found among 1,000 correlated variants is often really ~10 independent bets (Bailey & López de Prado §A.3).
3. Computational Implementation - the three numbers
Stdlib only. (1) The expected-maximum table with Monte Carlo verification, (2) the Harvey–Liu haircut, (3) FWER and Bonferroni.
Three readings: (1) the exact order statistic tracks Monte Carlo (2.531 vs 2.507 at ) while the EVT approximation overshoots (3.225) - use the exact form. (2) An honest-looking annual Sharpe of 0.75 over 20 years is cut to 0.32 (a 57% haircut) once trials are acknowledged - closely matching the “50% discount” folklore, but derived rather than assumed. (3) Bonferroni’s adjusted -values reproduce Harvey & Liu’s textbook sequence exactly (only the first of six “discoveries” survives), and FWER at is 99.4%.
4. Failure Modes & First-Principles Breakdowns
- Counting trials you can remember. The denominator must include every configuration evaluated, including the exploratory ones you “weren’t really serious about”. Pre-register the search to know .
- Treating correlated trials as independent. Position sizing, stops, and filters applied onto one base signal produce thousands of dependent trials. Use .
- Using the EVT approximation. over-penalizes by ~28% at . For DSR the exact order statistic is the correct bar.
- FWER when you don’t need it. With thousands of tests, Bonferroni virtually never rejects; FDR (Benjamini–Hochberg) is the appropriate error rate and is what Harvey–Liu advocate for factor zoos.
- Treating as a final verdict. A non-rejection is not proof of falsehood; it is the statement that the result is not distinguishable from the best of flukes. Combine with DSR, PBO, and economics.
- Endless testing. Once the optimal-stopping point is passed, additional trials guarantee inflation - the secretary-problem rule is a hard discipline, not a suggestion.
5. References
- Bailey, D. H. & López de Prado, M.: The Deflated Sharpe Ratio (2014)
- Harvey, C. R. & Liu, Y.: Backtesting, JPM (2015)
- White, H.: A Reality Check for Data Snooping, Econometrica 68(5) (2000)
- Bruss, F. T.: A Unified Approach to a Class of Best Choice Problems, Annals of Probability 12(3) (1984)
- Bonferroni / Holm / Benjamini–Hochberg
6. Connected Graph Bridges
- Back: 02 · Why Backtests Lie · Index Hub
- Forward: 04 · The Deflated Sharpe Ratio (the order statistic becomes the DSR threshold) → 06 · PBO & Reality Check
- Base: Probability & Measure Theory · Cross-pillar: Financial ML Pitfalls