Best Practices

How to build trading costs and slippage into your backtest

A backtest that skips costs reports an edge you will not collect. Commissions, spread, slippage, and overnight financing each take a slice of every trade, and on a strategy with a small average win they decide the verdict. Model each cost per trade, rebuild the backtest net, and upload net trades so the Edge Score grades money you can keep.

Last updated: 2026-06-10

Why do trading costs change a backtest verdict?

Costs decide marginal strategies. A system that earns a small average win per trade can be profitable gross and a loser net, because each cost comes out of every single trade, win or lose. The more often you trade, the more times you pay, so high frequency systems feel costs hardest.

EV per trade is the number that moves. A strategy earning 0.15R per trade gross loses a third of its edge to costs worth 0.05R, and all of it to costs worth 0.15R. The equity curve keeps its shape while the slope flattens, which is exactly the gap many traders meet when live results come in under the backtest.

Nobody backtests their broker. The broker shows up anyway.

Which costs hit every trade?

Four costs cover most accounts. Commission is the broker's explicit fee per trade or per contract. Spread is the gap between bid and ask, paid on every round turn whether you notice it or not. Slippage is the distance between the price your signal wanted and the price your order filled. Financing, or swap, accrues on positions held overnight.

CostWhen it hitsHow to model it
CommissionEvery trade, fixed or per contractExact number from your broker's schedule
SpreadEvery round turnTypical spread for your instrument and session
SlippageMarket orders, stops, fast marketsConservative estimate per side, larger for stops
Financing / swapPositions held overnightBroker's overnight rate times nights held

Day trading systems can often drop the financing row. Swing systems cannot, because nights held multiply it.

How do you estimate slippage without live data?

Estimate conservatively and per order type. Limit orders fill at your price or not at all, so their slippage is near zero but they miss trades. Market orders and stops pay the spread plus movement, and stops fire exactly when the market is moving against you, so they slip the most. A practical starting point is one spread per market order side and two or more for stops, widened further for news events and thin sessions.

The honest test is comparing your first live fills against the signal prices. A few dozen live trades tell you what your real slippage is, and that number replaces the estimate. If the backtest only survives with zero slippage, it is not an edge, it is a simulation artifact.

Stops slip the most exactly when you need them least.

How do you rebuild a backtest net of costs?

Subtract the full cost from each trade's result before anything else reads the file. Per trade, that means commission for both sides, one spread, expected slippage for the order types used, and financing if the position held overnight. In R terms, convert the total cost to a fraction of your planned risk: a 10 dollar round turn cost on a trade risking 200 dollars is 0.05R off every result.

Rerun the backtest on those net numbers, not on the gross ones with a mental discount. The drawdowns deepen a little, the win rate dips on trades that were barely positive, and the EV per trade lands where your account will land. In simpler words... subtract first, judge after. That net file is the one worth uploading.

What changes in your Edge Score when costs go in?

The score drops to the level your account can reproduce. Quantprove scores the numbers in the file and cannot tell gross from net, so a cost free log reports a higher EV per trade, a higher Edge Velocity, and a better Edge Score than the strategy earns. Costs left out is the first entry in the mistakes that inflate an Edge Score for a reason.

A score that drops after costs is the honest one. The Edge Score on net trades grades the edge you can actually trade, and a strategy that holds a solid score net of costs has cleared a bar most backtests never face.

When is a strategy too cost sensitive to trade?

When the edge and the costs are the same size. Compare your net EV per trade to the total cost per trade: a strategy earning 0.20R net against 0.10R of costs keeps two thirds of its gross edge and has room to breathe. A strategy earning 0.03R net against 0.12R of costs is a toll road for your broker, and one tick of extra slippage erases it.

Frequency multiplies the problem in both directions. A cost heavy system that trades daily compounds the leak; the same edge traded less often on a higher timeframe may clear it. Costs are the quiet way an edge dies on paper. The loud way is an edge that fades in the market itself, and that is a different diagnosis: how to know when your strategy stops working covers it.

Frequently asked questions

Yes. Subtract commissions, spread, slippage, and any financing from each trade so the file holds what you keep. Quantprove scores the numbers as given and cannot tell gross from net, so a cost free log reports a higher Edge Score than the strategy earns.
A conservative starting point is one spread per market order side and two or more spreads for stops, widened for news and thin sessions. Limit orders slip little but miss fills. Replace the estimate with your measured live slippage as soon as you have a few dozen real fills.
Yes, whenever the average win is small relative to the cost per trade. Each cost comes out of every trade, so a system earning a thin gross edge can lose its entire margin to commissions, spread, and slippage. High frequency strategies are the most exposed.
Only if positions hold overnight. Day trading systems can usually skip it. Swing and position systems cannot, because the overnight rate accrues for every night held and compounds across the hold time into a real drag on each trade.
It is accurate, which is better than flattering. The drop is the share of your backtest edge that belonged to your broker. A strategy that keeps a solid score on net trades has a tradable edge; one that collapses was living on costs you had not counted.

References

Validate your strategy in under a minute.

Upload your trade log and read your Edge Score, free. No credit card required.

Start for freeHow it works

No credit card required·Swiss Made