Get My Trading BotGet My Trading BotBuild, test and learn

What Is Backtesting? A Beginner Guide

Understand how historical strategy testing works, what common metrics mean and why past results can be misleading.

Backtesting applies strategy rules to historical market data to estimate how the rules would have behaved. It is a research tool, not a prediction of future profit.

EXPLANATION DIAGRAM

What a backtest actually does

Historical candles are replayed through the strategy rules to create hypothetical entries, exits and performance metrics.
REAL PLATFORM EXAMPLES

See the concept inside GetMyTradingBot

Historical strategy preview showing a three-year backtest, profit and loss, return, win rate, total trades, drawdown and candles used
Historical Strategy PreviewThis historical simulation reports several metrics together. Backtested P&L and return must be read alongside win rate, trade count, maximum drawdown and the amount of historical data used.
Backtest diagnostics showing EMA settings, winning and losing trades, average win and loss, largest win and loss and exit reasons
Backtest diagnosticsDiagnostics help explain how a result was produced. Review indicator settings, average wins and losses, and exit reasons instead of relying on headline return alone.

What a backtest measures

A backtest recreates hypothetical entries and exits from past candles. It can summarize completed trades, profit and loss, win rate, drawdown, average win, average loss and expectancy.

Why results can be unrealistic

Historical tests may assume cleaner fills than real trading. Results can also be distorted by missing costs, future information accidentally used by the strategy, survivorship bias or excessive parameter tuning.

  • Include commissions, spread and slippage assumptions.
  • Use only information available at each historical candle.
  • Test different market periods.
  • Keep an untouched out-of-sample period.

Metrics to review together

No single metric tells the full story. A high win rate can still lose money when average losses are much larger than average wins. Strong return can hide an unacceptable drawdown.

What to do after a backtest

Review individual trades, test nearby parameter values and then forward test with paper trading. A stable strategy should not depend on one exact setting or one unusually favorable period.

COMMON QUESTIONS

Frequently asked questions

How much historical data should I use?

Use enough data to include different conditions such as rising, falling and sideways markets. The appropriate amount depends on the timeframe and trade frequency.

Can backtesting predict future returns?

No. It describes hypothetical historical behavior under specific assumptions.

What is overfitting?

Overfitting happens when a strategy is tuned too closely to past data and captures noise that may not repeat.

Risk reminder: This educational article does not provide investment advice. Backtested and paper-trading results do not guarantee future performance.