Suppose you backtest 100,000 strategies that have zero edge. On average about 5,000 of them pass a one-sided p < 0.05 test by luck alone. At p < 0.01 about 1,000 still pass, and at p < 0.001 about 100. A Bonferroni cut for the whole scan, 0.05/100,000 = 5e-7, brings the expected number of lucky passes down to 0.05. (100,000 is my own example scale.)
A post on X describes an open strategy library, "every single one fully backtested on years of real market data." I haven't checked that claim. A long list of backtested winners tells you nothing about edge until you know N.
Reproduce it
Each row is one strategy with zero-mean daily returns. A one-sided t-test checks whether the mean is above zero.
import numpy as np from scipy import stats rng = np.random.default_rng(0) N, days = 100_000, 252 r = rng.standard_normal((N, days), dtype=np.float32) * 0.01 # zero edge t = r.mean(1) / (r.std(1, ddof=1) / np.sqrt(days)) p = stats.t.sf(t, df=days - 1) # one-sided, H1: mean > 0 for a in (0.05, 0.01, 0.001, 0.05 / N): print(f"alpha={a:.0e} expected={N*a:,.2f} passed={(p < a).sum():,}") The expected column is N × alpha, so the number of lucky winners grows linearly with N. Under independence, the count at 0.05 has a standard deviation of about 69.
Count N honestly
N covers every rule, parameter set, market and timeframe you tried, including the ones you dropped. If N × threshold comes out in the thousands, a leaderboard with thousands of winners is exactly what noise alone would give you.
Correct the holdout by survivor count
A holdout period that played no part in selection removes most of the lucky winners, but with thousands of survivors it still lets hundreds through at an uncorrected threshold. Re-test the 5,000 zero-edge survivors at an uncorrected p < 0.05 and about 250 pass again. Divide by the survivor count instead, 0.05/5,000 = 1e-5, and the expected number of false survivors drops to about 0.05.
Limits
These are expected values for simulated noise (zero edge, normally distributed returns, no trading costs), and I didn't run the code, so the passed counts will differ from the expected column and change with the seed. Real strategies are often highly correlated, which puts the effective number of independent tests below N: the expected count is still N × alpha, but a single scan's count swings more, and 0.05/N ends up stricter than it needs to be.
For your own scan: count N, multiply it by your threshold before you look at the leaderboard, and re-test every survivor on an unused holdout at 0.05 divided by the number of survivors you carry into it.
This article was drafted with AI assistance.

