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

Compare return results of multiple strategies

With the same strategy using a simple moving average indicator, you also conducted a strategy optimization by varying the lookback periods of the moving average indicator from 30 to 50 days. You backtested both strategies using the Google stock historical price data from 2017 to 2020. Now you are about to compare the backtest results.

The bt backtest results of both strategies have been provided in bt_results and are ready to use.

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.

# Plot the backtest result
____(title='Backtest result')
plt.show()

# Get the lookback returns
lookback_returns = ____
print(lookback_returns)
Kodu Düzenle ve Çalıştır