Backtesting means applying a defined set of rules to historical data to see how they would have performed. It is one of the best tools a trader has, and one of the easiest to misuse. This article explains a simple, honest process and the traps to avoid.

Start with written rules

You cannot test an idea you cannot describe. Write down, in plain language:

  • What conditions must be present before you take a trade?
  • Exactly where is the entry?
  • Where is the stop, and how is it chosen?
  • Where is the target, or how is the trade exited?
  • Which sessions and instruments are included?

If a rule contains the word "feels" or "looks good", rewrite it until someone else could apply it and reach the same answer.

Choose your data

Use a long enough period to include different market conditions: trends, ranges, quiet times and volatile times. A test covering only three weeks of a strong trend says very little. Use at least a few dozen trades, ideally more than a hundred, before drawing any conclusion.

Record every trade

For each test trade, record the date, direction, entry, stop, exit, result in R (multiples of the amount risked) and a short note. Include every trade that met your rules. Skipping the ugly ones defeats the purpose.

Avoid hindsight bias

When scrolling through a chart you already know what happens next. To reduce this bias:

  • Hide the right side of the chart and advance one candle at a time.
  • Make your decision before revealing the next candles.
  • Do not adjust rules after seeing a specific loss.

Consider costs

Include spreads, commissions and swap. A strategy that makes a small profit before costs can easily be unprofitable after them, particularly on short timeframes with tight targets.

Look at more than the win rate

Review these figures:

  • Average win and average loss in R.
  • Expectancy: the average result per trade, in R.
  • Maximum drawdown: the worst peak-to-trough decline.
  • Longest losing streak. Could you tolerate it emotionally and financially?

Beware of overfitting

If you keep adjusting rules until the past results look good, you may have described the past rather than found something that works. A useful safeguard is to develop the rules on one period and test them untouched on another. If results collapse on the second period, the rules were probably over-fitted.

Forward testing

After a promising backtest, trade a demo account or very small size for a period. Real-time conditions bring slippage, hesitation and decisions that historical scrolling cannot reproduce.

Be ready for a modest result

Many ideas, when tested honestly, turn out to have no clear edge. That is not wasted effort. Finding this out on paper is far cheaper than finding it out with real capital.

A note on promises

Past performance, including your own test results, does not guarantee future results. Treat any backtest, yours or someone else's, as a source of questions rather than proof.

This article is educational and is not investment advice.