Back

In Active Securities but not in Slice?

What are some reasons why a security in ActiveSecurities might have data but not be in Slice?  This has been a consistent problem for me and big source of confusion.  Really trying to learn the platform.  

Update Backtest







ActiveSecurities lets you select the assets currently in your universe. This is useful for iterating over those securities from your universe selection. It has all the same properties as the Securities collection. Slice groups all data types together at a single moment in time and feeds it into the algorithm. So if there is no data for a Symbol for a certain time, it will not be in the Slice object. This problem can be prevented by using the method data.ContainsKey(_symbol_).

0

What would cause a symbol not to contain data if it is in the current Universe Selection?  I thought that if FillFoward was on data would always be present since the gaps would be filled in with the last available information no? 

0

Your intuition on FillForward is correct, however, there needs to be a data point to fill forward first in order for the property to be implemented. If there are no trades or the algorithm is in the same time loop then FillForward won't be ready yet.

0

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