BaşlayınÜcretsiz Başlayın

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.

Bu egzersiz

Financial Trading in Python

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# 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)
Kodu Düzenle ve Çalıştır