Skip to content

Backtest Cost Modelling

The part of a backtest that decides what each trade paid. Without spread, commission and swap you are testing a signal, not a strategy.

B

6 of 68 in Platforms & Tools

Backtest cost modelling is the part of a historical simulation that decides what each trade paid. A tester that fills at the bar's price with no spread, no commission and no swap is not testing a strategy, it is testing a signal, and the difference between the two is the entire cost of trading applied to every trade in the sample. Three inputs need setting deliberately. Spread should vary as it does in the market rather than sitting fixed at a favourable value, because a strategy that trades the session open or a news release pays nothing like the average. Commission has to be entered per round turn, in the units the account is actually charged in. And swap has to be applied to anything held past the daily rollover, which quietly decides whether a slower strategy was ever viable. A useful sanity check is to raise every cost by half and re-run: an edge that survives is worth testing forward, and one that does not was never an edge.

Next step

Guide

How Execution Models Work: ECN, STP and Market Maker

Market maker, STP and ECN describe where the other side of a trade comes from — and what each model changes about spreads, requotes and order handling.

Read the guide