# Time series using GARCH model in STATA

By Divya Dhuria, Priya Chetty and Saptarshi Basu Roy Choudhury on August 29, 2018

The previous article showed time series using autoregressive conditional hetroskedasticity (ARCH) model in STATA. The present article shows extensions of ARCH, i.e. GARCH model in STATA. Like ARCH model, ARCH extensions like Generalised ARCH (GARCH) model also need squared residuals as determinants of the equation’s variance.

## Generalized ARCH (GARCH) model

In GARCH model, the conditional variance of error term at time ‘t’ depends on the following:

• Squared error term in the previous time period (ARCH1)
• Its conditional variance in the previous time period.

Follow this command for using GARCH model:

`arch  logRE_d1, arch(1) garch(1)`

The interpretation of the syntax is as follows.

In the ARCH regression model, ‘logRE_d1’ is a dependent variable with no independent variables other than a constant. ‘arch(1)’ command adds a single lagged value of et to the modelled variance in STATA. ‘garch(1)’ command adds a single lag of the variance, ht, to the modelled variance.

## Results of GARCH model

The figure below shows the results of GARCH model. The estimate of a lagged value of error term is 0.491 whereas the coefficient estimate is 0.238. The p values are all significant and log likelihood is also highest in all the iterations.

Like ARCH, generate variances for GARCH model using the same command:

`predict GTgarch, variance`

Here ‘GTgarch’ is the name for predicted series of variances. The results will not appear in ‘Result’ window, but in ‘data editor’ window of STATA. To examine the movement of GTgarch generates a time plot using this command:

STATA Command: tsline GTgarch

The figure below shows the results.

The above graph shows that there is a lot more volatility towards the entire span of the sample considering the lagged values of variances.

## Threshold GARCH (TGARCH) model

The threshold GARCH model or TGARCH is another generalization of the GARCH model where positive and negative news are treated asymmetrically. This adds another option to the arch ‘Stock_RE_d1 regression model in STATA. Use this command for TGARCH model in STATA:

`arch  logRE_d1, arch(1) garch(1) tarch(1)`

The figure below shows the results. The estimate of the lagged value of error term is 0.08 and the coefficient on the lagged variance is 0.919. The p values are all significant and log likelihood is also highest in all the iterations.

`predict HTgarch, variance`
`tsline HTgarch`