I have the made the attached backtest which attempts to pull FRED M2 data via API and provide via a custom data set.
The first datapoint is fed to the algorithm via the on_data event, however no further datapoints are received.
Is there an issue with my implementation of the Custom Data class?
Mia Alissi
The provided corrected code still contains issues related to undefined modules or classes. To fix these problems, please ensure you import the relevant modules at the top of your script. Specifically, import
datetime
,xml.etree.ElementTree as ET
, and any other necessary modules likejson
if you're using them in another part of your implementation.Here's how you can do it:
Ensure to replace
datetime.strptime
and other uses ofdatetime
appropriately, importingdatetime
correctly, and handleParseError
fromET
.Sources: US Federal Reserve (FRED) - QuantConnect.com), Defining Data Models - QuantConnect.com, Alternative Data - QuantConnect.com
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.
Rich McPharlin
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!