Back

Slippage while not using Resolution.Tick

Hey folks,

I'm trying to best determine slippage before buying a security. There is already a nice looking SpreadSlippageModel in the code base that seems to calculate slippage based the difference between ask/close and bid/close which should seal the deal. But, it only seems to work with Tick resolution.

When calling asset.GetLastData() on anything other than a Tick, I don't have access to the previous ask and buy prices. So I think I really need to get a hold of the last Tick. Is there a way to do this? I gave the History method a shot, but it doesn't support Tick + Steps, only timespan. And I can't accurately assume when the last tick would have been nor do I want to incur such a performance hit increasing the timespan, especially when around day and weekend fringes.

So, how do I get the last Tick when working with a security in Minute or Second resolution?
Update Backtest








One solution could be to subscribe to the tick data but use consolidators to produce one second bars. This would allow the usage of the SpreadSlippageModel. If you intend to use the SpreadSlippageModel with equities, however, beware that our equity data is trade ticks, not quote ticks, so there is no bid/ask data currently with the equities.
0

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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed