Measuring Slippage
By Dave Mabe
In the previous email on determining how much slippage is too much for a strategy, I shared a way to pre-plan your slippage limit, so you have a benchmark to compare against.
Now, let's go over measuring slippage from your live trades.
Remember, there are three types of slippage (well, four really, but three are the bad kind):
Entry slippage - you got a worse price than your backtest on your entry order
Exit slippage - you got a worse price than your backtest on your exit order
Missed trades/partial fills - you expected to get X shares, but you only got some percent of X
We need to compute all three of these to get an accurate measure of the shortfall between your live trading and your backtest.
In my daily review, I have some automation that runs a backtest for the strategy and then compares the fill prices with the backtest.
The Trade Client that comes with MabeKit makes this easy by automatically creating a file with your executions by strategy.
Let's say you had one long trade where your ideal entry price was 50.00, but your fill was 50.05.
Your slippage is 50.05 - 50.00 = 0.05 per share multiplied by the number of shares.
Now, let's assume you have another signal, but you got no fill on the trade. How do you compute the slippage there?
Well, it needs to come from the backtest - assuming you got the trade at full size, how much would you have made?
Add that to the missed trades bucket.
Exit slippage is computed in the same way as entry slippage.
Now you have three buckets of slippage.
But there's one important step to compare apples to apples with your backtest.
You need to normalize the slippage to account for any sizing differences with your backtest.
When you increase your size in live trading, you don't want to have to change the sizing in your backtest to reflect it.
All my backtests have a standard, easy-to-compute sizing that stays constant.
And then I normalize my live trading to the backtest sizing for comparison.
Now you should have your total slippage for a given trading day, normalized to a number you can compare to the benchmark from your backtest.
Next time, we'll discuss how to track this over time to prioritize how to address slippage.
-Dave
P.S. "The process of becoming a more systematic trader honestly mirrors the journey of becoming a trader at all—lots of ups and downs, frustration, second-guessing, and moments where you want to quit. And then every once in a while, there’s a real moment of clarity and forward progress. Using the AFL code generator in MabeKit feels like one of those moments." - Mike A.