# How to identify ARCH effect for time series analysis in STATA?

The previous articles showed how to apply *Vector Auto Regression (VAR)* and **Vector Error Correction Model (VECM)** based on the assumption that the variables either have a long run or short run causality among them. Some financial time series such as stock returns show wide swings for an extended period of time. Such behaviour is known as volatility. Volatility only represents a high variability in a series over time. This article explains the issue of volatility in data using **Autoregressive Conditional Heteroscedasticity ( ARCH)** model. It will identify the

**effect in a given time series in STATA.**

__ARCH__Heteroscedasticity represents the problem of unequal variances over time. Therefore a time series with volatility is termed as having ‘**ARCH’** effect. The treatment of

**model is slightly different from other models like Auto Regressive Integrated Moving Average (ARIMA),**

__ARCH__*VAR*and

**. In order to demonstrate**

__VECM__**model in STATA, this article takes into consideration the stock price data for the period 1990 to 2016.**

__ARCH__## Setting the time variable

Firstly set the time variable for the new time series stock returns. This is similar to the process followed for Gross Domestic Product (GDP) in the previous articles. Since the data of 1990-2016 is in monthly format, use the below command:

gen datem = m(1990m11) + _n - 1

Here the time series variable is ‘datem’. Then format the time series data of stock returns by using the command:

format datem %tm

Lastly, set out time variable “date” as a time series variable by using the command:

tsset datem

## Checking stationarity

To start with the analysis first check the stationarity of the stock returns time series through Dickey-Fuller test. The command for this test is:

dfuller LOGStock_RE, lags(0)

Here note that variable ‘logStock_RE’ represents time series stock return. As per the results of the test, stock returns are non-stationarity with an insignificant p-value as shown in the figure below.

Therefore, the time series stock returns are non-stationary. Thus further analysis is not possible. To transform the time series into stationary, use the method of first differencing. The command for first differencing is:

gen logRE_d1 = d1.logRE

This command reveals the first-differenced time series of stock returns as variable ‘logRE_d1’. Again check the stationarity of first differenced series by using augmented Dickey-Fuller test. Stationarity is present in the series. Therefore proceed to **ARCH** model.

## Checking the presence of volatility

To start with **ARCH** model it is imperative to check the presence of volatility in a time series data. The finest way to check is using time series graphs. To plot a time series graph of logRE_d1, follow these steps (figure below):

- Select ‘Graphics’ on the output window
- Select ‘Time-series graphs’
- Click on ‘Line plots’

Alternatively, use the below command to generate the graph:

twoway (tsline logRE_d1)

The result line plot of the time series ‘Stock_RE_d1’ will appear.

It is noticeable in the figure above that the first-differenced time series of stock returns are highly volatile. This is because the returns are showing wide swings on some periods and calm in others. Therefore, a case of unequal variance is present here. However, the line graph cannot alone indicate **ARCH** effect. Therefore, to identify the presence of

**effect in time series stock exchange, further perform different steps.**

__ARCH__## Check for normality

Similar to confirming stationarity of time series, also confirm the normality of residuals for time series ‘Stock_RE_d1’. To perform the normality, use the command:

histogram logRE_d1

OR

Follow the path:

- Select ‘Graphics’ on the output window
- Select ‘Histogram
**’.**

The histogram will appear on result window of STATA as shown in the figure below.

These series are leptokurtic. This means that they have lots of observations around the average and a relatively less number of observations that are far from average. Also, the centre of the histogram has a high peak and the tails are relatively heavy.

**5E3BCCB908B47**to save 6000 on

**6001 - 10000 words**standard order of

**research analysis**service.

^{}## Check for ARCH effect

The line plot cannot alone suggest the presence of **ARCH** effect. This is because

**effect also carries the presence of autocorrelation which is unidentifiable in line plots. Recall from the article (Regression analysis using VAR in STATA), ‘AR’ implies the effects of lagged valued on the concerned dependent variables. Thus, to rectify the applicability of**

__ARCH__**effects, ascertaining the presence of autocorrelation with volatility is also important. In order to identify the autocorrelation first, regress the time series ‘Stock_RE_d1’ and then perform LM test.**

__ARCH__To perform regression use command:

reg logRE_d1

Further to perform LM test for ARCH effect use command:

estat archlm, lags(1)

The figure below shows the results of both the commands:

The figures above show that:

- The time series stock returns are significant with the p-value of 0.006. Therefore in the absence of any independent variables, it carries an exogenous effect with the rate of 19.7 (coefficient of constant).
- The LM test shows p-value less than 0.05 which indicates that null hypothesis (no arch effect) can be rejected. Therefore the log of stock returns have
__ARCH.__

- How to identify ARCH effect for time series analysis in STATA? - October 4, 2018
- How to test and diagnose VECM in STATA? - October 4, 2018
- VECM in STATA for two cointegrating equations - September 27, 2018

## Discuss