TradersWiki

Strategies & testing

Designing a backtest

A backtest applies recorded rules to historical observations. Its result depends on what the simulation permits and excludes.

Write the rule before the result

This entry sets out an editorial testing protocol. Specify the instrument universe, time interval, signal, execution timing, sizing, exits and cost assumptions. Record the data version and every rule change so another person can reproduce the calculation.

Keep time in the right order

If a signal requires the final closing price of a bar, the simulation cannot assume an earlier fill based on that same final value. If both a stop and a target appear within one price bar, the bar alone may not establish which came first. Use finer data or state a conservative ordering assumption.

A reproducible comparison

Compare a baseline rule with one defined modification using the same sample and costs. Keep a later period separate from rule selection. If you alter the rule after inspecting that period, it is no longer an untouched check. Report how many variants were tried, including the unsuccessful ones.

A report that can be checked

Include dates, data source, trade count, net return, drawdown, costs and execution assumptions. Label simulated results clearly. Keep the trade ledger with the report. A favourable historical result does not show that the rule will work in future or survive live execution.

Sources & method

This entry presents a suggested working method. It does not claim a demonstrated improvement in trading performance.