Start freeSign in

Why a backtest needs a cost model

ST
Sonar Sciences Quant & Research Team · Quant & Research Team The research desk of Sonar Sciences · Publications and reviewed work
Published 7 Aug 2026
5 min read

Zero cost backtests can overstate a strategy’s edge because they ignore the frictions that occur on each execution. Per fill cost modelling makes backtests more realistic by charging commissions, slippage, spread, and market impact where they arise, which can materially reduce Sharpe based metrics and improve the credibility of validation.

Why a backtest needs a cost model: a wordless annotated mechanism illustration
Why a backtest needs a cost model: a wordless annotated mechanism illustration

A backtest that assumes zero trading cost can overstate a strategy’s quality. It treats every entry and exit as if execution were free and immediate, so the simulated profit and risk metrics reflect gross results rather than what trading can actually deliver after frictions. When a strategy’s measured edge is small, those omitted frictions can be large enough to absorb it entirely. This is why a cost model is not a detail added after validation. It is part of validation.

The mechanism is straightforward. A strategy generates orders. Those orders become fills. Each fill can incur commissions, fees, spread crossing, slippage, and market impact. If the backtest ignores those effects, it credits the strategy with prices and returns that may not be achievable in live trading. The inflation tends to be worst in strategies that trade frequently, target small expected gains per trade, or depend on fast reactions to short lived signals. In those cases, even modest cost assumptions applied at the fill level can materially change the distribution of returns and the risk adjusted metrics computed from them. [1]

Per fill cost modelling addresses this by attaching trading friction to the events where it actually occurs. Instead of applying a rough aggregate haircut to portfolio returns, the backtest models costs on each executed order or fill. That matters because costs are path dependent. They vary with turnover, order size, instrument liquidity, and the exact sequence of trades. A strategy that looks attractive on gross returns can degrade sharply once costs are charged wherever execution happens. [1]

This directly affects metrics that traders use to judge whether a signal is real. The Sharpe ratio can look healthy in a zero cost simulation because both the mean return and volatility are computed from gross PnL. Once fill level costs are included, the mean return is reduced and the return path can become more volatile if execution effects vary across trades. That pushes the Sharpe ratio down. If the original Sharpe was only marginal, the drop can move the strategy from apparently promising to statistically unconvincing. [1][3]

The same logic extends to the deflated Sharpe ratio. The deflated Sharpe ratio is designed to assess whether an observed Sharpe ratio is likely to be genuine after accounting for the fact that many trials, variants, or parameter choices may have been tested. It penalizes apparent performance when there is a high chance that the result arose from multiple testing rather than a durable edge. If the Sharpe ratio used as input is inflated by zero cost assumptions, then the resulting inference is also distorted. A per fill cost model helps by producing a more realistic Sharpe ratio before deflation is applied. That makes the deflated Sharpe ratio a more meaningful guard against false discoveries. [2][3]

This is also connected to overfitting control. Strategy validation is not only about whether a signal produced positive historical returns. It is about whether the result survives realistic assumptions and remains credible after accounting for the ways research can fool itself. Sonar’s validation material frames this as a process that includes implementation realism alongside statistical checks. A backtest overfitting audit likewise exists to test whether strong in sample results remain convincing once biases and model risk are considered. Costs are also a realism check because they are a routine source of gap between paper performance and realized outcomes. [1][2]

Per fill modelling is especially important when turnover is high. If a strategy trades often, total friction scales with the number of fills. A small omission on each trade can accumulate into a large distortion at the portfolio level. Even where gross alpha exists, net alpha can disappear once commissions, spread, and slippage are deducted repeatedly. This is the core reason zero cost simulations can promote fragile strategies. They reward activity without charging for it. [1]

Per fill modelling also improves comparisons across strategies and asset classes. Different instruments and execution styles have different cost structures. A backtest that uses no cost model can make two strategies look comparable when they are not. A fill based approach forces the evaluation to reflect the trading conditions implied by each design, so high turnover intraday ideas, slower medium horizon systems, and strategies on more or less liquid instruments are assessed on a more consistent net basis. The result is not that one class of strategy is inherently better. The result is that the comparison is less distorted by hidden friction. [1]

The practical lesson is simple. Net performance should be estimated where trading happens, at the fill level, not added as an afterthought. That includes explicit charges such as commissions and fees, as well as execution related costs such as slippage and market impact when the source data and modelling framework can support them. Without that step, the backtest can report an edge that exists only before implementation. With it, the researcher is testing whether the strategy still has enough signal after the market takes its share. [1]

Claim register 3 claims · all sourced
Run the Backtest Overfitting Audit on your own results Eight questions about your sample, your process, and your cost model. No signup, and you get a written verdict at the end.
Open the audit

Drafted with AI assistance from cited sources. Reviewed and approved by Sonar Sciences Quant & Research Team.