Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
At what point does slippage have considerable effects on a equity

Hi, I am new to finance and have a question about slippage ratio. When does it affect a security for different market caps.

Let's say we have a security that has market capitalization of 1Billion and is in Q1500US. I am trying to get ballpark figures on when it will have considerable slippage. My trade is at market open.

a) Position concentration above 100k
b) Position concentration above 250k
c) Position concentration above 500k
d) Position concentration above 750k
e) Position concentration above 1million
f) Position concentration above 1.5million
g) Position concentration above 2million
h) Position concentration above 5million
i) Position concentration above 10million

Or does it depend on the number of shares we buy of the equity as a percentage of outstanding shares? What is safe limit in that case 0.01% of outstanding shares, 0.03%, 0.05%, 0.1% etc.

I am trying to put a slippage guard functionality in my code and need this information to code my algo.

Please advice.

4 responses

I'm be curious to hear a knowledgeable answer, but my sense is that you could maybe your algorithm could deduce something from data.history's "'volume" field.

The only things that directly affect slippage is the stocks price & volume.

From my experience, market caps provide a much larger margin of error when calculating price impact & volume (both accessed through quantopians VolumeShareSlippage model), don't even pay attention to it when calculating slippage

If you want to calculate a worst case scenario with regard to the volume limit & price impact on your algorithm pass a volume limit as well as a price limit. Heres an example (if you actually use this, I would use a larger window length for volume & the current price as a reference point rather than a SMA when setting a price restriction)

    sma_2 = SimpleMovingAverage(inputs=[USEquityPricing.close], window_length = 2)  
    avg_volumee = AverageDollarVolume(window_length = 2)  
    pipe_screen = ((avg_volumee >= 3000000) & (sma_2 >= 5.0))  
    pipe_columns = { 'sma2': sma_2, 'avg voII': avg_volumee}  
    pipe=Pipeline(columns=pipe_columns, screen=pipe_screen)  
    attach_pipeline(pipe, 'example')

Using quantopians default values for...
- volume_limit You have access to 2.5% of the current minutes trade volume
- price_impact Defaults to 0.1
Quantopians price impact example (default of 0.1 for a 25 share order in a minute where 1000 total shares are traded...)
.1 * (25/1000) * (25/1000) = 0.00625%

In our code sample, we filtered out
- Within 2 days (window length of 2) a stock must have traded at least 3,000,000 shares...
or 1,500,000 shares per day...
with this, we assume 3,846 shares are traded per minute (390 minutes in a market day)
*Note: there is a somewhat annoying amount of margin of error in these calculations
- The stock must also have a minimum price of $5

Volume limit calculation
(3,846 shares traded per minute) * ($5 minimum stock price) = $19,230 traded per minute *Using quantopians default value that assumes you have access to 2.5% of a current minutes traded volume
($19,230) * (0.025) = $480.75 worth of stock can be bought that minute (<<again this is worst case scenario)

Price impact calculation
- The maximum price impact also uses quantopians default value assuming that we have access to 2.5% of a minutes traded volume.
*quantopians default price impact constant is set at 0.1
With this in mind, no matter how many shares are traded, we won't affect the stocks price by more than...
(0.1 * (25/1000) * (25/1000)) = 0.00625% (25 shares bought, which is 2.5% of 1000 total shares traded that minute)

My suggestion is to use quantopians default values for slippage models. Better explained here, my example was using the VolumeShareSlippage model.

Hi John, I thank you for your reply. This is the type of analysis on this topic that I was seeking. Very helpful.

As Quantopian has gained more trading experience, we've been studying our own slippage quite closely. You can see one of the studies published late last year.

Since that study was published, we've also started trading through a prime broker. At some point, we'll be able to bring that performance data into an updated slippage model.

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.