Estimating Slippage in a Backtest
By Dave Mabe
Most systematic traders overcomplicate things by trying to model a slippage estimation for every trade in their backtest.
Here's the thought process:
Since backtesting is theoretical, you can engineer a solution that makes it reflect the reality of live trading.
Some trades will have more slippage than others, so just add some built-in slippage into your backtest based on some "thickness" criteria like volume, average volume, or something else.
Add level one data (L1) to get more "accuracy."
But if L1 data can make it more accurate, then L2 data can make it even better!
I'm sure your overeager LLM will be happy to help you overengineer a backtest that makes all sorts of crazy attempts to reflect live trades.
I think this is a total waste of time.
(Especially as you size up your live trades and now your slippage estimate in your backtest needs to adjust.)
It's ok if your backtest reflects perfect execution, even though your live trading will never measure up.
In fact, I prefer my backtests to simulate ideal executions.
Here's why.
Because it provides an ideal baseline - a goal for my trade execution to shoot for.
Once you give in to the fact that your live trading isn't going to measure up to the backtest, you can think about the problem more clearly.
The question isn't whether your live trading will measure up, but how big the difference will be.
Any attempts to model slippage in your backtest just muddy the waters and make that question harder to answer.
The real question you're trying to answer is:
What level of slippage would be needed to make this strategy unprofitable to trade?
I'll break that down tomorrow...
-Dave
P.S. Wish you could backtest your ideas - without spending months learning to code? Run your first backtest in an afternoon using my Amibroker AFL Course.