When I warm up a weekly consolidator + indicator, I found that it uses Thursday to Wednesday prices as a week, which is wrong. Did I configure something wrongly?
For example, I want to warm up by using TQQQ weekly close price.
When debugging, the update() function enters with:
- 1st round: time=02/11/2010 (Thursday), close=$88.09, which seems to be the close price of 02/17/2010 (Wednesday)
- 2nd round: time=02/18/2010 (Thursday), close=$88.3, which seems to be the close price of 02/24/2010 (Wednesday)
- 3rd round: time=02/25/2010 (Thursday), close=$94.2, which seems to be the close price of 03/03/2010 (Wednesday)
Mia Alissi
Here is the corrected version of the code:
This version addresses the issues related to read-only properties, undefined imports, and method signature mismatches.
Sources: Short Term Reversal, Mean Reversion Effect In Country Equity Indexes, Beta Factor In Country Equity Indexes, Detecting Impactful News In ETF Constituents, Add Universe Selection Model Algorithm
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.
David
The response from Mia AI seems to be useless …
David
The code which creates consolidator and indicator is in the alpha.py file. I copy it as below:
David
I also found that if I change algorithm's set_start_date and indicator's warm_up_period, the starting day of a week for warmup could be changed, but I cannot find a pattern how it changes accordingly.
Louis Szeto
Hi David
It is because the “week” is starts at the first data point received, so it is dependent on the start date. If you wish to set the bar starts at Sunday/Monday, you'll need to set a custom function to roll back the start time:
Best
Louis
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.
David
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!