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!

 

 

Author