Parameter Tuning Explained: Why the Best Lookback Window in a Backtest Usually Disappoints Later
November 11, 2026 · Guides · 8 min read
Published by Chris Leek, founder of Equity Rank
Almost every stock signal has settings. A momentum score needs a lookback window: one month, six months, twelve months. A value score needs a choice of ratio. A filter needs a threshold. Before a backtest is reported, someone usually tries several settings and keeps the one that looks best.
That step is ordinary, and it is also a form of multiple testing. The kept setting won partly because it was good and partly because it was lucky in that particular stretch of data. The luck does not repeat. This guide shows, in a hypothetical simulation, how much a tuned result can overstate, and what a reader can ask for to judge it.
Key Points
- Picking the best of several settings is a selection step. The winning setting's backtest includes the noise that made it win.
- Nearby settings are not independent tests. A 10-month and an 11-month lookback share most of their data, so trying 24 windows is fewer than 24 separate tries, but still many more than one.
- In a hypothetical simulation with no real skill, the best of 24 lookback windows showed about 1.3% a year and passed t above 2 in 20% of histories. The same window over the next ten years showed about 0.0%.
- With a real but modest effect, the tuned result was about 2.5% a year in the tuning period and about 1.4% afterwards. A window fixed in advance showed about 1.7% to 1.8% in both periods.
- Choosing the middle of a "plateau" of good settings did not fix this in the simulation. It is useful as a warning sign, not as a cure.
- The check: ask how many settings were tried, and judge the result on data that played no part in choosing them.
Why the best setting is too good
Each setting's backtest has two parts: the real effect, if any, and noise from the particular months and stocks in the sample. When the settings are ranked and the top one is kept, the top one tends to be the setting whose noise happened to be most favorable.
On new data the noise is fresh. The real part carries over and the lucky part does not, so the kept setting tends to do worse than its test result. This is the same mechanism as keeping the best of several different signals. (See The Winner's Curse in Signal Selection and Multiple Testing and the False Discovery Rate.)
Settings of one signal differ from separate signals in one way: they are closely related. A 10-month and an 11-month lookback rank stocks almost the same way, so their results move together. That makes the selection effect smaller than it would be for 24 unrelated signals, but it does not remove it. Settings that are far apart, such as a 2-month and a 20-month window, behave like quite different signals.
A hypothetical simulation
We simulated 1,000 stocks over 20 years, repeated 200 times. Each stock's monthly return had a market part and a stock-specific part. The signal was a stock's past return over a lookback window, and we tried every window from 1 to 24 months. Each month we formed equal-weighted top-fifth and bottom-fifth groups by the signal and measured the spread between them.
The first ten years were used to pick the window with the highest t-statistic. The last ten years were used only to check it.
We ran two versions. In the first, the signal had no link to later returns at any window. In the second, later returns had a real but modest link to the past 12-month return, and the other windows picked up part of that link to the degree they overlapped with it.
| Signal with no real link (average across 200 histories) | Annual spread | Typical t-statistic | Share of histories with t above 2 |
|---|---|---|---|
| Best of 24 windows, in the ten years used to pick it | 1.3% | 1.3 | 20% |
| Same window, in the next ten years | 0.0% | 0.0 | 2% |
| 12-month window fixed in advance, first ten years | 0.0% | 0.0 | 2% |
| 12-month window fixed in advance, next ten years | 0.1% | 0.1 | 1% |
| Signal with a real, modest link (average across 200 histories) | Annual spread | Typical t-statistic | Share of histories with t above 2 |
|---|---|---|---|
| Best of 24 windows, in the ten years used to pick it | 2.5% | 2.6 | 79% |
| Same window, in the next ten years | 1.4% | 1.4 | 33% |
| Middle of the best plateau, in the next ten years | 1.4% | 1.5 | 30% |
| 12-month window fixed in advance, first ten years | 1.7% | 1.8 | 43% |
| 12-month window fixed in advance, next ten years | 1.8% | 1.8 | 39% |
Hypothetical simulation from the stated assumptions; it does not represent any real security, index, strategy or Equity Rank output, and does not indicate future results.
Four things stand out.
Tuning alone produced a passing result one time in five. A single fixed window passes t above 2 by chance about 2% of the time, as expected. Trying 24 windows and keeping the best raised that to 20%. Because neighboring windows overlap, that is less than 24 unrelated tries would give, but it is about ten times the stated error rate.
The tuned result did not carry forward. With no real link, the chosen window's spread in the next ten years was about zero. Nothing in the tuning-period number warned of that.
With a real effect, tuning still overstated it. The tuned result in the tuning period was about 2.5% a year. The same window then showed about 1.4%. Part of the drop is the lost luck, and part is that the tuned window was often not the true one: the chosen window landed within two months of 12 in only about a third of histories.
A plateau rule did not help here. A common suggestion is to pick the middle of a range of good settings instead of the single peak. In this simulation it gave about the same result as the peak. Here the window fixed in advance happened to be the true one, which flatters it; in practice an advance choice can be wrong too. Its advantage is that its result is honest, not that it is always better.
What a plateau can and cannot tell you
A result that holds up across a wide range of nearby settings is more believable than one that appears only at a single setting and vanishes one step away. A lone, sharp peak is a warning sign.
A broad plateau is not proof, though. Nearby settings share most of their data, so they rise and fall together. A lucky stretch of data can lift a whole neighborhood of settings at once, and the plateau then reflects the same luck as the peak.
What to check in a backtest
- Ask how many settings were tried. Lookback windows, skip periods, thresholds, holding periods, ratio choices and stock universes all count, and they multiply. Five windows and four thresholds are twenty versions.
- Ask whether the reported setting was chosen before or after seeing the results. A setting fixed in advance and written down is a different kind of evidence from the best of a search.
- Ask for results on data that played no part in the choice. A later period, or a separate set of stocks, is the most direct check. (See Purged Cross-Validation and Embargo and Signal Stability and Subperiod Analysis.)
- Ask to see every setting, not just the best one. A table or chart across all the windows shows whether the result is a broad pattern or a single spike.
- Raise the bar for a searched result. The more settings were tried, the higher the t-statistic should be before the result is taken seriously. (See Deflated Sharpe Ratio and Probability of Backtest Overfitting.)
- Combine with the other checks. Tuning sits alongside the other ways a backtest can overstate evidence. (See Backtest Biases Explained and Universe Filter Look-Ahead.)
This content is for educational and informational purposes only and does not constitute investment advice. Equity Rank is not a registered investment adviser. All figures in this article are hypothetical illustrations computed from stated assumptions; they do not represent any real fund, security, strategy or Equity Rank output, and they do not indicate future results.