backtest error
During the algorithm initialization, the following exception has occurred: AttributeError : 'MeanVarianceOptimizationPortfolioConstructionModel' object has no attribute 'SetPythonWrapper' at Initialize in main.py:line 40 AttributeError : 'MeanVarianceOptimizationPortfolioConstructionModel' object has no attribute 'SetPythonWrapper'How do I debug this:?
Rahul Chowdhury
Hey Dave,
It's difficult to debug the issue without seeing the code. Could you please post a code snippet which produces the issue? It will help us greatly in understanding the issue.
Best
Rahul
DaveGilbert
I should have included my clone of Jack Simonson's code (January 2019)
Alexandre Catarino
Hi DaveGilbert ,
We have improved the base PortfolioConstructionModel and the version Jack's algorithm is using is out-of-date.
Please find the fixed version below.
DaveGilbert
Thanks for your help!
Can I suggest a short video/tutorial to help debugging a strategy using the framework? I think you guys have done a great job with the framework/pipeline idea. Are there other noobs struggling trying to debug?
Jared Broad
Hey DaveGilbert check out this video; its not specifically for the framework but all the same concepts apply:
https://www.youtube.com/watch?v=xtV_y43Q_ZsThe 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.
DaveGilbert
Hey Jared thanks so much for all the great work!
I used Quantopian but I want to use Quantconnect instead. I like the idea of your framework, your alpha streams and live trading. With Quantopian, I was able to develop a strategy with a jupyter noteboook and run it with zipline and test data offline very easily. I'm finding it much more challenging to do the same with QC - I don't know C# and I use Linux (it seems to be much easier using Windows). I could run and debug a strategy very easily online or using Pycharm to debug, if I needed to.
I followed the excellent Episode 1: Traunch Rebalancing Risk Parity without a problem but, for me, it's more challenging to do the same.
Thanks again!
DaveGilbert
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!