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.
QUANTCONNECT COMMUNITY
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.
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.
Gurumeher Sawhney
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_).
Colin fritz
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?
Gurumeher Sawhney
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.
Colin fritz
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!