Choose Indicator Lookbacks for Stability, Not Peak Backtest Performance
Summary
The document addresses how to select lookback lengths for trading indicators, warning against searching for the single period with the best historical result. Repeatedly optimizing a parameter on the same data creates data-snooping bias and can make a strategy appear more effective than it is likely to be in future trading.
Instead, it recommends checking whether the strategy remains reasonably stable across a range of lookback lengths. Large performance differences among nearby choices are presented as a warning that the system may fail out of sample. The answer gives a general robustness principle rather than a specific testing protocol: it does not define an acceptable range, stability threshold, or validation design, so those choices still need to be made carefully.
Key ideas
- Selecting the lookback with the best historical result can introduce data-snooping bias.
- Assess whether a strategy performs consistently across a range of lookback lengths.
- Large differences across nearby lookbacks may indicate poor out-of-sample robustness.
- The guidance does not specify a stability threshold or a complete validation procedure.
Tags
Full text
# How to find optimal look back in quant trading models # How to find optimal look back in quant trading models I'm in the process of building a quantitative trading model, I want to improve on the way in which I decide upon a look back length for the indicators. I understand the different pros/cons for very short and very long look backs, but rather I want to assess what the optimal length is between say 20-days, 30-days, or in between. I feel the choice of 20 or 30 is done without thinking to much and just because it is round, which seems lazy to me. Is there a better method? ## Answer by vonjd (score 6, accepted) https://quant.stackexchange.com/a/14151 I think you are having it backwards: Optimising your lookback period is a sure recipe for disaster because it introduces data snooping bias. To develop a robust trading strategy you have to check whether it is sufficiently stable with different lookback periods (e.g. in a certain range). If results differ significantly that is a good sign that your system won't work out-of-sample! I agree with you that many people do these things without thinking and are indeed lazy... this is one of the reasons why so many trading systems fail under real-world conditions.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.