Every options backtest has parameters. Which delta to sell, how many days to expiration (DTE) to enter at, when to take profit, when to stop out. Each parameter looks harmless. Together they turn a backtest into a search, and a search always finds something.

Overfitting, also called curve fitting, is what happens when those parameters get tuned to the noise of one historical period instead of to a real edge. The backtest looks excellent. Live results don't. Bailey, Borwein, López de Prado and Zhu (2014) showed how little searching it takes: with five years of data, trying about 45 independent variants is enough to expect one with a Sharpe ratio of 1 from luck alone.

This post shows how large the luck effect is, how to choose parameters so they don't chase it, and how to check a result before trusting it.

Why the best backtest is always too good

Start with a classroom. Ask 100 students to flip a coin 20 times each. The chance that a given student gets 15 or more heads is about 2%. The chance that at least one of the 100 does is about 88%. Nobody concludes that student has a gift for coins.

A parameter sweep invites exactly that conclusion. Each combination of delta and DTE is one student. Its Sharpe ratio, the annualized return per unit of volatility, is partly signal and partly the luck of that particular sample. When you pick the top cell, you also pick the cell with the most favorable luck. The 99 others are forgotten.

In plain terms: the winner of a search is biased upward, even when the strategy behind it is sound.

The luck bar: how high pure noise can reach

Bailey et al. (2014) give a formula for how high the best of N trials goes when none of them has any edge. With y years of data, the annualized Sharpe ratio of a no-edge strategy has a standard deviation of about 1/√y. The expected best of N such trials is:

E[max SR] ≈ [(1 − γ) · Φ⁻¹(1 − 1/N) + γ · Φ⁻¹(1 − 1/(N·e))] / √y

where:

  • N is the number of independent parameter combinations tested.
  • y is the length of the backtest in years.
  • Φ⁻¹ is the inverse of the standard normal distribution; for example, Φ⁻¹(0.975) ≈ 1.96.
  • γ ≈ 0.5772 is the Euler–Mascheroni constant, and e ≈ 2.718.
  • The result is an annualized Sharpe ratio, assuming the true Sharpe ratio of every trial is zero.

Call this number the luck bar. It is the same idea as the threshold SR₀ in our post on the Deflated Sharpe Ratio, with the spread of trial results set to what pure noise produces.

More trials raise the bar, but slowly. Going from 10 to 1,000 combinations roughly doubles it.

More data lowers the bar, also slowly. It falls with the square root of time, so four times the data only halves it.

Combinations tested 2 years 5 years 10 years
10 1.11 0.70 0.50
45 1.58 1.00 0.71
100 1.79 1.13 0.80
1,000 2.30 1.46 1.03

Expected best annualized Sharpe ratio among N strategies with no edge. Computed from the Bailey et al. (2014) formula.

The rule of thumb: for 100 combinations, the luck bar is about 2.5 divided by the square root of your years of data. For 1,000 combinations, use about 3.3. A 5-year backtest with a Sharpe ratio of 1.2 says little if it was the best of 1,000 cells, because noise alone is expected to reach 1.46.

Turn it around and you get the minimum backtest length. To keep the luck bar below a Sharpe ratio of 1, you need 5 years of data for 45 combinations, 6.4 years for 100, and 10.6 years for 1,000.

Grids grow faster than they feel. Five deltas, four DTEs, three profit targets and four stop-loss levels make 240 combinations. Over 5 years, their luck bar is 1.26.

A worked example: a grid with no edge at all

Build a grid of 100 short-put variants: 10 deltas from 5 to 50, and 10 entry DTEs from 15 to 60. Now give every variant zero edge. Its daily returns are random draws with a true Sharpe ratio of zero. Use 5 years as the backtest and hold back the next 2 years as out-of-sample data. The simulation is seeded, so the numbers are reproducible.

Here is what the search finds:

  • The best cell, 30 delta and 25 DTE, shows an in-sample Sharpe ratio of 1.08, close to the luck bar of 1.13 from the table.
  • 14 of the 100 cells clear a Sharpe ratio of 0.5.
  • In the 2 held-back years, the winner's Sharpe ratio is 0.22.
  • Across all 100 cells, the correlation between in-sample and out-of-sample Sharpe ratios is −0.05.

Scatter plot of 100 no-edge short-put variants. In-sample Sharpe ratio over 5 years on the horizontal axis, out-of-sample Sharpe ratio over 2 years on the vertical axis. The best in-sample cell, 30 delta and 25 DTE, sits at 1.08 in sample and 0.22 out of sample. A dashed line marks the luck bar of 1.13. The correlation is −0.05. Each dot is one variant with zero true edge. The in-sample winner (teal) lands near the luck bar, then falls back toward zero once the data is new. Simulated data, seeded.

Nothing in this grid works. Yet a trader looking only at the top cell would see a respectable strategy with a clean story: "30 delta, short-dated." The story arrives after the number.

Here the winner merely falls back to zero. Bailey et al. (2014) show it can be worse. When returns have memory, such as serial correlation, the best in-sample configurations tend to do worse than the rest out of sample.

How to choose parameters

Keep the grid small and count it honestly. Every combination counts, including runs from earlier sessions and ideas you dropped after a quick look. Bailey et al. (2014) argue that a backtest can't be judged without knowing how many trials produced it. Compare your result to the luck bar for your count. If they are close, the result isn't evidence yet.

Use coarse steps. The difference between 16 and 17 delta is mostly noise. Fine steps add little information and invite you to pick the luckiest of near-identical variants. Space each dial so that neighboring settings are meaningfully different trades.

Choose a plateau, not a peak. A real effect rarely lives in one cell. If 30 delta works, 25 and 35 delta should work somewhat too. In the worked example, the 8 neighbors of the winning cell average a Sharpe ratio of −0.22, against the winner's 1.08. That is what an isolated spike looks like. A practical rule: rank cells by the average of each cell and its neighbors, then pick the center of the best region, even if it isn't the single top cell.

How to check the test

Hold out data and touch it once. Decide the split before any testing. If you retune after seeing the holdout, it becomes in-sample data, and your trial count grows.

Judge out-of-sample results against their own noise. A single strategy tested over y years has a Sharpe ratio standard error of about 1/√y. So the Sharpe ratio times √y works like a t-statistic: below about 2, the result can't be told apart from zero at the usual 95% level. An out-of-sample Sharpe ratio of 0.8 over 2 years gives 1.13. That is neither evidence for an edge nor against one. To clear 2 in two years, a strategy needs a Sharpe ratio of 1.41. Short holdouts catch large failures, not small edges.

Walk forward. Repeat the tune-then-test cycle through time: choose parameters on years 1 to 5, test on year 6, roll forward a year, repeat. Join the test years together and judge that series. If the chosen parameters jump around from window to window, the optimum is noise. Bailey et al. (2017) take this further with the probability of backtest overfitting: across many splits of the data, how often the in-sample winner ranks below the median out of sample.

Make sure the test period includes a different regime. A short-put grid tuned on calm years should be tested on a volatility spike such as March 2020. A parameter set that only survives one kind of market is fitted to that market.

Deflate the final number. Once the parameters are chosen, the Deflated Sharpe Ratio turns the trial count and the shape of returns into a confidence level for the result.

What these checks don't tell you

The formula assumes independent trials. Neighboring cells in a grid are correlated, so the effective number of trials is smaller than the raw count. The table then overstates the bar somewhat. Bailey et al. (2014) suggest reducing correlated trials to an effective count first, for example with principal components.

It assumes normal returns. Short premium strategies have negative skew and fat tails. The Deflated Sharpe Ratio adds that correction; the luck bar alone does not.

Passing is necessary, not sufficient. Bailey et al. (2014) describe the minimum backtest length in exactly those terms. A strategy can clear every check here and still fail because of flawed fills or data, which is a separate problem.

No test sees the future. Out-of-sample data is still the past. A regime the history never contained can break any parameter set.

Where Quantropy fits

Quantropy turns plain-English strategy descriptions into backtests on trade-level historical options data, and lets you compare variants side by side. Parameter optimization guided by optimization algorithms: running a grid of deltas, DTEs and exits in one go. The checks in this post are what make such a grid useful: count the trials, look at the neighborhood, and keep data aside for the test. Join the waitlist.

This post is for educational purposes only and does not constitute financial or investment advice. Options trading involves substantial risk of loss and is not suitable for all investors. Backtested results are hypothetical, have inherent limitations, and do not guarantee future performance.

Sources

  1. Bailey, D. H., Borwein, J. M., López de Prado, M., & Zhu, Q. J. (2014). "Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance." Notices of the American Mathematical Society, 61(5), 458–471. Proposition 2.1, Theorem 3.1, Sections 5–6. https://doi.org/10.1090/noti1105
  2. Bailey, D. H., Borwein, J. M., López de Prado, M., & Zhu, Q. J. (2017). "The Probability of Backtest Overfitting." Journal of Computational Finance, 20(4). https://doi.org/10.21314/JCF.2016.322
  3. Bailey, D. H., & López de Prado, M. (2014). "The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality." Journal of Portfolio Management, 40(5), 94–107. https://papers.ssrn.com/abstract=2460551