get_sortino_ratio

Portfolio.get_sortino_ratio(t_return=0)

Calculate Sortino ratio for the portfolio with specified target return.

Sortion ratio measures the risk-adjusted return of portfolio. It is a modification of the Sharpe ratio but penalizes only those returns falling below a specified target rate of return, while the Sharpe ratio penalizes both upside and downside volatility equally.

Parameters:
t_returnfloat, default 0

Traget rate of return.

Returns:
float

Examples

>>> pf = ok.Portfolio(["VOO.US", "BND.US"], last_date="2021-12")
>>> pf.get_sortino_ratio(t_return=0.02)
1.4377728903230174