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.
This exercise is part of the course
Financial Trading in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# 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)