Strategy Research

Backtesting, holdouts and leakage

On this page

Learning objective

Split data in time order and document when orders could fill, what they cost and what remains unfilled. Use out-of-sample testing to check dependence on data already seen.

Lesson

Split data chronologically. Use the training period for rules, the validation period for tuning and a sealed test period as a final check. If you change rules afterwards, reserve a fresh future holdout.

A signal known only at today’s close cannot trade at today’s open. Record signal availability, first executable time and data revisions. Model commissions, spreads and slippage.

Test across rolling windows, different regimes and harsher cost assumptions. Report how many versions you tried and the adverse results so others can assess selection bias.

Worked exercise

A strategy makes +12% in training and −2% after costs on the holdout. Write what this supports and propose a follow-up without reusing the old test window.

Can a holdout still provide final validation after it influences tuning?

Once a holdout influences parameters, filters or selection, it has taken part in design. Keep the current run on record, reserve an untouched later window for the revised version and apply fixed evaluation rules.

Student comments

Further reading

4 articles