PyPortfolioOpt
PyPortfolioOpt copied to clipboard
Optimizing for max sortino
What are you trying to do? I'm trying to optimize for max sortino using PyPortfolioOpt.
What have you tried? I've gone through the EfficientSemivariance docs, but could not find a function to optimize for max sortino.
Is there a simple way to do this?
Hi @cemozerr,
I'm not sure how one might do that (apart from looping through a range of returns, using efficient_returns
, then selecting the max).
Even max sharpe requires a nontrivial variable transformation to make it convex – it's not obvious to me how to do this transformation for Sortino.
Maybe @phschiele has come across some technique for it?
Best, Robert
This would definitely require some work to get it right using the "exact" formulation of the efficient semivariance. For now, looping over the returns or maximizing the Sharpe ratio using the semi covariance matrix (i.e., Estrada's method) seem like good approaches. Seems like a fun project to dig into the details, though, so perhaps I'll look into it at some point.
I like this idea too. I think the use case for the sortino is crypto... the sharpe penalizes big upsides (though im probably butchering that explanation) but thats kinda what some people want outta crypto :)
@phschiele listed two workarounds so ill give at least one of them a try (probably maximizing the Sharpe ratio using the semi covariance matrix).
Thanks!