Why Your Backtest Is Lying to You
Everyone building a trading strategy for the first time makes the same mistake. They run a backtest, see a great Sharpe ratio, and think they have found something real. They have not. They have found a curve-fitted pattern that existed in their training data and probably nowhere else.
The three ways a backtest lies
Lookahead bias is the most common. It happens when your model accidentally uses information that would not have been available at the time of the trade. A moving average calculated on closing prices, used to generate a signal on that same day's close, is a simple example. You would never have known the close before it happened.
Survivorship bias is sneakier. If you backtest on the current S&P 500 constituents, you are testing on a list of companies that survived. The ones that went bankrupt or got delisted are gone from your dataset. Your strategy looks better than it would have in real life because the worst outcomes have been quietly removed.
Overfitting is the third. The more parameters you tune, the more your model learns the noise in your training data rather than a real signal. A strategy with 12 tuned parameters and a 15-year backtest has probably just memorized history.
What actually helps: walk-forward validation
Walk-forward validation splits your data into sequential windows. You train on the first window, test on the next, then slide forward and repeat. At the end you have out-of-sample performance across many periods, not one big in-sample number.
A strategy with a Sharpe of 1.2 in-sample and 0.3 out-of-sample is not a 0.3 Sharpe strategy. It is a strategy with no edge.
When I built my quantitative trading framework, walk-forward validation was non-negotiable. The in-sample Sharpe looked great. The out-of-sample number was lower (as it always is), but it was stable across windows. That stability is the actual signal.
The honest version
Most retail backtests are optimism dressed up as math. If you cannot show walk-forward results, transaction costs, slippage, and an honest account of what data you used and when, your backtest is not evidence of anything.