Hi folks,
Since couple of weeks, i was able to backtest this strategy but 2 days i got this error:
"Runtime Error: Trying to dynamically access a method that does not exist throws a TypeError exception. To prevent the exception, ensure each parameter type matches those required by the 'float'>) method. Please checkout the API documentation.
at OnData
self.bb1.Update(self.Time in main.py: line 73"
Not sure why suddenly i got this error on the BB update. Can someone help me on that?
Thanks in advance!
Mohamed
Louis Szeto
Hi Mohamed
We cannot reproduce this error, is the backtest attached faulty to you? Or do we need any tweak to reproduce that?
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.
Mohamed Zerouale
Hi Louis,
Error seems to appear occasionally, it was gone and now it is back. Not sure how to fix this.
Mohamed
Alexandre Catarino
Hi Mohamed Zerouale ,
The Update method accepts datetime and float objects:
The error message indicates that float(portfolio) is not a valid float. You can test whether it's a NaN:
The historical data request will include NaN if the request starts before the date that security started trading.
Best regards,
Alex
Did you know you can own a part of QuantConnect and shape the future of quant finance? See more and invest in at wefunder.com/quantconnect
Mohamed Zerouale
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!