robertmartin8 / PyPortfolioOpt

Financial portfolio optimisation in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity
https://pyportfolioopt.readthedocs.io/
MIT License
4.26k stars 929 forks source link

Expected Returns in Mean Variance Optimisation #455

Closed karlemilzt closed 2 years ago

karlemilzt commented 2 years ago

When using Mean Variance Optimisation, you always get the same output regardless of the expected returns input. This should not be the case. I have checked both for mean historical returns and CAPM-returns. I have doubled checked that the code is not wrong, and I can't find anything in the source code about it. I am pretty sure it is a bug.

Could someone please confirm which expected returns it uses?

agj60 commented 2 years ago

This is certainly the case for minimum variance portfolios, that don't depend on expected returns. Otherwise, yes, optimal portfolios for different sets of returns should be different.

karlemilzt commented 2 years ago

Oh wow, I what a blunder from my side. Thank you!