Back

Loading Symbols at Specific Time

I know I can use the AddUniverse and set the resolution to Daily to load a set of symbols each day.  However, what if the set of symbols I want to load isn't available until 4am (instead of midnight when AddUniverse gets called again)?  

Would it be more appropriate to do something like:
Schedule.Event().EveryDay().At(4,0)
and within that method to call AddUniverse again to try load data up?  

Or, would it be more appropriate to increase the resolution of AddUniverse (like very hr) and have that method check an (ick) global collection to see if data has changed and reload then?

Not sure I'm being clear, but hopefully someone understands my question.  :)  I can try to clarify if need be.  Thanks.

Update Backtest








If the universe is updated once per day, the more appropriate way it to set up a Custom User Defined Universe (see PreMarketDailyUsEquityUniverse class in the attached project), where you can define the exact moment the algorithm will poll for universe data. You probably want to make poll it a few minutes before the exchange is open to be sure no symbol is missing.

 

 

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.


Thank you for sharing the sample!  This looks like it'll help me understand more about universes and scheduling universe refreshes.  Thanks!

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