Category
Performance
Difficulty
Beginner
Used in
BacktestingEA evaluation

Backtest

A simulation of an EA's trading rules applied to historical price data to estimate how the strategy would have performed in the past.

also: historical simulation, strategy test, back-test

Updated

In plain English

Running the EA's rules over price history to see what it would have done. It records a simulation, not a forecast — and how much the two share depends entirely on how you set the simulation up.

Why it matters

A backtest is the only evidence most EAs ever offer, so knowing what it can and cannot establish is most of EA evaluation. It rules a strategy out cheaply and shows that the rules match the description; what it cannot do is predict, and almost every disappointing purchase comes from reading it as though it could.

  • It is falsifiable in a way marketing copy is not. A backtest names a data source, a date range and a cost model, so a buyer can ask whether the run is reproducible — and an EA that will not name them has told you something.
  • It is the cheapest place to fail. Rules that lose money on history will not start winning live, so a backtest removes candidates for the price of an evening's compute.
  • Its result is a range, not a number. The same rules on different data sources, spreads and start dates produce a spread of outcomes, and the width of that spread is the finding.

Using it to validate a strategy

Where it is used

  • Screening a strategy idea before any money or forward-testing time is committed to it.
  • Establishing the trade frequency, the average holding time and the worst losing streak a deployer should expect.
  • Producing the published figures on an EA listing — profit factor, drawdown, win rate — which is why the run's provenance is part of the claim.
  • Re-running an existing EA on a newer data window to check whether its behaviour has drifted.

What a reliable result looks like

  • The data source, the date range and the tester model are all stated, so the run can be reproduced rather than believed.
  • The run models spread and commission at realistic levels rather than leaving them at an ideal fixed value.
  • The window spans several market regimes — at minimum a trending period, a ranging period and one stressed period.
  • Nobody tuned the rules on the window being reported, or if they did, the listing shows an untouched out-of-sample window beside it.
  • The trade count is in the hundreds, so the headline statistics are not carried by a handful of outliers.

Warning signs

  • A screenshot of an equity curve with no data source, no date range and no trade count.
  • A window that starts conveniently: an EA whose test begins after the last crisis chose its own exam paper.
  • Parameters quoted to implausible precision, such as a 37-period average with a 23.7-pip stop.
  • A modelling quality figure that came from a template rather than a run. MT5's Model 0 generates ticks from M1 bars; only Model 4 replays recorded ones. The schema behind these listings defaulted the field to 99, so a Model 0 run displayed '99% modelling quality, against a 92% minimum' until that default was removed on 2026-08-06.
  • Results shown only on the one instrument the author optimised on.

Backtest vs live trading

  • Fills are optimistic. The tester assumes the order reached the market at the modelled price; live execution adds slippage, requotes and latency, and all three cost money.
  • Costs are static. A backtest with a fixed spread misses the widening that happens around news and at the session roll, which is exactly when many strategies trade.
  • The market has already happened. The test window contains no regime the strategy has not been shown; live trading eventually supplies one.
  • Expect a live profit factor and expectancy below the tested figures. A moderate gap is normal; a sign change means the test was priced wrong or the rules were fitted.
  • The gap is measured here. Across the fourteen listings on this site, backtest profit factors sit between 1.23 and 1.53, while the thirteen post-listing out-of-sample windows opened so far run from 0.72 to 6.43 on seven to 142 trades — two below 1.0, including the one with the second-best backtest of the set. That is what samples that small look like, in both directions.

Recommended validation method

  1. 1Fix the cost model first — realistic spread and commission — then run, rather than tuning on ideal fills and adding costs at the end.
  2. 2Reserve an untouched window before optimising anything, and do not look at it until the rules are final.
  3. 3Re-run on a second data source. Two sources that disagree by more than a little are telling you the result depends on the data, not the rules.
  4. 4Vary the start date by a few weeks and re-run. A result that survives only one start date is not a result.

Example

One EA, one window, four tester runs differing only in the fixed spread written into the settings file.

Fixed spread set to 20, 30, 40 and 60 points
four identical reports
MD5 of all four report files
471C1CE24EC24E669C20BD2B01EBB8A3
621,050 bytes each — the setting moved nothing.

Measured on GBPJPYm on 2026-07-31, which is why that listing publishes no spread figure; a later in-tester recorder put the mean at 19.14 points.

Calculation 20 / 30 / 40 / 60 points → one byte-identical report

Result MT5's tester has no Spread key — it is an MT4 leftover, so the cost model in force was never the one set

How to interpret it

Read a backtest as a claim with conditions attached. They decide how much survives contact with an account.

Range What it means
No data source or date range stated Not evidence. There is nothing to reproduce and nothing to disagree with.
Stated source, single instrument, optimised window A starting point. It shows the rules can win somewhere, which is the weakest thing a backtest can show.
Stated source with realistic costs over several regimes Worth reading. The figures are now about the strategy rather than about the setup.
The above plus an untouched out-of-sample window The strongest evidence a backtest alone can produce: part of it was not available to whoever tuned the rules.
  • Ask what was optimised. Every parameter that was tuned on the reported window borrows a little of the result from the data.
  • Check the trade count before the profit. Fifty trades will not distinguish a strategy from luck no matter how good they look.
  • A backtest that cannot be reproduced is a screenshot. Treat the provenance line as part of the number, not as a footnote.

mt5depot EA listings state the data source, the date range and the tester model for every published run, and only 6 of the 30 carry a modelling quality figure — 6 of the 18 runs done on real ticks. A build gate reads the shipped pages so the other 24 cannot claim one.

Common mistakes

Reading a backtest as a forecast

It reports what the rules would have done on data that already exists. The future contains conditions the window did not, which is why forward results run worse and the gap is what to plan around.

Optimising and reporting on the same window

Every tuned parameter absorbs some of the window's noise, so testing on the data used to tune is measuring the tuning. The result is guaranteed to flatter and guaranteed not to repeat.

Comparing two backtests run under different conditions

Different spreads, data sources, date ranges and tester models all move the figures independently of the strategy. Two numbers are comparable only when the setup behind them matches.

Treating a long window as automatically better

A ten-year test on interpolated bar data can be less informative than two years on real ticks for an intraday strategy, because the longer run never contained the intra-bar path the rules actually trade.

In depth

Frequently asked questions

Is a good backtest enough to buy an EA?
No. A backtest can rule a strategy out and can show that the rules behave as described, but it cannot establish that the edge survives conditions the test window did not contain. Look for an out-of-sample window or a forward record alongside it, and read the cost model before the profit.
How long should an EA backtest be?
Long enough to contain several market regimes and enough trades for the statistics to settle — in practice several years and several hundred trades. Length alone is not the criterion: a long run on poor data can be less informative than a shorter run on real ticks.
Why do backtest results differ between brokers?
Because the price history, the spread record and the trading conditions differ. Running the same rules on two data sources and getting materially different results is useful information — it means the outcome depends on the data as much as on the strategy.