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

Implement Sortino ratio for portfolio #459

Open dpapakyriak opened 2 years ago

dpapakyriak commented 2 years ago

I implemented an initial attempt for the sorting ratio, as asked in issue #401. In order to achieve this, I initially implemented a function to calculate the downside deviation for all assets. Then, I made the sorting_ratio() function to return the sorting ratio for a given portfolio. This is a draft, please review and contact me via email to fix any issues and/or any additional documentation.

robertmartin8 commented 1 year ago

I'm not merging this for now for a couple of reasons:

  1. I think there are probably much more efficient vectorised ways of computing downside deviation, something along the lines of a[a<thresh].std().
  2. Variable name conventions: PyPortfolioOpt uses snake_case as per PEP8
chriss1245 commented 10 months ago

Is there any update related to this topic? I consider this feature may be very interesting