Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Please explain slippage values, volume_limit and price_impact

Hello all,

Would you please explain exactly what the default slippage values refer to? I understand the commission numbers. But the slippage numbers do not seem to reflect what I think they should mean ...

I would particularly like to know how to set a percent slippage of 5 basis points for buying, 5 basis points for selling. And be able to raise the volume limits substantially (ie allow the backtest to take 100% of historical volume during the minute bars).

Here is the default, as a reminder:

    set_commission(commission.PerShare(cost=0.0075, min_trade_cost=1))  
    set_slippage(slippage.VolumeShareSlippage(volume_limit=0.025, price_impact=0.1))  

Thanks,

ted

2 responses

I have actually run this strategy for a few years in the past, using a real brokerage account. So I know what my slippage was. It was about 10 basis points round trip, including commissions and price slippage. So I would like to hard code that into my backtest. Any feedback would be appreciated.

That slippage included forcing the positions to completion. So I would like to backtest a 10 basis point slippage and 100% completion of purchase and sale orders.

OK, I am using the following:

    set_commission(commission.PerShare(cost=0.0075, min_trade_cost=1))  
    set_slippage(slippage.FixedSlippage(spread=0.02))  

Full commissions and a 2 cent spread. In my experience, for my strategy, I think this is realistic.