Getting History without Subscribing to Asset Data

Hi there,

Someone mentioned to me that you can fetch history for a stock without subscribing to it's data (I'm tracking a lot of symbols and it was taxing to track all of the data for all of the stocks all of the time). 

But I can't seem to figure out how to do that. Basically I have my trigger event, and when this happens I want to fetch the last year of trading data for all of the stocks that are in the applicable groups for this event. 

In my head, what I think he meant was to not request the data of every stock every day to add to my rolling window, but rather use the history (method? call? function?) when my trigger function occurs. This would mean that it's not accessing the data every day correct?

Apologies for the rookie questions, I appreciate the help!


Update Backtest

Historical data can be requested via the symbol instead of subscribing to the data. In the algorithm below historical data for the past year is requested in a triggered event using a symbol. This is not accessing data every day; only during the triggered event.  


Thank you very much, this is exactly what I needed!


Update Backtest


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.


This discussion is closed