Hi,
What is the difference between the securities contained in Securities and those contained in ActiveSecurities? From testing, it seems like ActiveSecurities contains those securities one has subscribed to in the algorithm (in a framework algo, this would be through adding them to one's universe) whereas Securities also contains things like extra FX rates to convert from account to display currency.
Is this correct?
Link Liang
Hi Douglas,
Yes you are correct. In fact, Securities is a collection of securities that were part of the algorithm during its lifetime, and ActiveSecurities is a collection which the algorithm subscribe and wants to trade in the present.
Here is a backtest logging the difference between those two. The log shows that once a security is added, it will never be removed from "Securities", and will be removed from "ActiveSecurities" upon change in universe selection.
Hope it helps!
Douglas Stridsberg
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!