Realistic backtest costs: every charge a real account pays, and the test that catches a fake edge
The backtest charged $1 per trade and made 41% a year. The live account paid the spread, the fees, and the slippage, and made 4%. Nothing about the strategy was wrong. The accounting was.
Costs are the least interesting part of a backtest and the most common reason a decent one turns into a losing live account. They are also the easiest thing to get right, because unlike leakage or overfitting they do not hide. You just have to charge yourself for all of them, at a rate you would be unhappy about, and see what survives.
This guide lists every cost a real account pays, how to estimate each one from things you can observe, and a single test — the cost multiplier — that tells you more about a strategy than most of the report does.
The six costs
1. The bid/ask spread
Every market has two prices: the one you can buy at (the ask) and the one you can sell at (the bid). The ask is higher. So the moment you buy, you are already down by the gap, and a round trip costs one full spread before price moves at all. A backtest that fills at "the close" has filled at a price that was neither the bid nor the ask, and has charged you nothing for crossing.
Estimate it: look at the live quote for your instrument at the times of day you trade. Liquid stocks and majors: a cent or a fraction of a basis point. Small caps, altcoins, and anything at 3 a.m.: much more. Use the wide end, not the average.
2. Commission and exchange fees
The one everyone models, and the one that matters least for most retail strategies on liquid instruments. Crypto exchanges charge a percentage of notional per side — maker and taker rates differ, and a strategy that hits the market is paying taker. Stock brokers charge per share, per trade, or nothing (in which case they are paid through the spread you get, which is item 1 again).
Estimate it: read your own fee schedule. Use the taker rate. Do not use the tier you might reach if you traded a lot; use the one you are on.
3. Slippage
The price moves between the moment you decide and the moment you are filled, and on average it moves against you, because your order is one of the things moving it. Slippage scales with three things: how fast the market is moving (volatility), how big your order is relative to what is available (size), and how impatient you are (market orders pay it; limit orders avoid it but risk not filling, which is its own cost).
Estimate it: if you have live fills, compare each fill to the price at the moment of the signal; the average gap is your slippage. If you do not, model it as a fraction of the bar's range — a percentage of the high-minus-low — so that it grows automatically when the market gets wild.
4. Market impact
Slippage's big sibling. Once your order is large enough to consume the resting liquidity at the best price, you walk the book, and each additional unit costs more than the last. Retail sizes on liquid instruments rarely trigger this. Retail sizes on illiquid altcoins and small caps do, and a backtest that assumes unlimited liquidity at the printed price is testing a strategy that cannot be executed.
Estimate it: cap your fill at a fraction of the bar's volume. If the strategy wants to buy more than, say, 1% of what traded in that bar, it cannot, and the backtest should say so.
5. Borrow and financing on shorts
Shorting a stock means borrowing it, and borrowing costs interest — modest for large caps, brutal for anything hard to borrow. Margin for either direction carries its own rate. These are per-day costs, so they scale with holding time rather than trade count, and a backtest that ignores them flatters slow strategies most.
6. Funding on perpetual futures
Crypto perpetuals have no expiry, so exchanges keep them near the spot price with a funding payment every few hours between longs and shorts. If you are on the crowded side of the trade, you pay it, and in a strong trend the crowded side is the side your strategy probably wants to be on. Funding can be the largest cost a trend-following perp strategy pays, and most backtests do not know it exists.
Estimate it: historical funding rates are published by every major exchange. Charge them per holding interval, with the sign that applied at the time.
| Cost | Scales with | Hurts most |
|---|---|---|
| Spread | Trade count, instrument liquidity | High-frequency; illiquid instruments |
| Commission / fees | Trade count, notional | High-frequency; small accounts on per-trade fees |
| Slippage | Trade count, volatility, urgency | Market-order strategies; volatile markets |
| Market impact | Order size vs. liquidity | Larger accounts; small caps and altcoins |
| Borrow / margin | Holding time | Slow short strategies; hard-to-borrow names |
| Funding | Holding time, crowding | Trend-following on perpetuals |
The cost multiplier test
Once every cost is charged, run the backtest three times: at your estimate, at 1.5× your estimate, and at 2×. Then read the three results as one answer.
- Profitable at 2×: the edge is bigger than your uncertainty about costs. It is probably real, at least on this axis.
- Profitable at 1×, marginal at 1.5×, dead at 2×: the edge exists but is thin. Live costs will land somewhere in that range, and you should expect the marginal case.
- Profitable at 1×, dead at 1.5×: you did not find an edge in the market. You found an inefficiency in your own cost model, and the strategy was the cost assumption.
Why frequency decides how hard this hits
Costs are charged per trade; edge is earned per trade. A strategy that makes 0.3% per trade before costs and pays 0.2% per round trip keeps a third of its edge. The same strategy trading twice as often for half the edge per trade keeps nothing. This is why so many scalping backtests are beautiful and so few scalping accounts are: at high frequency, the cost model is the strategy, and a backtest cannot know your fills to the precision the strategy needs.
It is also why the honest response to "my strategy stops working when I add costs" is not to trade it with lower costs. It is to trade it less often, or on a longer timeframe, where each trade has to carry fewer charges.
A workable default
If you have no live fills to calibrate against, this set is pessimistic enough to be useful:
- Fill at the next bar's open, never at the signal bar's close.
- Charge a full spread per round trip, measured at a bad time of day.
- Charge your exchange's taker fee, on the tier you are actually on.
- Add slippage as a fraction of the bar's high–low range, so it grows with volatility.
- Cap fills at a small fraction of the bar's volume.
- Charge borrow, margin, or funding per holding interval where they apply.
- Rerun at 1.5× and 2× before you believe anything.
Costs are the third item in the fails-live diagnostic and the third step in the full backtesting loop, and they interact with win rate in an unkind way: a high-win-rate strategy with small targets is exactly the strategy whose targets are smaller than the costs.
How Wise Apple charges costs
Wise Apple charges costs on every simulated fill rather than offering them as an afterthought. The Fees Model takes your exchange or broker rate; the Slippage Model scales with the bar's volatility; the Market Impact and Volume Cap settings refuse fills larger than the bar could absorb; and short and long-and-short runs carry a daily borrow cost. Fills are scheduled for the bar after the decision, and the report shows costs as their own line next to the gross result, so the multiplier test is a matter of changing one setting and running again — which, because it runs on your own machine, is free.
Questions traders ask about backtest costs
What costs should I include in a backtest?
All six: the bid/ask spread, commission or exchange fees, slippage, market impact for orders large relative to liquidity, borrow or margin interest on shorts and leverage, and funding on perpetual futures. Most backtests include only commission, which for retail traders on liquid instruments is usually the smallest of the six.
How much slippage should I assume in a backtest?
If you have live fills, measure the average gap between the signal price and the fill price and use that. If you do not, model slippage as a fraction of each bar's high-minus-low range so it grows with volatility, and set it pessimistically. Then rerun at 1.5× and 2× — the strategy's sensitivity to the assumption matters more than the assumption itself.
Why does my strategy stop working when I add costs?
Because its edge per trade was smaller than the cost per trade, which usually means it trades too often for the size of its edge. The fix is not to assume lower costs. It is to trade less often, use a longer timeframe, or accept that the strategy was a cost-model artefact — a result that appears only when costs are underestimated.
Do high-frequency strategies suffer more from trading costs?
Far more. Costs are paid per trade and edge is earned per trade, so the more often a strategy trades, the larger the share of its edge that costs consume. At high frequency the cost model effectively is the strategy, and a backtest cannot know your live fills precisely enough to be trusted.
How do I account for partial fills and missed fills in a backtest?
Cap each fill at a fraction of the bar's volume so a large order fills partially or not at all, fill at the next bar rather than at the signal bar's close, and treat a limit order as unfilled unless price traded through it rather than merely touching it. Then re-run with the cap tightened and the slippage doubled. A strategy whose edge disappears under those assumptions was living on fills it would not have had. Once live, log every missed or partial fill and compare the fill rate to what the backtest assumed.