LoslegenKostenlos loslegen

Fit GARCH models to cryptocurrency

Financial markets tend to react to positive and negative news shocks very differently, and one example is the dramatic swings observed in the cryptocurrency market in recent years.

In this exercise, you will implement a GJR-GARCH and an EGARCH model respectively in Python, which are popular choices to model the asymmetric responses of volatility. You will work with a cryptocurrency dataset bitcoin_data, which contains two columns: "Close" price and "Return".

The bitcoin_data dataset has been preloaded for you, and the historical prices in the column "Close" have been plotted.

Diese Übung ist Teil des Kurses

GARCH Models in Python

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Specify model assumptions
gjr_gm = arch_model(bitcoin_data['Return'], p = 1, q = 1, o = ____, vol = 'GARCH', dist = 't')

# Fit the model
gjrgm_result = gjr_gm.fit(disp = 'off')

# Print model fitting summary
print(____.____())
Code bearbeiten und ausführen