Backtest Cost Modelling
Platforms & ToolsThe part of a backtest that decides what each trade paid. Without spread, commission and swap you are testing a signal, not a strategy.
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.