Home › Academy › Factor and quantitative investing
Professional · Lesson 3 of 4Backtesting without fooling yourself
A backtest applies rules to historical data. Common traps: look-ahead bias (using data you would not have had at the time, such as revised earnings), survivorship bias (testing only companies that still exist), data snooping (trying hundreds of rules and keeping the best), and ignoring costs, slippage and taxes.
Good practice: define the hypothesis first, use point-in-time data including delisted companies, keep an out-of-sample period untouched until the end, apply realistic costs, and test robustness by varying parameters. Harvey, Liu and Zhu (2016) argued that because so many factors have been tested, new ones should clear a much higher statistical bar (t-statistic above about 3).
Then paper trade (Vestora Paper trading) before risking money.
Key takeaways
- Avoid look-ahead, survivorship and data-snooping bias.
- Hold out data and include realistic costs.
- Demand a higher statistical bar for new strategies.
Check your understanding
1. Testing a strategy only on companies in today's index is an example of...
- Look-ahead bias
- Survivorship bias
- Overfitting
- Slippage
Show the answer
Survivorship bias. Failed companies are missing from the sample.
2. Why keep an out-of-sample period untouched?
- To save time
- To test whether the rule works on data not used to build it
- For tax reasons
- It is required by law
Show the answer
To test whether the rule works on data not used to build it. It guards against overfitting.
Go deeper
- Wikipedia: Backtesting
- YouTube videos: backtesting pitfalls survivorship bias look ahead bias
- Investopedia: backtesting
- Wikipedia: Survivorship bias
- Wikipedia: Data dredging
Practise this in Vestora
Look up real shares, test ideas with paper trading, and track your progress through the course.
Open the app freeGeneral education only, not financial advice. Examples are illustrations. Rules, tax settings and products change; check official sources.