backte.st

Transaction costs in backtests: commission, slippage and spread

Why small per-trade costs decide whether short-term strategies survive, how to estimate them in basis points, and what the doubled-costs check shows.

A strategy can look profitable before costs and lose money after them. The more often it trades, the more this matters. Costs are one of the few things in a backtest you can estimate in advance, so it is worth getting them right.

The three main costs

Backte.st models commission and slippage as basis points per side. One basis point is 0.01%, so 10 bps per side on a round trip costs about 0.2% of the traded amount.

Why frequency changes everything

The cost of one trade is small. The cost of a strategy is the cost per trade multiplied by the number of trades. A strategy that trades a few times a year barely notices a few basis points. One that trades many times a day can see its entire edge disappear.

Estimating realistic numbers

Costs vary a lot by market, broker and order size, so don’t trust a single default:

The doubled-costs check

Because cost estimates are uncertain, Backte.st re-runs every strategy with commission and slippage doubled on every entry and exit. If the result survives, the edge has some margin for error. If it turns into a weak spot, the strategy depends on getting very cheap execution.

Things a simple model leaves out

These are listed in each report’s limitations. For most retail-sized tests, commission plus slippage is a sensible first approximation.

Set your own costs in step 3 of the lab and watch how the doubled-costs check responds.

Try it in the lab

Build a strategy from indicators, no code needed, run it on a few markets and see this check on your own rules. It’s free and runs in your browser.

Open the lab