Backtesting guide

How to backtest a forex strategy

A useful backtest starts before you press Run. Write the rule, choose a comparison, include costs, separate development data from confirmation data, and inspect the trades that produced the summary.

  1. 1. Write one testable rule

    Replace words such as ‘strong trend’ with a price, indicator or time condition that another person can reproduce.

  2. 2. Fix the market and dates

    Choose the pair, timeframe and date range before seeing the result. Keep a later period untouched for confirmation.

  3. 3. Include costs and trade count

    A high-frequency rule can look profitable until the spread is deducted. Always show net pips and the number of trades beside win rate.

  4. 4. Compare against a control

    Test the default against nearby values or a simpler rule. Without a control, one candidate always comes out on top, which proves nothing on its own.

  5. 5. Replay the trades

    Open winners and losers on the chart. This catches fill assumptions and signals that fired where you didn't intend, which the summary table hides.

  6. 6. Confirm, do not optimize again

    Run the chosen rule on untouched dates or another pair. If you tune again, those dates become development data.

Practical guides

Concrete examples of building rules, logging practice and choosing a tool.