A high historical win rate alone does not establish an edge. A backtest evaluates explicit rules on defined data under an execution model; even a careful test does not guarantee future returns.

Why test a strategy on historical data at all?

Positive historical expectancy is evidence about the tested sample. It can reflect chance, selection or overfitting, so evaluate withheld data, costs and robustness before drawing wider conclusions.

Rules must be unambiguous, or you are testing fiction

Record the symbol, timeframe, signal inputs, order timing, exit rules and position-sizing calculation. For a hypothetical daily rule, compare the completed bar’s close with the previous bar’s high, then send an order only after that close becomes available. Using the final close to enter at the earlier open of the same bar would introduce future information. Specify what happens with an existing position, unavailable data or insufficient margin. An indicator setting alone does not resolve these decisions or guarantee a fill.

A related topic is how to discover a trading edge: a historical test can reveal a contradiction in the proposed rules, but a positive result still needs evaluation of costs, selection and uncertainty. For broader context on testing within the working trader’s routine, see the trader’s workshop in our library.

Where to get historical data and how many samples are enough?

Select data that match the intended instrument and execution model. Currency futures and OTC spot or CFDs are different contracts; centralized futures data are not automatically an adequate substitute for a retail spot strategy.

There is no universal statistical-significance threshold of 100 trades. Required evidence depends on dispersion, dependence, effect size, selection and regime coverage. Report uncertainty and effective sample size.

Choose a research period covering relevant conditions and document its limitations. Record the provider, product, quote side, time zone and gaps. OHLC alone does not identify the order of a stop and target touched inside the same bar. MT5 can generate ticks for a minute bar lacking tick history even when testing from real ticks; check the dataset and journal rather than relying on the mode’s name. For an instrument basket, retain the selection available at the time, and use macro releases available then rather than later revisions.

Reconcile prices before charging the spread

Entry Ask and exit Bid account for the spread differently from a result measured between quote midpoints. Compare them in one complete example.

Scroll sideways to see the full diagram

Reconcile prices before charging the spreadA complete hypothetical model buys and later sells one arbitrary quantity unit, without commission, financing or slippage. Entry Bid is 100, Ask 102 and midpoint 101; exit Bid is 103, Ask 105 and midpoint 104. Buying at Ask 102 and selling at Bid 103 yields +1 price unit. Midpoints rise by +3; subtracting each half-spread, 1 and 1, gives the same +1. Subtracting both full spreads, 2 and 2, from the midpoint change gives −1, an incorrect calculation. Result bars share a zero and linear scale; −1 is a measurement error, not another valid execution.TWO METHODS, SAME RESULTHypothetical long • one quantity unitBidAskMidpointEntry100102101Exit103105104Midpoint change+3Ask → Bid+1Wrong: −2 − 2−1−2024Price units • +3 − 1 − 1 = +1

Assumptions: Two hypothetical simultaneous Bid/Ask quotes for the same fictional instrument: entry 100/102, exit 103/105. Midpoint is the average of both sides. One arbitrary quantity unit; execution exactly at the assigned Ask and Bid. No fees, financing, gaps or slippage. These are not current FX quotes or guaranteed fills.

Execution exactly at the assigned prices gives 103 − 102 = +1. Quote midpoints change by 104 − 101 = +3. Entry is 1 above the midpoint and exit 1 below it: 3 − 1 − 1 = +1. Both methods reconcile this model.

Full spreads are 2 at entry and 2 at exit. Subtracting both full spreads from the midpoint change gives 3 − 2 − 2 = −1, inconsistent with these executions. Subtracting 2 from 103 − 102 would be another double charge, because that result already uses Ask and Bid.

MetaQuotes — Bid and Ask trading prices distinguishes the chart-building price from operation prices. Record each price’s source before comparing reports. This calculation uses one quantity and price unit; additional fees or other executions require a separate model.

The Ask → Bid result already includes the cost relative to quote midpoints.

Spread, commission and slippage — without them the backtest lies

Costs depend on the product and execution model. Entry at Ask and exit at Bid already include the spread in the price result; subtracting it again would double-count it. Add any separate commissions, financing and stated execution differences. A hypothetical 0.8-pip spread is 0.4% of a 200-pip target and 16% of a five-pip target. Those are shares of target distance, not of the strategy’s edge, and neither comparison estimates a real trading result.

In a separate hypothetical example, 50 closed trades produce 30 gains of PLN 40 and 20 losses of PLN 50 before costs: gains PLN 1,200, losses PLN 1,000 and net PLN 200. Assign the same full cost to every closed trade, including losses.

Cost per tradeNet totalNet meanNet profit factor
PLN 0PLN 200PLN 41.20
PLN 2PLN 100PLN 2About 1.10
PLN 4PLN 0PLN 01.00

With a PLN 2 full cost, each gain becomes PLN 38 and each loss PLN 52: profit factor is 1,140 / 1,040, about 1.10. The table changes only this assumed cost; it is arithmetic, not evidence about an observed strategy.

Stress plausible costs and execution changes. A two-times-average-cost rule is a chosen screen, not a universal safety margin or proof of profitability.

A curve fitted to history is not a strategy — it is a museum

Choosing the best of many parameter values, instruments or sample splits can fit peculiarities of the observed history. Record all trials, including discarded ideas outside the optimiser. A strong selected result alone does not establish that this happened, but it needs a separate evaluation. Limiting optimisation to two parameters does not remove selection introduced elsewhere.

Freeze the split before tuning and reserve data for evaluation. A 70/30 split is one possible design. A weaker test result can reflect regime differences or sampling as well as overfitting. Revising the strategy after inspecting this test turns it into development data; document that use.

Chronology also depends on when each outcome becomes known. In a hypothetical model, a decision at t is labelled at t + 3. The first test begins at t 10, and fitting must finish before then. Of candidate decisions t 1–t 9, only t 1–t 6 have outcomes available before t 10. Decision t 6 is labelled at t 9; t 7–t 9 are labelled at t 10–t 12 and cannot inform this fit. Earlier prices may still be needed to calculate a test indicator. This exclusion resolves the stated label overlap, not every possible source of leakage.

A hypothetical example — how to read the numbers honestly

Hypothetical arithmetic: with win probability 0.54, mean win 2.3R and mean loss 1R, gross expectancy is 0.54 × 2.3 − 0.46 = 0.782R and profit factor is about 2.70. These assumptions do not establish a drawdown or total return. Separately, an assigned 87% return over exactly five years compounds to about 13.34% annually; it is not derived from these trade statistics.

What to do tomorrow

Use the following checks to connect the report with an identifiable dataset, rule version and execution model. Reproduce individual trades, including a loss, a missing signal and an ambiguous intrabar case. A demonstration run can test operation in real time; it does not require a move to a live account after a positive result.

  1. Write the strategy in a single text file, mechanically. Specify when information becomes available, the order and sizing calculation, and how ambiguous or unavailable inputs are handled. Compare independently reproduced signals and investigate differences before relying on the aggregate result.
  2. Specify data duration and a chronological training/test split before tuning. Duration should fit the strategy and available evidence; five or two years is not a universal requirement.
  3. Include spread, commission, financing and stated slippage assumptions, then test sensitivity. Losing more than 20% of gross profit to costs is not a universal rejection threshold.
  4. Record trade count, dependence, dispersion and uncertainty. Adding history or instruments changes the sample and may change the strategy hypothesis; 100 trades does not automatically establish significance.
  5. Compare demo behavior with the frozen model and investigate discrepancies. Three months of demo observation does not guarantee readiness or earn a right to profitable live results.

Explore real source data

2560 EUR/USD publications, 49 unpublished weekdays and an independently checked TARGET calendar. Data, chart and code.

An unpublished rate is not a data gap: the ECB calendar, 2016–2025 →