Back

Problem with MeanVarianceOptimization

Dear all, 

I am new to QuantConnect, apologies if my question might be a bit silly. 

I was trying different Portfolio Construction Models and I encountered the following issue with the MeanVariance one. It basically goes on for one month and then gives the following error:

Runtime Error: InvalidIndexError : Reindexing only valid with uniquely valued Index objects InvalidIndexError : Reindexing only valid with uniquely valued Index objects.

The weird thing is that this only happens when the resolution is set to Daily, When I use hourly resolution it completes the backtest without errors. 

I tried putting some flags here and there and everything seems to work. My impression is that the problem arises when the PortfolioConstructionModel returns the target. 

Also, with Daily resolution, everything works if I use the InsightWeightingPortfolio model.

Any ideas about it?

Thank you for your help!

 

 

Update Backtest







0

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.


Update Backtest





0

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.


Loading...

This discussion is closed