Platforms & AutomationHistorical Testing
Backtesting
Replaying a strategy's rules over historical price data to estimate how it would have performed before risking real money.
What Backtesting means
Backtesting runs a set of trading rules against stored price history and records every trade the rules would have produced, generating statistics such as net profit, maximum drawdown, profit factor, win rate and average trade. The purpose is elimination rather than prediction: a strategy that fails on history is unlikely to be worth funding, so a backtest is a cheap way to reject bad ideas. Both MetaTrader terminals include a strategy tester, and most scripting environments provide some equivalent.
Validity depends almost entirely on inputs. Tick data quality and the modelling method determine whether fills are realistic, since a tester that interpolates ticks from one-minute bars cannot know whether a stop or a limit was reached first inside that bar. The simulation must also charge the real costs of trading, including spread, commission, swap on positions held overnight and an allowance for slippage. Dividing the data into an in-sample period for development and a genuinely untouched out-of-sample period is the standard structural control.
The most important honest statement about backtesting is that past performance does not predict future returns. A backtest measures how rules interacted with one particular sequence of history that will never repeat exactly, and every additional parameter tuned against that sequence increases the chance the result is fitted noise. Treat the numbers as a lower bound on cost and an upper bound on performance, and never move to live trading on backtest evidence alone without a period of forward testing.
Worked example
A strategy showing 1,800 pips of profit over 400 backtested trades is actually break-even once a realistic 2.5 pip spread and 1.5 pip average slippage per round turn are deducted, since 400 trades multiplied by 4 pips of cost equals 1,600 pips.
Related terms
- Forward TestingRunning a strategy on live, unseen prices in demo or at minimal size to check that backtested behaviour survives real conditions.
- Curve FittingTuning a strategy so closely to historical data that it captures noise instead of a real edge, and fails on new prices.
- Expert Advisor (EA)An automated trading program written in MQL that runs inside MetaTrader and can place, modify and close orders without human input.
- Maximum DrawdownThe largest peak-to-trough equity decline recorded over a given period of trading or testing.
- Profit FactorGross profit divided by gross loss across a set of trades; any value above 1.0 indicates a net profitable system.
Frequently asked questions
What does Backtesting mean in forex trading?
Replaying a strategy's rules over historical price data to estimate how it would have performed before risking real money.
How does Backtesting work in practice?
Validity depends almost entirely on inputs. Tick data quality and the modelling method determine whether fills are realistic, since a tester that interpolates ticks from one-minute bars cannot know whether a stop or a limit was reached first inside that bar. The simulation must also charge the real costs of trading, including spread, commission, swap on positions held overnight and an allowance for slippage. Dividing the data into an in-sample period for development and a genuinely untouched out-of-sample period is the standard structural control.
What is an example of Backtesting?
A strategy showing 1,800 pips of profit over 400 backtested trades is actually break-even once a realistic 2.5 pip spread and 1.5 pip average slippage per round turn are deducted, since 400 trades multiplied by 4 pips of cost equals 1,600 pips.
Trade with a regulated broker
Understanding the terminology is the cheap part. The expensive part is choosing a counterparty whose execution, financing and withdrawal behaviour match what the marketing implies. Every broker below has been reviewed with a funded live account, and each review states which legal entity and which regulator applies to the account you would actually open.
Check the licence on the regulator's own register before you deposit — our regulators directory explains what each authority enforces, from leverage caps to compensation limits.