Adding Slippage and Commissions to a Realistic Backtest
Slippage and commissions matter because a backtest that ignores them shows profits you could never actually collect. Commissions are the fees your broker charges per trade, and slippage is the gap between the price you expected and the price you really got, which happens because the market moves in the instant between your decision and your fill. Both quietly drain every trade. A strategy that looks great at zero cost can turn into a loser once you subtract a few dollars per round trip, especially if it trades often. The more frequently a system trades and the smaller its average profit per trade, the more these costs bite. A realistic backtest bakes in reasonable estimates for both, so the result reflects money you'd keep, not money that only exists on paper.
Frictionless backtests flatter a strategy. How slippage, commissions, and fills change the picture and why a realistic test matters before automation.
Key points
- Commissions are the broker's per-trade fees, and slippage is the difference between your expected price and your actual fill price.
- A backtest with zero costs shows fantasy profits, since every real trade loses a little to fees and to the market moving before you fill.
- High-frequency strategies suffer the most, because small per-trade costs add up fast when you trade dozens or hundreds of times.
- Strategies with a small average profit per trade are the most fragile, as a few dollars of cost can erase a thin edge entirely.
- Slippage tends to get worse in fast or thin markets, so a strategy that trades during volatile moments should assume larger slippage.
- Realistic backtests use sensible cost estimates up front, which is far safer than discovering the drain only after risking real money.
Frequently asked questions
What is slippage in simple terms?
Slippage is the difference between the price you expected to trade at and the price you actually got. Markets move constantly, so in the split second between placing an order and it filling, the price can shift. On a market order in a fast-moving stock, you might pay a few cents or more per share beyond your target.
How much should I assume for costs in a backtest?
It depends on your broker and the market, but a common approach is to add your broker's real commission plus a small slippage estimate per trade, then test whether the strategy still works. If the edge only survives at zero cost, it isn't a real edge. When unsure, assume worse costs, not better.
Do commissions still matter with a zero-commission broker?
Yes, because zero-commission brokers still cost you through the spread and through slippage, and sometimes through how they route your order. The fee line might read zero, but the real cost of getting in and out is never truly free, especially on frequent trades.
Why does my strategy die when I add costs?
Usually because its edge per trade was smaller than the cost per trade. This is most common with strategies that trade very often for tiny profits. It's much better to learn this in a backtest than after putting real money on the line.
Does Agenticks account for costs when it backtests?
When you have AlgoAgent backtest an idea, you can tell it to include realistic commissions and slippage, and it factors those into the results so the numbers reflect what you'd actually keep. That keeps the test honest instead of showing paper-only profits.
Related on Agenticks
This content is for educational purposes only and does not constitute financial advice. Trading involves risk, including possible loss of capital.