Market Analysis

How to Backtest a Trading Strategy Without Fooling Yourself

4 min read

Last saved:

এই লেখাটি বাংলায় পড়ুন

How to Backtest a Trading Strategy Without Fooling Yourself

Executive Summary

  • ✦Make every entry, exit and sizing rule observable before testing.
  • ✦Use only information available at the historical decision time.
  • ✦Include spread, fees, slippage, financing and poor fills.
  • ✦Validate on untouched data and test sensitivity across regimes.

বাংলায় পড়ুন

Backtesting applies written trading rules to historical data to estimate how the process behaved across many past examples. It can expose weak assumptions, but it cannot guarantee future performance.

Learning objective

This lesson shows how to define testable rules, separate development from validation, include realistic costs and avoid common biases that make a strategy look better than it was.

Make every rule observable

A statement such as “buy a strong breakout” cannot be tested consistently. Define the instrument universe, timeframe, entry trigger, stop, exit, position size and any filters in terms that another person could apply without guessing.

Also state when no trade is allowed: missing data, excessive spread, scheduled events, insufficient volume or overlapping positions. Exclusion rules affect results as much as entry rules.

Use clean historical data

Check timestamps, time zones, splits, dividends, contract rolls and missing candles. A stock test that uses only companies surviving today suffers from survivorship bias. A futures test that joins contracts incorrectly can create prices that never traded.

Use only information that was available at the decision time. Entering at a candle's close based on that same completed close may be impossible without modelling the next executable price. This is look-ahead bias.

Separate development and validation

Build rules on one period, then test them on untouched data. A common structure is:

  1. In-sample: develop and refine the idea.
  2. Out-of-sample: evaluate it without changing the rules.
  3. Walk-forward: repeat development and validation through time.
  4. Paper or small-scale forward test: observe live data and execution before larger risk.

Repeatedly checking the validation set while adjusting rules turns it into another development set.

Worked example

Assume a hypothetical daily breakout system shows a £4,800 gross profit across 120 trades. Commission, spread and conservative slippage total £2,100, leaving £2,700 before tax. Ten trades produced £3,200 of that net result.

The strategy may have an edge, but the result is concentrated. The review should test what happens if the best few trades are removed, costs rise, entries slip by one more tick and market regimes are separated. If small changes destroy the result, the apparent edge may be fragile.

Measures to examine together

  • Number of trades and the period covered.
  • Win rate, average win and average loss.
  • Expectancy per trade after costs.
  • Maximum drawdown and recovery duration.
  • Exposure and capital required.
  • Results by year, instrument and market regime.
  • Sensitivity to nearby parameter values.

A high win rate can hide rare large losses. A strong total return can hide an intolerable drawdown. No single measure is enough.

Common mistakes

  • Choosing parameters that perfectly fit past noise.
  • Ignoring delisted assets or changing index membership.
  • Using future information in an earlier decision.
  • Excluding spread, commission, slippage and financing.
  • Testing many versions but reporting only the winner.
  • Treating correlated trades as independent observations.
  • Increasing position size without modelling drawdown and liquidity.

Backtest checklist

  • Are all entry, exit and sizing rules unambiguous?
  • Is the data adjusted and timestamped correctly?
  • Does each decision use only information available then?
  • Are realistic costs and poor fills included?
  • Is there an untouched validation sample?
  • Does performance persist across regimes and nearby parameters?
  • Are drawdown, concentration and capacity acceptable?
  • Is a forward test planned before meaningful capital is used?

The Money Man lesson

A backtest is an experiment, not a promise. Prefer simple rules, clean data, conservative costs and results that survive untouched samples and modest parameter changes. The purpose is to discover where a method may fail before capital finds out.

Educational information only. Historical and simulated results have limitations, may omit real execution conditions and do not predict future returns.

Share this post