| Cost | What it is | What makes it worse |
|---|---|---|
| Spread | The gap between bid and offer. You buy at one and sell at the other. | Illiquid instruments, small caps, the open and the close, and anything outside main session hours. |
| Commission and fees | What the broker and venue charge per trade. | Small position sizes, where a fixed fee is a large share of the trade. |
| Slippage | The difference between the price you assumed and the price you got. | Market orders, fast-moving prices, and signals that fire when everyone else’s do. |
| Market impact | Your own order moving the price against you. | Size relative to what trades in that instrument. Invisible in a backtest, which assumes you are nobody. |
| Financing and borrow | Overnight funding on leverage, and the cost of borrowing to short. | Long holding periods, leverage, and hard-to-borrow names, where the fee can exceed the edge. |
| Taxes | Jurisdiction-specific, and often worse for short holding periods. | High turnover. Not modeled here, and not something a backtest usually touches at all. |
How do you check whether costs kill your strategy?
Work out the edge per trade first
Take the gross profit and divide by the number of round trips. This single number decides everything that follows, and it is often much smaller than the equity curve suggests.
Put a realistic round-trip cost next to it
Spread plus commission plus assumed slippage, in the same units. If the cost is a large fraction of the edge, the strategy is a cost experiment with a trading rule attached.
Apply costs inside the backtest, not to the summary
Costs change which trades are worth taking, not just the final total. Subtracting them from the end result keeps losing trades in the record that a cost-aware rule would have skipped.
Rerun with costs at two and three times your estimate
This is the cheapest robustness test in this handbook. A strategy whose result survives tripled costs has a margin; one that turns negative was always inside the error bars of an assumption.
Check turnover against holding period
Costs are paid per round trip, so a rule holding for hours pays them hundreds of times more often than one holding for months, on the same annual return.
Ask what size the result assumes
Backtests fill at the quoted price for any quantity. Compare your intended size with what actually trades in that instrument, and treat any strategy that needs a meaningful share of daily volume as untested.
What is slippage in trading?
Slippage is the difference between the price a strategy assumed it would get and the price it actually got. A rule decides to buy when the last trade printed at 100.00, the order reaches the market, and it fills at 100.04. Those four cents are slippage, and they are paid again on the way out.
It is not a fee and nobody charges it. It comes from the gap between deciding and transacting: prices move in between, the quote you saw may not be there when you arrive, and the size available at the best price may be smaller than what you wanted.
The uncomfortable part is that slippage is worst exactly when a signal is most confident. A rule that buys on a breakout is buying into a moving price alongside everyone else running something similar.
Why do costs matter more than the size of the edge?
Because they behave differently. The edge is a property of the idea and is roughly fixed per trade. Costs are a property of the activity and are paid every time. So the ratio between them is set by turnover, and turnover is often chosen almost by accident, as a side effect of a lookback window or a threshold.
Two strategies earning the same annual return before costs can end up on opposite sides of zero after them, purely because one holds for weeks and the other for hours. Nothing about the strength of the underlying idea distinguishes them; only how often each pays the toll.
This is also why cost sensitivity is a better first check than any statistical test. It needs no probability theory, it takes minutes, and it removes a large share of candidates before the harder questions are worth asking.
Why are backtested costs assumptions rather than data?
Because the backtest never sent an order. Every cost figure in it is a number somebody typed, and the person who typed it also wanted the strategy to work.
That is not usually dishonest. Reasonable-sounding defaults are easy to pick and hard to check: a fixed number of basis points per trade, a fill at the midpoint, a spread taken from an average rather than from the moments the strategy actually trades. Each is defensible in isolation, and each is optimistic in the same direction.
It also creates a specific temptation. Applying costs after seeing the equity curve invites arguing them down, and there is always an argument: a better broker, a limit order instead of a market order, a more liquid instrument. Fixing the cost assumptions before looking at the result removes the negotiation.
Is a strategy that only works before costs almost working?
No, and this is the framing worth abandoning. A strategy that is profitable before costs and unprofitable after has not narrowly missed. It has been measured against the wrong benchmark, because the only return that exists is the one after costs.
The instinct is to close a small gap by trading a bit less, tightening the entry, or moving to a cheaper venue. Sometimes that works. More often the gap was never small: it looked small because it was compared against a gross return that was itself the product of a search, and shrinking turnover also shrinks the sample the result was estimated from.
The honest reading is that costs are part of the hypothesis. "This pattern exists" and "this pattern exists and is larger than what it costs to trade it" are different claims, and only the second one is worth anything.
Backtested and hypothetical results are not indicative of future performance. Nothing here is investment advice.
What do backtests get wrong about execution?
Four assumptions are near universal and all of them favour the strategy.
- That your order does not exist. The backtest fills you at a price set by a market that never saw your size.
- That the fill happens at the quoted price. In practice a market order takes what is available, and a limit order may not fill at all — which changes the trade population, not just its cost.
- That liquidity is always there. Spreads widen and depth vanishes at exactly the moments most strategies want to act.
- That every signal becomes a trade. A rule that fires a hundred times might have been filled ninety times, and the ten it missed are not random.
The last one is the subtlest. Unfilled orders are usually the ones where the price ran away, which is to say the ones that would have been most profitable. A backtest that assumes full fills quietly awards the strategy its best trades.
Common questions
How much slippage should I assume in a backtest?
There is no universal figure, because it depends on the instrument, the order type, the size and when the rule trades. What is more reliable than any single estimate is testing the result at two and three times whatever you assumed, and treating a strategy that does not survive that as unproven.
Do limit orders remove slippage?
They cap the price but introduce a different problem: some orders do not fill, and the ones that do not are disproportionately the moves you wanted to catch. Backtesting limit orders honestly means modeling non-fills, which is harder than modeling slippage.
Does high-frequency trading avoid these costs?
The opposite. Costs are paid per round trip, so the faster a strategy trades the larger its cost burden relative to the edge. Firms operating at that frequency spend heavily on execution infrastructure precisely because the costs, not the signal, are the binding constraint.
Is market impact a real concern for a retail account?
Usually not in liquid instruments at small size, which is the one genuine advantage of trading small. It becomes a concern in thin instruments, at the open and close, and for any strategy whose backtest requires a meaningful share of what trades in a day.