Slippage / bid-ask spread

Hi,

There’s a lot of discussion about slippage on the forum, and the P123 tools make it easy to backtest models using slippage. Transaction fees that you pay your broker are also important and can be accounted for in the backtest. A backtest without slippage or transaction fees could give seriously misleading results of course.

However, effectively, you often pay the bid-ask spread as well. I understand that the spread varies from stock to stock and from time to time, so it’s hard to incorporate that into a backtest accurately. So my first question is, can/should I see part of the slippage that I use in a backtest as accounting for the bid-ask spread?

My second question is what slippage (excluding bid-ask spread) means when I use Next Open, Next avg hi/lo, or Next Close in simulations. If I use Previous Close, then I understand that slippage compensates for the fact that I won’t be able to get the prices that my backtest assumes. But if I backtest with prices on Monday, then I should be able to get similar prices when I actually trade on Mondays. At least, if my trades are not impacting the prices. So can I assume slippage to be near zero in this case?

So in short, would it make sense to set slippage to half of the expected bid-ask spread for the kinds of stocks the model is trading when using Monday’s prices? (Half because I think you pay the bid-ask spread once for each pair of buy/sell, right?)

Thanks,
Peter

Hi Peter:

For about half of last year I kept detailed track of the bid-ask spread when I initiated my trades as well as how much my buying and selling “moved the market”.

For the small cap stocks my methods picked, the average spread was 0.42% and on average I moved the market by about 0.19% when buying and selling.

Here is what I mean by moving the market: if the ask is 10.00 my first lot of shares bought come at 10.00 but sometimes I have to pay 10.10 (or more) to get the final lot of shares that I want and my average cost would be 10.05.

So based on last year’s data, I do my sim testing with the following slippage settings.

Bid-Ask slippage component = 0.21% (1/2 of the average spread I observed between 11am-4pm).
Moving the market component = 0.10% (1/2 of the difference between the best and worst price I get on average)
Total slippage = 0.31% (but often I set my slippage to 0.40% for sims - see note2 below)

Note 1 - My Sim price is set to Avg (not open) since I usually do my trading late in the morning or the afternoon. From observtaion, my type of stocks have significantly higher spreads in the first hour of trading. My guess is I would need to double the spread slippage if I was to run my sims using the Open price.

Note 2 - My observed slippage of 0.31% is almost certainly a bit low for use in my sim tests. When I am buying into a position and I start moving the price significantly (more than 1%), I stop. So sometimes I end up with only 1/3 or 1/2 of my typical position size. Of course, the sim tests will assume all positions are fully bought. To compensate, I should set my slippage for my sims a bit higher. Also, I usually pass on buying into stocks if they have a wide spread (1% is my maximum). Sometimes, I’ll try a limit order that splits a large spread but frequently, I just move on to another pick from the list. But my sim tests are going to buy such stocks with wide spreads. For these reasons I often set my sims slippage to 0.40%. Perhaps I should be setting it to 0.5%, but I do sim testing to get an idea of what works, not to try to predict how much a method would actually make.

I hope this helps you figure out how you want to set the slippage for your sim tests.

Brian

Brian,

Thanks, that’s really helpful! I hadn’t thought of a metric to measure how much my orders move the market, very good idea.

I’ll dissect my broker statements and the past recommendations of the models I trade, to determine the statistics you mention.

Thanks,
Peter

Brian, Great information. What do you think would happen if you placed a market at the open order? Would that get rid of the bid/ask spread component and leave only the moving the market component?

I am fully invested now but when I am holding some cash it seems it would make sense to place some market at the open orders in a few of my ports.

Peter,

I have found similar slippage a Brian has. My analysis from a few years ago was just over 0.4% for stocks with a liquidity between $200K and $1Mil. So I run 0.5% in my Sims that buy stocks from that range of liquidity. The Higher the liquidity a Stock has, the lower the slippage it will have. I get 0.1%, or less, for stocks with liquidity above $10Mil.

I divide the slippage into 3 parts; the difference between a Port’s recommended Friday close price and the Monday open price, the difference between the Monday open price and the price when I place a trade, and the difference between the price when I place a trade and my fill price.

You can run Sims to determine the Difference between the last close and the next open, average of Hi & Low, and next close depending on what time of day you typically trade. I add that difference to the slippage above to my Ports since they only can use Previous close for the recommendations. To account for that I run a higher slippage in my ports than I do in my Sims.

Denny :sunglasses: