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?
Michael Handschuh
Levitikon
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!