Compare GJR-GARCH with EGARCH
Previously you have fitted a GJR-GARCH and EGARCH model with Bitcoin return time series. In this exercise, you will compare the estimated conditional volatility from the two models by plotting their results.
The GJR-GARCH model estimated volatility is saved in gjrgm_vol
, and EGARCH model estimated volatility is saved in egarch_vol
. You will plot them together with actual Bitcoin return observations, which can be accessed by column ”Return”
in bitcoin_data
.
Diese Übung ist Teil des Kurses
GARCH Models in Python
Anleitung zur Übung
- Plot the actual Bitcoin returns.
- Plot GJR-GARCH estimated volatility.
- Plot EGARCH estimated volatility.
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Plot the actual Bitcoin returns
plt.plot(bitcoin_data['____'], color = 'grey', alpha = 0.4, label = 'Price Returns')
# Plot GJR-GARCH estimated volatility
plt.plot(____, color = 'gold', label = 'GJR-GARCH Volatility')
# Plot EGARCH estimated volatility
plt.plot(____, color = 'red', label = 'EGARCH Volatility')
plt.legend(loc = 'upper right')
plt.show()