How to do it...

Execute the following steps to estimate the GARCH(1,1) model in Python.

  1. Specify the GARCH model:
model = arch_model(returns, mean='Zero', vol='GARCH', p=1, o=0,
q=1)
  1. Estimate the model and print the summary:
model_fitted = model.fit(disp='off')
print(model_fitted.summary())

This results in the  following screenshot:

 

  1. 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.187.18