Backtesting is running a set of trading rules against historical data to see how they would have performed. It's how you separate a real idea from a hunch — but only if you avoid the traps that make dead strategies look alive.

What a backtest actually tells you

A good backtest gives you a rough sense of a strategy's behavior: its win rate, its typical drawdown, how it acts in trends vs ranges. It is evidence, not proof — the future is never a replay of the past (backtest vs forward test).

The traps that make it lie

Look-ahead bias: accidentally using information the strategy couldn't have known in real time (look-ahead bias). Overfitting: tuning to noise (overfitting). Ignoring costs: forgetting slippage and fees (slippage). Survivorship bias: testing only on names that survived (survivorship bias).

A backtest doesn't tell you what will happen. At best it tells you what would have happened — and only if you didn't cheat, usually by accident.

The honest workflow

Test in-sample, validate out-of-sample, use realistic costs, then forward test on paper before risking a dollar — because live behavior always differs from the cleanest backtest (paper trading, walk-forward optimization).