Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Slippage Definition

Hi,

I'm a bit lost when it comes to understanding the definition of slippage:

Is the slippage the difference between the order VWAP and the Market DAILY VWAP, or is it the difference between the order VWAP and the price at which the order was first liquidated?

Thanks

1 response

Slippage, as used on Quantopian, is more of a concept than a specific calculation and it's strictly a backtesting concept. VWAP doesn't enter in. The premise is we have actual trade data. We want to simulate the trades that would have taken place given a particular order. That order (obviously) isn't included in the actual trade data. The thinking is, if that order would have been in the original data, it would have impacted pricing. If it was an open long order, the increased demand would have raised the price, and if it was a close long order it would have depressed the price. If the order was a short, it would have the opposite effect.

There have been a lot of studies on how to guestimate what that impact would have been, however, in the end, it is just a guess. Certainly, if one wanted to buy a single share of AAPL that order would have gone through and probably made zero impact on the price. On the other hand, an order for 10M shares of AAPL may have definitely impacted price and one would have probably ended up paying more than the historical data suggests. That increase is called 'slippage'.

The impact on the fill price for an order is simulated in Quantopian backtests using a slippage model which is really just a function to calculate fill price and fill volume. There are some built in slippage models or one can write their own. Check out the details here https://www.quantopian.com/docs/user-guide/tools/algo-api#setting-slippage-and-commissions .

The default slippage model, if one doesn't explicitly specify one in an algo, is FixedBasisPointsSlippage. The code for how the fill price and volume are calculated can be found here. Basically, it increases the cost by 5 basis points (.0005) and limits the filled shares to 10% of the minute volume. If the order is larger than 10% of the minute volume it will be spread out over several minute bars with potentially a different price for each portion.

Hope that helps.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.