WealthJot.ai

Modelling Costs & Slippage

intermediate7 min read

The gap between the backtest fill and the real one. Ignore it and your edge evaporates live.

A backtestTesting a trading strategy on historical data. fills your orders at perfect prices for free. Reality charges you — brokerageAn intermediary licensed to execute your trades., taxes (STT, stamp duty, GST), exchangeA regulated marketplace where shares are bought and sold. fees, and *slippageThe gap between expected and actual trade price.* (the gapA jump between one bar’s close and the next bar’s open. between the price you wanted and the price you actually got). Modelling these honestly is what separates a backtestTesting a trading strategy on historical data. that survives live from one that dies on contact.

The cruel truth: transaction costs hit hardest exactly the strategies that look best on paper. A high-frequency, many-trades strategy might show a glittering backtestTesting a trading strategy on historical data. — but each of its hundreds of trades pays brokerageAn intermediary licensed to execute your trades., taxes and slippageThe gap between expected and actual trade price., and those drips compound into a flood that can turn a “profitable” system into a guaranteed loser. The more a strategy trades and the smaller its per-trade edgeA repeatable, structural reason your trades win over time., the more costs dominate. Worse, **slippageThe gap between expected and actual trade price. grows with size and in volatile/illiquidHow easily an asset can be bought or sold without moving its price. conditions* — precisely when you most want to trade. So you must model realistic costs (not zero, not a token figure) on every* fill — and be especially ruthless with high-turnover strategies. A backtestTesting a trading strategy on historical data. that’s only profitable assuming free, perfect fills isn’t a strategy; it’s a fantasy. Costs are where most beautiful backtests go to die.
ExampleA scalping strategy shows +30% CAGRCompound Annual Growth Rate — the smoothed yearly return. with free fills. Add realistic costs — say 0.1–0.2% round-trip per trade across its 2,000 annual trades — and the same strategy bleeds to negative returns. The edgeA repeatable, structural reason your trades win over time. was real-but-tiny, and costs ate all of it. A slower strategy trading 30 times a year barely notices the same per-trade cost.
Key takeawayReal trading pays brokerageAn intermediary licensed to execute your trades., taxes and *slippageThe gap between expected and actual trade price.* — and these scale with turnover and worsen with size/volatilityThe size of price swings — not their direction.. Model realistic costs on every fill; they punish high-frequency, thin-edgeA repeatable, structural reason your trades win over time. strategies most. A backtestTesting a trading strategy on historical data. profitable only with free, perfect fills is a fantasy — costs are where pretty backtests die.
FAQs
How much slippage should I assume in a backtest?

Be conservative and realistic for your market and size — a common approach models a few basis points plus extra for volatility and volume (this platform uses a realistic slippage model by default). When unsure, over-estimate: a strategy that survives pessimistic cost assumptions is far more trustworthy than one that only works assuming frictionless fills.