Execute the following steps to estimate the GARCH(1,1) model in Python.
- Specify the GARCH model:
model = arch_model(returns, mean='Zero', vol='GARCH', p=1, o=0,
q=1)
- Estimate the model and print the summary:
model_fitted = model.fit(disp='off')
print(model_fitted.summary())
This results in the following screenshot:
- Plot the residuals and the conditional volatility:
model_fitted.plot(annualize='D')
In the plots shown below, we can observe the effect of including the extra component (lagged conditional volatility) into the model specification:
When using ARCH, the conditional volatility series exhibits many spikes, and then immediately returns to the low level. In the case of GARCH, as the model also includes lagged conditional volatility, it takes more time to return to the level observed before the spike.