robertmartin8 / PyPortfolioOpt

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

Feature request: Default short ratio to sum of negative weights #259

Closed arcaputo3 closed 3 years ago

arcaputo3 commented 3 years ago

As of now, short ratio must be set by the user. While it makes sense for a user to have this option, I believe it would be better to just use the sum of the negative weights by default and allow the user to override if necessary. Also, I believe a value error should not be thrown if short_ratio = 0 as this just implies a long only portfolio.

Loving the package! Keep up the good work.