Hi everyone!
In the research notebook, if we make a history call for data at minute resolution, the latest data that we have is the data from the day before the most recent trading day, i.e. today is 11/17/2021, the latest data point is from 11/15/2021. In this case, should we still warmup our indicators with history data for live-trading or is it better to just warmup our indicators with live data and prevent our algorithm from making any trades until our indicators are warmed up?
Mak K
Could you attach the code please?
Li Cheng
Hi, thanks for replying to this thread!
Sorry I forgot to attach a code, I've attached a backtest in this reply, the code should be in the research notebook of the backtest.
In short, the code should be the following:
The latest trading day is the 23rd of November 2021, but the most recent minute resolution data is from the 22nd of November 2021. I'm assuming that the minute resolution history data will be updated at the start of the trading day on the 24th of November 2021, with the data from 23rd of November 2021?Â
If my assumption is true, then I'm assuming that we should not use history data to warmup our indicators if we start our live-trading algorithm in the middle of the trading day on the 24th, because history data will not include the data from the morning of the 24th till the time we start running our algorithm.Â
Varad Kabade
Hi Li Cheng,
Thank you for your patience. We only have data from yesterday because we provide data from data vendors, not data we collect in our data feed. In live mode, however, the algorithm will warm up with data that we collect with our data feed to complete the gap between the backtest data and the moment the algorithm is deployed.
Best,
Varad Kabade
Li Cheng
Hi Varad, thanks for the information!Â
Just to clarify, that means that I don't have to wait till Sunday to deploy my algorithm when the backtest data is updated with Friday's data; I can deploy it at any time (i.e. 2 pm on Wednesday) and the indicators in my algorithm will be warmed up with the most recent minute resolution data (data from 1 - 2 pm on Wednesday), am I correct?
Rich McPharlin
Is there an answer to Li's question?Â
I've just realised this that an algo started at an arbitrary time seems to be lacking the most recent day's data.  Will this ‘catch up’ at some point, or do I need to code my own warm-up routine at open on the next day?
Li Cheng
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!