Guide

How trading costs quietly destroy backtest returns

Backtesting fundamentals · ~5 min read

Commission, slippage, and borrow fees rarely look dangerous on their own — a few basis points here, a fraction of a cent there. But charged on every single trade, over a year of active trading, they are one of the most reliable ways a good-looking backtest becomes a losing live strategy.

Quick answer

Trading costs — commission, slippage, and borrow fees for shorts — are charged on every trade, so they scale directly with how often a strategy trades. A strategy that looks profitable at zero cost can be a reliable loser once realistic costs are applied, especially if it trades frequently. Always compare gross returns (before costs) to net returns (after costs) before trusting a backtest.

The three costs that matter most

Commission

The fee your broker charges per trade. Often small in isolation, but it applies to every entry and every exit — a round-trip trade pays it twice. A strategy making dozens of trades a month accumulates commission costs that a low-frequency strategy never has to think about.

Slippage

The difference between the price you saw when you decided to trade and the price you actually got. It comes from the bid-ask spread, from price movement between your signal and your order executing, and from your own order size moving the market on less liquid instruments. Slippage is often the single largest and most underestimated cost in a backtest.

Borrow cost

If your strategy shorts, you pay a fee — the borrow rate — to hold that short position over time. It's easy to forget entirely when backtesting, especially for strategies that hold short positions for extended periods, where the cost compounds the longer the position is open.

Why frequency is the multiplier that changes everything

A single trade's costs look trivial. The problem is that costs scale with trade count, while a strategy's edge often doesn't scale the same way. A strategy making 500 trades a year needs a larger per-trade edge to overcome 500 rounds of commission and slippage than a strategy making 20 trades a year. High-frequency strategies that look spectacular gross often turn marginal, or negative, net of realistic costs — this is one of the most common and most avoidable ways backtests mislead.

How to check whether your strategy survives real costs

Run your backtest twice: once gross (no costs) and once net (with realistic commission, slippage, and borrow applied). The gap between the two tells you how cost-sensitive your strategy is. A wide gap is a warning sign, even if the net result is still positive — it means the strategy's real-world margin for error is thin, and a slightly worse fill environment than you assumed could tip it negative.

Use realistic numbers, not convenient ones. Your actual broker's commission schedule, a slippage estimate appropriate to the instrument's liquidity, and current borrow rates for anything you short. Optimistic cost assumptions are one of the easiest ways to accidentally flatter a backtest without realising you've done it.

Costs interact with everything else

A strategy that barely clears its costs is also a strategy where overfitting is more dangerous — because there's no margin left to absorb the difference between a fitted result and a real one. Strategies with a comfortable buffer over their true costs are far more forgiving of the small estimation errors that are unavoidable in any backtest.

Or have costs modelled on every run, automatically

The Honest Backtest Engine charges commission, slippage, and borrow on every trade by default, and shows you the gross-to-net gap directly — so you always know how much of your edge is real and how much was paying for a frictionless world that doesn't exist.

See how it works

Frequently asked questions

How much do trading costs really affect backtest results?

They scale directly with how often a strategy trades. A strategy making hundreds of trades a year can see its edge shrink dramatically, or disappear entirely, once realistic commission, slippage and borrow costs are applied compared to a frictionless backtest.

What is slippage in backtesting?

Slippage is the difference between the price you saw when deciding to trade and the price you actually receive, caused by the bid-ask spread, price movement before execution, and market impact from your own order. It's often the largest and most underestimated trading cost.

Do I need to model borrow cost if I don't short?

No, borrow cost only applies to short positions. If your strategy is long-only, commission and slippage are the two costs that matter most.

How do I know if my strategy's edge is too thin to survive real costs?

Compare its gross return (no costs) to its net return (with realistic costs applied). A wide gap between the two, even if the net result is still positive, means the strategy has little margin for error against real-world trading conditions.