guide · Performance & testing

Backtesting Trading Strategies: A Reproducible Test Plan

Backtesting applies specified trading rules to historical data using an execution model. A credible test records when information became available, how orders could fill and which costs apply. Its result describes that historical simulation, not a guaranteed live outcome.

TradeCopier Editorial TeamPublished Updated
Chronological research timeline separating strategy design, a holdout test and trade costs
Editorial illustration. Examples and calculations below state their own assumptions.

Key points

  • Freeze the rules and data version before evaluating a test.
  • Signals and fills need a realistic chronological sequence.
  • Keep untouched evaluation data and report unsuccessful experiments too.
  • State whether spread is already in fills before adding transaction costs.

Scope and assumptions

  • The price sequence and 200-trade, USD 1,000 pre-cost gross example are invented. The cost grid keeps that sample fixed and assumes spread is absent from its mid-price fills. No strategy performance is claimed and no historical backtest has been presented as a live account result.

Write the test specification first

A backtest is a model of decisions and execution, not simply an indicator drawn over an old chart. It needs rules for entering, sizing, modifying and exiting positions, plus a definition of the information available at each decision. Any ambiguity can quietly become a favorable assumption in the software.

Start with a one-page specification. Name the instrument and contract, observation frequency, session calendar, signal timing, order type, sizing method, costs and evaluation dates. State how open positions are handled at the end of the test. Record the version of the strategy and dataset so another reviewer can rerun the same calculation.

The MetaTrader 5 testing documentation describes configurable historical testing and execution simulation. A platform providing these settings does not establish that any particular configuration is realistic. The test designer must connect the settings to the question being investigated.

Separate the strategy from the execution model

The strategy says when it wants an order. The execution model says whether, when and at what price that order fills. Keep these layers distinct. A profitable signal model can become unprofitable after costs, and a programming error in fill timing can create an apparent opportunity that never existed.

For example, a rule might calculate a signal from a completed five-minute bar. The execution model should not automatically grant entry at an earlier price inside that same bar. If the rule requires the closing value, the earliest permitted action follows the moment that value becomes available, with whatever delay and pricing convention the model specifies.

A worked timing error

Imagine a bar that opens at 100, trades down to 99, reaches 103 and closes at 102. A hypothetical strategy buys when the completed bar closes above 101. A backtest that detects the closing condition and then buys at the bar’s low of 99 has used information from the future relative to the supposed entry.

Even an entry at the bar’s open of 100 would be unavailable to that completed-bar decision. A defensible simulation needs a later executable price or a clearly specified close-execution mechanism supported by the market and data. The point is chronology, not which price makes the equity curve look better.

Now suppose both a stop and target lie inside the next bar’s high-low range. OHLC data alone may not reveal which was reached first. Choosing the profitable order of events every time creates another bias. Use data with adequate resolution or a documented conservative ambiguity rule, and report how sensitive results are to that choice.

Audit the dataset

Data questionFailure it can reveal
Are timestamps and sessions consistent?Signals shifted into the wrong trading window
Are missing and duplicate records identified?Artificial jumps or repeated trades
Were instruments selected using future survival?Survivorship bias
Are futures rolls and adjustments documented?Synthetic price changes mistaken for tradable returns
Were economic values revised later?Information unavailable at the original decision time

Do not silently fill missing prices with values that imply a tradable market. Record the gap and decide whether to exclude the affected period, model unavailable execution or obtain better data. Every choice should be reproducible. A clean-looking dataset is not necessarily a faithful one.

For futures, distinguish individual contracts from a continuous chart series. For portfolios, include the historical universe as it was known then where possible. The references on survivorship bias and look-ahead bias explain different ways an apparently historical sample can contain future knowledge.

Make costs explicit

Suppose an invented 200-trade simulation earns $1,000 before costs. A round-trip commission of $3 per trade reduces that by $600. Another $2 per trade of execution difference excluded from the initial model removes $400 more. The revised arithmetic is zero before any other operating costs.

This example does not assert a typical commission or slippage. It shows why gross profit alone is insufficient. Record whether a quoted commission is per side, per contract or per round trip. If bid-ask execution is already modeled, do not subtract the spread again. If financing varies with holding time, a flat fee may be a poor substitute.

Run separate sensitivity cases rather than presenting a single optimistic cost assumption. Identify the break-even cost level and ask whether the modeled margin survives plausible variation. Use the expectancy calculator for an arithmetic cross-check and keep the detailed fill-level calculation as the main record.

Reconcile one sample across a cost grid

Keep the invented sample above unchanged: 200 completed round trips and USD 1,000 gross before every cost in this worksheet. For this exercise, gross is computed from hypothetical mid-price entries and exits, so the bid-ask spread is not embedded in the fills. These are deliberately invented aggregate inputs, not a trade history, a measured spread, a tested strategy or a TradeCopier result. The grid changes costs only; it does not rerun orders, change trade count or assume that the same fills would be available under different market conditions.

Use USD per completed round trip for spread and slippage. The commission column is USD per side for one trade, so a completed entry and exit incur twice that amount. Financing is a total USD charge across the whole 200-trade sample, not an assumed daily rate. With these definitions: total modeled cost = 200 × (additional round-trip spread + 2 × commission per side + round-trip slippage) + total financing. Modeled net = 1,000 − total modeled cost. If a broker quotes a symmetric USD 3 round-trip commission, enter USD 1.50 per side here; do not enter USD 3 per side and double the charge. For unequal entry and exit charges, add the two charges directly in a trade-level ledger.

Cost sensitivity for the same fictional 200 trades and USD 1,000 pre-cost gross, in USD
Cost caseSpread per round tripCommission per sideSlippage per round tripFinancing totalTotal costModeled net
Zero-cost arithmetic reference000001,000
Lower-cost illustration0.251.000.500550450
Break-even illustration0.501.501.5001,0000
Higher-cost illustration1.002.002.00501,450−450

The break-even row splits the earlier USD 2 per trade of additional execution difference into USD 0.50 spread and USD 1.50 slippage. Its USD 3 round-trip commission is USD 1.50 on entry plus USD 1.50 on exit. Thus spread is 200 × 0.50 = USD 100, commission is 200 × 3 = USD 600, and slippage is 200 × 1.50 = USD 300; subtracting all three from USD 1,000 leaves zero. The lower-cost row costs 200 × (0.25 + 2 + 0.50) = USD 550. The higher-cost row costs 200 × (1 + 4 + 2) + 50 = USD 1,450.

Fictional cost waterfall: 1,000 dollars gross falls by 100 spread, 600 commission and 300 slippage to zero net.
Original illustrative waterfall for the break-even row. The 200 trades and USD 1,000 gross are fixed inputs, not observed results. Scroll the diagram horizontally on a narrow screen.

Interpret break-even and missing costs correctly

Before financing, this fixed sample can absorb at most USD 1,000 ÷ 200 = USD 5 of all-in round-trip cost per trade and still finish at zero. This is a break-even threshold for the invented gross, not a fee quotation or an acceptable trading-cost target. The lower-cost row uses USD 2.75 per trade, leaving USD 2.25 per trade, or USD 450 in total, of additional cost headroom if the same gross and 200 trades remain valid. The break-even row has no remaining headroom. When financing is USD 50, the maximum combined spread, commission and slippage falls to (1,000 − 50) ÷ 200 = USD 4.75 per trade.

First inspect what the original trade export actually contains. If entry and exit are already executable bid and ask prices, their spread effect may already be in gross; adding this worksheet’s spread line again would double count it. If the export uses mid prices, a spread adjustment is needed, but do not infer its amount from this illustration. Partial fills, variable size, changing currency conversion, tiered commission and holding-period charges require a trade-level ledger; an average across 200 trades cannot certify them. MetaTrader’s tester documentation describes different tick and execution modes and commission settings, including entry and exit charging. Check the actual test mode and exported deal records before transferring its figures into this grid.

Download the worked cost-sensitivity CSV to audit every scenario and the blank review CSV to record your own basis. The files are manual worksheets, not a strategy, simulator, broker-cost feed or order-import format. In the blank file, unknown spread status, commission basis, financing or conversion stays unknown; do not turn a missing value into zero merely to produce a net result. If gross already includes any category, document that inclusion and enter only an additional cost for that category. Use actual trade and account records where available, and preserve assumptions beside each result.

The CFTC’s advisory on hypothetical trading systems cautions that simulated fills may not reflect actual market conditions and flags omitted spreads, commissions and fees. This worksheet only exposes the sensitivity of one invented number to stated costs. It cannot establish that the gross was attainable, that a historical backtest was valid, or that any strategy would have made money live.

Check position sizing and account state

A backtest must respect the units of the instrument. A stop distance in points requires a point value; a futures quantity must usually be a whole number of contracts. A broker’s minimum lot and volume step can prevent the exact fractional quantity produced by a formula.

Include available equity, margin assumptions and simultaneous positions where they affect order eligibility. A strategy that opens ten overlapping trades cannot be assessed accurately by simulating each as if it had exclusive use of the account. A netting account and a hedging account may also represent positions differently.

For copying workflows, test the destination’s quantity and symbol rules separately. A backtest of a source strategy does not automatically simulate the full copier path. TradeCopier’s symbol mapping and configuration pages describe product considerations to investigate with supported accounts.

Reserve evaluation data before tuning

Keep a chronological period that is not used to choose parameters. Evaluate the selected rules there only after the development process is documented. If the result leads to changes, acknowledge that the period has now influenced development and should no longer be described as untouched.

A single holdout does not solve every research problem. Repeatedly checking it while making changes can indirectly fit the strategy to it. Keep an experiment log with the number of variations tried, including failures. The overfitting reference explains why selecting a winner from many noisy trials creates misleading confidence.

Inspect trades, not just the equity curve

Hand-check a small set of trades against the input data and rules. Include a normal winner, a loser, a gap, a session boundary and a case with competing exit conditions. This review can catch sign errors, impossible fills and cost omissions that aggregate statistics conceal.

Use a tiny inventory example as a separate accounting test. Buy two units at 100, sell one at 102, then mark the remaining unit at 99. Before costs, realized profit is 2, unrealized profit is −1, and the combined result is +1. The open quantity is one unit. A report showing realized profit of 4 has applied the exit to both units; a report showing total profit of 2 has ignored the open loss. Keep transaction costs and any currency conversion explicit when extending this example. Repeat with the opposite side and a partial fill to check sign and quantity handling independently of the strategy’s entry logic.

Then review net result, drawdown, number of observations, exposure and concentration. An impressive total produced by one unusual trade has a different evidential meaning from a broad pattern, although neither proves future returns. Use risk-adjusted statistics only after the underlying return series is reconciled.

Publish a report that can be challenged

A useful report includes the exact test period, dataset version, rules, parameter-selection process, costs, execution assumptions and limitations. It clearly labels all results as simulated. It should show the evaluation period separately from the development period and identify any post-result changes.

The CFTC’s discussion of hypothetical performance explains why simulated results should not be represented as actual trading. A disclaimer cannot repair an unrealistic model. The substantive work is to expose assumptions and retain the evidence needed to reproduce them.

After the historical review, a paper workflow test can investigate implementation behavior under current simulated conditions. A walk-forward analysis can examine a documented sequence of training and later evaluation windows. Each adds a different kind of evidence while leaving uncertainty about live outcomes.

Questions and answers

What is the difference between backtesting and paper trading?

Backtesting simulates specified rules on historical data. Paper trading usually observes a simulated account as data arrives. Both have model limitations and neither establishes live profitability.

Can OHLC bars accurately test every strategy?

No. A bar does not necessarily reveal the order of intrabar events or executable bid and ask prices. Strategies sensitive to that sequence need adequate data or explicit ambiguity assumptions.

What should a backtest report disclose?

Disclose the data and period, rule version, parameter-selection process, execution and cost assumptions, sizing constraints, evaluation split and known limitations. Label the result as simulated.

When is spread double counted in a backtest?

When gross already uses executable bid and ask fills that include a spread effect, subtracting the same spread again counts it twice. Document the fill basis and add only costs that are absent from the recorded result.

What is the break-even cost in the 200-trade example?

For the fictional USD 1,000 pre-cost gross over 200 completed trades, USD 5 total cost per round trip, including any financing allocation, produces zero net. This is sample arithmetic, not a measured or recommended fee.

Sources and further checks

Use the current source for your exact instrument, account and platform. Referencing a general specification does not establish support for every TradeCopier workflow.

  1. MetaTrader 5: Strategy Testing · Checked September 23, 2026
  2. CFTC: Hypothetical trading-system performance · Checked September 23, 2026

Found an error? Send a correction with this page's address and a primary source. See our editorial standards for how we handle examples, claims and revisions.

Check the product workflow

Use these pages to check TradeCopier settings and connection requirements for your own setup.

Browse all resourcesCurrent resource: /learn/backtesting-trading-strategies

Start Copying Smarter Today

Connect supported accounts with configurable sizing, risk controls, activity logs, and alerts.

Get Started Free