robertmartin8 / PyPortfolioOpt

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

Multiple objective #357

Closed amos-peter closed 3 years ago

amos-peter commented 3 years ago

Hi, is there a way for me to have multiple objectives. For example, maximize a set of scores and minimize volatility? Thank you!

robertmartin8 commented 3 years ago

Hi @amos-peter,

You have two options here:

1) define a new objective function like "scores - c × volatility" then maximise this objective. The constant c will need to be chosen depending on how you want to tradeoff the scores and volatility 2) maximise scores subject to a vol constraint, or minimise vol subject to a scores constraint.

Best, Robert

amos-peter commented 3 years ago

Hi Robert. Thank you for your suggestion. I agree that I might need to define a function to set the percentage trade-off for multiple objectives.

robertmartin8 commented 3 years ago

Cool. Let me know if you get stuck!