Learn › Strategy testing

Trading Costs: Fees, Spread, Slippage and Funding in Backtests

Many strategies that look profitable in a backtest lose money live, and the most common reason is not the entry logic but costs. Each trade pays commissions, crosses a spread, suffers some slippage and, for leveraged derivatives held over time, pays or receives funding. Individually these are small. Multiplied by hundreds of trades, they often exceed the strategy's gross edge. This guide breaks down each cost and shows how to include it in testing.

Commissions and exchange fees

Brokers and exchanges charge either a fixed fee per order or a percentage of the trade's notional value. Crypto exchanges typically use a maker–taker model:

  • Taker fee: charged on orders that execute immediately against existing orders — market orders and marketable limit orders. Commonly in the range of 0.04–0.06% of notional on major perpetual exchanges at entry-level tiers.
  • Maker fee: charged on resting limit orders that are filled later. It is lower, sometimes zero or even a rebate.

A strategy that enters with market orders and exits on stop orders pays taker fees on both sides of most trades. A round trip at 0.05% per side costs 0.10% of notional. Because fees are charged on notional, leverage does not reduce them: on a 10× leveraged position, a 0.10% round-trip fee costs 1% of the margin used.

The bid–ask spread

When you buy at market you pay the ask; when you sell at market you receive the bid. A round trip at market therefore costs the full spread in addition to fees. On liquid instruments the spread may be a fraction of a basis point; on less liquid coins, at quiet hours or during volatile news, it can widen to many basis points. Bar data built from last-traded prices hides the spread entirely, which is why backtests on such data must add it explicitly.

Slippage

Slippage is the difference between the price your strategy expected and the price you actually received. It comes from:

  • the market moving between the signal and the order reaching the exchange;
  • the order being large relative to the size available at the best price, so it fills across several levels;
  • stop orders that trigger during fast moves and fill well beyond the stop price.

Stop-loss slippage is particularly important because it is asymmetric: it is largest exactly when the market moves sharply against the position. A backtest that fills stops exactly at the stop price is optimistic.

Funding and financing

Positions in perpetual futures pay or receive funding at fixed intervals, based on notional value. Margin positions in other markets pay interest. For strategies that hold for hours or days, these financing costs can be comparable to fees. Include them either from historical funding data or with a conservative average rate.

Putting a number on it

Consider a strategy on a crypto perpetual with:

  • taker fee 0.05% per side, so 0.10% per round trip;
  • half-spread plus slippage of 0.02% per side, so 0.04% per round trip;
  • average hold of 8 hours with funding of 0.01% per 8 hours, so about 0.01% per trade.

Total cost is about 0.15% of notional per trade. If the strategy's average gross profit per trade is 0.25% of notional, costs consume 60% of the edge. If it trades on a 5-minute chart where the average gross move per trade is 0.12%, it loses money after costs no matter how good the signals look. The same logic on a 1-hour chart, with an average gross move of 1% per trade, keeps most of its edge. This is why reducing trade frequency and holding for larger moves is often the most effective way to improve a strategy.

How to model costs in a backtest

  • Apply the taker fee to every market and stop fill, and the maker fee only to resting limit orders that would realistically be filled.
  • Add slippage per fill as a percentage of price or a number of ticks, larger for stops than for entries.
  • For perpetuals, add funding for every funding time the position spans.
  • Use your actual fee tier, not the best available one.
  • Run a sensitivity check: double the cost assumptions and see whether the strategy survives. A strategy whose profit disappears when costs rise modestly has a thin edge.

Reducing costs in practice

  • Trade fewer, larger moves — higher timeframes and filters that remove marginal signals.
  • Use limit orders for entries where the strategy allows it, accepting that some trades will be missed.
  • Avoid trading illiquid instruments or illiquid hours where spreads widen.
  • Check that position sizes are small relative to the visible order book.

Key takeaways

  • Costs per trade = fees + spread + slippage + funding, and they are charged on notional value.
  • Short-timeframe strategies are most affected because their average move per trade is small.
  • Model costs conservatively, apply larger slippage to stops, and test sensitivity to higher costs.
  • The most reliable cost reduction is trading less often for larger moves.

Educational content only. This guide explains general concepts and is not investment advice or a recommendation to trade any instrument. Trading involves substantial risk of loss, and historical or simulated results do not guarantee future performance. Read the Risk Disclosure.

Related guides