A backtest examines rules against past observations. It is most useful when another person could follow the same rules and understand how each result was recorded.
Write the rules first
Specify the instrument, timeframe, setup conditions, entry, invalidation and exit. Include exclusions and the rule for deciding that there is no trade. Name this version before the first example.
Record the period you intend to examine. Choose it before looking at the outcomes rather than selecting only attractive sequences. Note missing data and exclude unavailable periods transparently.
Separate development and evaluation
Use one period to develop or clarify the rules and another, previously unexamined period to evaluate them. If you adjust the method after seeing that evaluation, it becomes part of development and needs a fresh evaluation sample.
Keep the instrument and execution assumptions consistent across comparisons. A change in costs, exits or exclusions can make earlier and later results incomparable.
Record every eligible example
- Date, instrument and rule version.
- Information available at the decision point.
- Entry, invalidation, exit and any simulated costs.
- Gain or loss expressed using a consistent unit.
- Reason for exclusion or deviation from the rules.
Avoid using future candles to justify an entry. The Replay session guide explains how to keep the observation process explicit.
Review more than the total gain
Report the number of examples, gains and losses, consecutive losses and the largest observed drawdown. Check whether one short period or a few exceptional trades explain most of the result.
Split the sample by period and, when relevant, by direction. A positive combined result can hide a weak later period or a different result for buy and sell examples.
State the limits
A small sample, incomplete history and unmodelled execution costs limit the conclusions. Preserve the original record and label changed rules clearly. Historical results do not guarantee future performance.