I am working with daily custom data and in general it works ok. The issue that I have is specifically the first day the algo was deployed.
For reference I declare the custom data in this way
self.AddData(CboeVixExternalData, "VIX", Resolution.Daily)
And I access this way:
last_vix = self.Securities['VIX'].Close
My guess according what I debuged is that, as the custom data is declared Daily, it is updated near 3 AM UTC. Now, if I deploy the algo after that moment, the custom data *is not* loaded. For example, if I deploy the strategy a few minutes before the market open, the custom data is empty, but next day, after ~ 3AM, the data is loaded properly.
The question is: is there any way to force or do something to have the custom data available the first day the algorithm was deployed?
It is specially important in two cases: 1) when I work during the night to have an update ready for the other trading day; 2) When the algo crashed because of memory and I need to re-deploy immediatly.
I clarify that I wrote the example with VIX, just as an example, but I work with some other custom metrics.
Thanks for you help.
Alexandre Catarino
Hi Gabriel Moncarz ,
If you set a warm-up period, the data will be available:
self.AddData(CboeVixExternalData, "VIX", Resolution.Daily) self.SetWarmUp(timedelta(5)) # Warm up 5 days of data to ensure previous days are trading days
Gabriel Moncarz
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!