Independent education • Sponsored Deriv & Weltrade links • Trading involves risk
Process · Worked lesson

Backtesting without look-ahead bias

Historical testing must use only information available at each decision point. Candle close values, revised economic releases and clean historical datasets can leak future knowledge. Include spreads,…

Lesson at a glance

Historical testing must use only information available at each decision point. Candle close values, revised economic releases and clean historical datasets can leak future knowledge. Include spreads,…

Understand the mechanism

Historical testing must use only information available at each decision point. Candle close values, revised economic releases and clean historical datasets can leak future knowledge. Include spreads, commissions, variable slippage, session changes and realistic order handling. Separate training periods from out-of-sample evaluation to reduce overfitting to one market environment.

Before applying this topic in a live market, write down the information available before the decision. Distinguish a fact confirmed by a platform specification or official source from an interpretation drawn from a chart. If a key data point is missing, treat it as unknown rather than filling it with a convenient estimate.

Worked example or scenario

A strategy that enters on a candle after observing its final high and low in the same historical bar uses information the trader would not have had at the time.

The numbers and scenarios in this example are educational illustrations. They are not live quotes, account-specific contract terms, backtested guarantees or a suggestion to place this trade. Consider how the outcome changes when costs, a different contract multiplier, or a faster market are introduced.

Common mistakes and limitations

Changing ten parameters until the backtest looks perfect, then reporting the result as a verified edge.

Check whether any assumption depends on a fixed spread, a guaranteed fill, a historical relationship remaining stable, or the availability of a financial product in your country. In practice, execution rules and platform legal entities differ. A correct formula using an incorrect contract multiplier can still produce a dangerously wrong position size.

Four-point practical checklist

  1. 1

    Step 1

    Identify the exact instrument and contract terms before doing any arithmetic.

  2. 2

    Step 2

    State the risk and assumptions in account currency, not only in chart points.

  3. 3

    Step 3

    Check current primary-source information and write down what could invalidate the idea.

  4. 4

    Step 4

    Write down entry and exit rules first; test an untouched later sample only after those rules are frozen.

Practice assignment

Write down entry and exit rules first; test an untouched later sample only after those rules are frozen.

Complete the task in a journal, spreadsheet or demo account and keep a record of your assumptions. If you are unable to explain the possible loss in your own account currency, do not substitute a larger position for a missing calculation.

Reflect and self-check

Does understanding this lesson guarantee profit?

No. Understanding mechanisms helps evaluate decisions; it cannot predict market movements or remove trading losses.

Can I use this lesson with any broker?

The principles may transfer, but prices, product rules, contract multipliers, protections and country eligibility must be checked for each provider.

Risk note: Leveraged trading and fixed-outcome options can generate rapid or total losses. Regulators, legal entities and available consumer protections differ by country.

← All lessons Practise with calculators