Skip to content

Testing strategies honestly

The limits of a backtest

Common ways historical tests mislead: overfitting, look-ahead, survivorship and missing costs.

Educational material only. Nothing here is investment advice, a recommendation or a forecast. Trading involves risk of loss.

Testing strategies honestly · 6 min read

A backtest describes the past

A backtest replays rules over historical data. It shows how those rules would have behaved on that data, under the test's assumptions. It does not predict future results.

Overfitting

Trying many parameter combinations and keeping the best one tends to select settings that fit noise in the sample. Results on data the rules have not seen are usually weaker.

Keeping a separate out-of-sample period, and testing a small number of reasoned settings, reduces this risk but does not remove it.

Look-ahead and data problems

Look-ahead bias happens when a test uses information that was not available at decision time, such as a candle's close before the candle finished.

Survivorship bias happens when the data only includes instruments that still exist today. Gaps, bad ticks and corporate actions can also distort results.

Costs and execution

Brokerage, taxes, spreads and slippage reduce results, and they matter more for strategies that trade often. A test that ignores them overstates what was achievable.

Sign in to keep track of the lessons you have completed.