Aan de slagGa gratis aan de slag

Evaluate strategy performance by Sortino ratio

The Sortino ratio is the excess return over the risk-free rate divided by the downside deviation, and thus it measures the excess return to "bad" volatility. In other words, it doesn't penalize the volatility of positive excess returns.

You will use the Sortino ratio to evaluate the same strategy from the previous exercise and see if it tells a different story. As a reminder, the strategy is a signal-based strategy using two moving average indicators. The strategy backtest statistic using Google 3-year historical stock price data has been loaded in resInfo. The Sharpe ratios have been printed for you and are visible in the console.

Deze oefening maakt deel uit van de cursus

Financial Trading in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Print annual Sortino ratio
yearly_sortino = ____
print('Annual Sortino ratio: %.2f'% yearly_sortino)

# Print monthly Sortino ratio
monthly_sortino = ____
print('Monthly Sortino ratio %.2f'% monthly_sortino)
Code bewerken en uitvoeren