All posts

Fees, funding and slippage: the three costs a backtest forgets

4 min read Stralines
  • #education
  • #costs
  • #backtesting
  • #futures

A chart shows prices. It does not show what it costs to act on them. Three costs sit between a rule that looks fine on paper and the same rule run with real money, and they matter most for exactly the rules that act most often.

1. Fees: small, certain, and paid twice

Every order that fills pays a fee, and a round trip is two orders: one in, one out. Exchanges usually charge less for an order that waits in the book (a maker) than for one that fills immediately (a taker).

The numbers look tiny. Suppose 0.05% per side. A round trip is 0.10% of the position. Now do the arithmetic for an active rule:

  • 5 round trips a week is about 260 a year.
  • 260 × 0.10% = 26% of the traded position size per year, in fees alone.

That is not 26% of your account unless every position is the size of your account, but the point stands: a rule that acts often must clear a real hurdle before it has done anything. A rule that acts ten times a year barely notices fees. Frequency is the multiplier.

2. Funding: rent on a perpetual position

Perpetual futures have no expiry date, so exchanges keep their price close to the underlying market with a periodic payment between the two sides, called funding. Commonly every eight hours, one side pays the other a small percentage of the position’s value.

Which side pays depends on the market at the time, and it changes. What stays true is the shape of the cost:

  • It is charged on the full position value, not on your margin. With leverage, that is a multiple of the money you put up.
  • It accrues with time held, not with the number of trades. A position kept open for weeks pays, or receives, dozens of times.

A rule that holds for an hour can ignore funding. A rule that holds for a month cannot. Backtests built from price candles alone usually leave it out entirely.

3. Slippage: the price you got was not the price you saw

A backtest fills every order at the price printed on the chart. A real order fills against whatever is actually waiting in the order book at that instant. The difference is slippage, and it grows with three things:

  • Order size relative to the liquidity available at that moment.
  • Speed of the market. In a fast move, the price you reacted to is already gone.
  • Order type. A market order accepts whatever price is there. Stop orders typically become market orders when triggered, so they slip most precisely when it hurts most.

Slippage is the one cost you cannot look up in a fee table. You can only measure it, by comparing the price you intended with the price you received.

Putting them together

Take a rule whose backtest shows an average result of 0.30% per trade before costs. Then subtract:

CostPer round trip
Fees, two sides at 0.05%0.10%
Slippage, a modest 0.05% each way0.10%
Funding over the holding periodvaries, sometimes more than both

Two thirds of the paper edge is gone before funding is counted. Nothing about the rule changed. The chart simply never charged it for anything.

This is why a thin average result per trade, however consistent it looks, is fragile, and why two honest-looking backtests of the same idea can disagree: one of them included costs.

What to check in any result you are shown

  1. Are fees in it, and at what rate? “Net of fees” with no rate stated is not an answer.
  2. How are fills modelled? At the candle’s close, at the next open, or at the touch of a level? Each one is more optimistic than the last.
  3. Is funding included for anything held longer than a day?
  4. What is the average result per trade, and how does it compare to the cost of a round trip? If they are the same size, the result is noise.
  5. How many trades a year? The more often it acts, the more the costs compound against it.

What this does not promise

Accounting for costs makes an estimate more honest. It does not make it a forecast. Fee schedules change, funding swings, and liquidity thins out without warning, usually at the moment it is needed.

New to any of these terms? The glossary defines maker, taker, funding and slippage in plain language.


Educational content only. Stralines Labs Private Limited is a software company. Nothing here is investment advice. Crypto markets are highly volatile and trading can be risky; past prices do not predict future results.

One lesson a week, by email

Plain-language lessons on risk, position sizing and reading a replay honestly. Education only, never advice, and never a tip.

Welcome to Stralines

Sign in or create a free account.

Continue with Google

Or