Minimum Backtest Length (MinBTL): how long must a backtest be? — with a calculator
The Minimum Backtest Length (MinBTL) answers the question that decides whether your backtest is
evidence at all: given that you tried N strategy variants, how long must the test window be before the
best variant's Sharpe ratio cannot be produced by selection alone? Bailey, Borwein, López de Prado and
Zhu (2014) proved the uncomfortable direction of this: for any target Sharpe, there is a number of trials
N at which pure noise is expected to deliver it. MinBTL inverts that result. Try 45 variants and
keep the best at Sharpe 1.0 on daily data, and you need about 5 years of history for that Sharpe to even
begin to mean something — below that length, noise alone was expected to do it. The calculator runs
entirely in your browser; nothing is uploaded. The same check runs inside every
AlphaAssay verdict; its failure code is BACKTEST_TOO_SHORT_FOR_N.
How long must a backtest be for N tried variants?
The default inputs (45 trials, Sharpe 1.0, daily data) reproduce the 1,260-observation row in the table below — same formula, same defaults.
What does the minimum length look like as trials pile up?
| trials N | claimed Sharpe | MinBTL (daily) | reading |
|---|---|---|---|
| 10 | 1.0 | ≈ 625 obs · 2.5 years | a modest grid search already demands years |
| 45 | 1.0 | ≈ 1,260 obs · 5.0 years | a weekend of tuning needs half a decade of data |
| 100 | 1.0 | ≈ 1,614 obs · 6.4 years | most parameter sweeps live here |
| 500 | 1.0 | ≈ 2,349 obs · 9.3 years | an optimizer run — nearly a decade required |
| 45 | 2.0 | ≈ 315 obs · 1.2 years | a genuinely large edge shortens the sentence |
| 45 | 0.5 | ≈ 5,039 obs · 20.0 years | a small Sharpe from a search is untestable in practice |
Read the second row again: 45 variants is not an industrial optimizer, it is one honest weekend of iteration — and it already consumes five years of daily history. Every additional trial raises the floor, and the trials you deleted count too.
The formula, step by step
Step 1 — what noise is expected to achieve. Under N independent no-edge trials, the expected
maximum Sharpe per observation over a window of T observations is approximately
E[max SR] ≈ (1/√T) · [(1−γ)·z(1−1/N) + γ·z(1−1/(N·e))],
with γ ≈ 0.5772 (Euler–Mascheroni) and z the standard-normal quantile.
Step 2 — invert for T. Set that expectation equal to your claimed per-observation Sharpe
(annualised Sharpe ÷ √periods-per-year) and solve:
MinBTL = ( [(1−γ)·z(1−1/N) + γ·z(1−1/(N·e))] / ŜR )² observations.
Step 3 — read it as a floor, not a target. At exactly MinBTL, your claimed Sharpe equals what selection over N noise trials was expected to produce — so a backtest of that length is the minimum at which the claim stops being automatic. Longer is evidence; shorter is arithmetic.
MinBTL or MinTRL — which one do you need?
They answer different interrogations. MinTRL asks how long a single track record must be before its Sharpe clears a benchmark at a chosen confidence — no selection involved. MinBTL asks how long a backtest must be before the best of N results is distinguishable from selection. If you ran one pre-registered test, MinTRL is your number. If you tried variants — and you did — MinBTL binds first, and it grows with every trial. The Deflated Sharpe Ratio is the same accounting applied to the result instead of the length.
What MinBTL cannot see
MinBTL prices exactly one failure mode: selection under multiple testing. Look-ahead leakage,
survivorship in the data, unrealistic costs and regime luck all survive a backtest of any length — a
ten-year backtest of a leaking signal is ten years of leak. That is why length is one check inside
a battery, not a verdict by itself: an AlphaAssay fail names which gate killed
the signal, and BACKTEST_TOO_SHORT_FOR_N is only one of the
documented causes of death.