0% found this document useful (0 votes)
109 views

EViews Lab

The document provides an overview of analyzing financial time series data with EViews. It discusses the properties of asset returns including non-normal distributions and volatility clustering. It introduces concepts of heteroskedasticity and autocorrelation in time series regression and describes testing and modeling these effects. The document outlines autoregressive (AR) and autoregressive moving average (ARMA) models for modeling autocorrelation. It focuses on generalized autoregressive conditional heteroskedasticity (GARCH) models for modeling time-varying volatility and conditional variance. GARCH models are useful for applications like options pricing, risk management, and asset allocation.

Uploaded by

Zakia Shaheen
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views

EViews Lab

The document provides an overview of analyzing financial time series data with EViews. It discusses the properties of asset returns including non-normal distributions and volatility clustering. It introduces concepts of heteroskedasticity and autocorrelation in time series regression and describes testing and modeling these effects. The document outlines autoregressive (AR) and autoregressive moving average (ARMA) models for modeling autocorrelation. It focuses on generalized autoregressive conditional heteroskedasticity (GARCH) models for modeling time-varying volatility and conditional variance. GARCH models are useful for applications like options pricing, risk management, and asset allocation.

Uploaded by

Zakia Shaheen
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Analysis of Financial Time Series with EViews

Enrico Foscolo

Contents
1 Asset Returns 1.1 Empirical Properties of Returns . . . . . . . . . . . . . . . . . 2 Heteroskedasticity and Autocorrelation 2.1 Testing for serial correlation . . . . . . . . . . . . . . . . . . . 2.2 AR estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 General ARMA Processes 3.1 ARMA estimation . . . . . . . . . . . . . . . . . . . . . . . . 3.2 ARMA Equation Diagnostics . . . . . . . . . . . . . . . . . . 4 GARCH Models 4.1 Basic GARCH Specications . . . . . . . . . . 4.2 Diagnostic Checking . . . . . . . . . . . . . . 4.3 Regressors in the Variance Equation . . . . . . 4.4 The GARCHM Model . . . . . . . . . . . . . 4.5 The Threshold GARCH (TARCH) Model . . . 4.6 The Exponential GARCH (EGARCH) Model 4.7 The Power ARCH (PARCH) Model . . . . . . 4.8 The Component GARCH (CGARCH) Model . 2 2 4 5 5 6 6 6 7 8 11 12 12 12 13 13 13

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

Asset Returns

Most nancial studies involve returns (more precisely, log return rt of a stock) instead of prices. Why? Economic perspective Return of an asset is a scalefree summary of the investment opportunity. Statistical perspective Return series are easier to handle than price series because of the more attractive statistical properties of the former (persistent eects in the second moment). About our approch. One approach to forecast future values of an economic variable is to build a more or less structural econometric model, describing the relationship between the variable of interest with other economic quantities. Although this approach has the advantage of giving economic content to ones predictions, it is not always very useful. Here, we follow a pure time series approach. In this approach the current values of an economic variable are related to past values. The emphasis is purely on making use of the information in past values of a variable for forecasting its future.

1.1

Empirical Properties of Returns

Highfrequency of observation (cf. Figure 1). Nonnormal empirical distribution (cf. Figure 2). The empirical density function has a higher peak around its mean, but fatter tails than that of the corresponding normal distribution. Daily returns of the market indexes and individual stocks tend to have high excess kurtosis (cf. Figure 2). The mean of logreturn series is close to zero (cf. Figure 1). pt I (1), so rt := log pt I (0) (cf. Figure 1). We do not recognize autocorrelation in levels (rt ), but we do with squares of logreturns (cf. Figure 3). Indepth 1 Stationary versus Nonstationary stochastic process 2

0.2

0.035

0.15

0.03

0.1

0.025

0.05

0.02

0.015

-0.05

0.01

-0.1

0.005

0 2000

2002

2004

2006

2008

2010

-0.15 2000

2002

2004

2006

2008

2010

0 2000

2002

2004

2006

2008

2010

(a)

(b)

(c)

Figure 1: Plot of prices, logreturns, and squares of logreturns for Unicredit S.p.A. (ISIN code IT0004781412), respectively.
30 Test statistic for normality: Chi-square(2) = 2495.155 [0.0000] log returns N(-0.00017554,0.023299)

25

20
Density

15

10

-0.15

-0.1

-0.05

0 log returns

0.05

0.1

0.15

Figure 2: Frequency distribution of logreturns for Unicredit S.p.A. (ISIN code IT0004781412).

If the process for pt has one unit root, we can eliminate the nonstationarity by transforming the series into rst dierences (changes). A series which becomes stationary after rst dierencing is said to be integrated of order one, denoted I (1). The main dierences between I (0) and I (1) processes: I (0) series uctuates around its mean (it is said mean reverting) with a nite variance that does not depend on time, while I (1) series wanders widely, I (0) series has a limited memory of its past behavior (the eects of random innovations are only transitory), while a I (1) series has an innitely long memory (innovations permanently aect the process), autocorrelations of a I (0) series rapidly decline as the lag increases, 3

ACF for log returns 0.15 0.1 0.05 0 -0.05 -0.1 -0.15 0 5 10 15 lag PACF for log returns 0.15 0.1 0.05 0 -0.05 -0.1 -0.15 0 5 10 15 lag 20 25 +- 1.96/T^0.5 0.4 0.2 0 -0.2 -0.4 30 35 0 5 10 20 25 +- 1.96/T^0.5 0.4 0.2 0 -0.2 -0.4 30 35 0 5 10

ACF for log returns +- 1.96/T^0.5

15 lag

20

25

30

35

PACF for log returns +- 1.96/T^0.5

15 lag

20

25

30

35

(a)

(b)

Figure 3: Autocorrelation functions of logreturns and squares of logreturns for Unicredit S.p.A. (ISIN code IT0004781412), respectively.

while for a I (1) process the estimated autocorrelation coecients decay to zero very slowly. Double click on the series name to open the series window, and choose View / Unit Root Test.... The dierence operator is given by function d(.).

Heteroskedasticity and Autocorrelation


We discuss single equation regression techniques rt = xt + ut The essential GaussMarkov assumptions E {u |X } = 0 V ar {u |X } = 2 I A common nding in time series regressions: residuals are correlated with their own lagged values, error terms do not have identical variances. 4

Problems associated with serial correlation and heteroskedasticity: OLS is no longer ecient among linear estimators (OLS is still unbiased), standard errors computed using the OLS formula are not correct, t and F tests will no longer be valid and inference will be mislead. We start with autocorrelation issue. There are many forms of autocorrelation. Each one leads to a dierent structure for the error covariance matrix V ar {u |X }. Linear time series analysis provides a natural framework to study the dynamic structure of such a series. In general, we will be concerned with specications of the form of higherorder autoregressive models; i.e., AR(p): rt = xt + ut ut = 1 ut1 + . . . + p utp +

W N 0, 2

The autocorrelations of a stationary AR(p) process gradually die out to zero, while the partial autocorrelations for lags larger than p are zero.

2.1

Testing for serial correlation

Correlogram and LjungBox QStatistic View / Residual Tests / Correlogram-Q-statistics BreuschGodfrey Lagrange multiplier test statistic View / Residual Tests / Serial Correlation LM Test...

2.2

AR estimation

Open an equation by selecting Quick / Estimate Equation... and enter your specication, r c x1 ... xk ar(1) ... ar(p)

The stationarity condition for general AR(p) processes is that the inverted roots of the lag polynomial lie inside the unit circle. The Inverted AR Roots take place at the bottom of the regression output. 5

General ARMA Processes

ARIMA (Autoregressive Integrated Moving Average) models are generalizations of the simple AR model. ARMA(p, q):

rt = xt + ut ut = 1 ut1 + . . . + p utp +

+ 1

t1

+ . . . + q

tq

W N 0, 2

The goal of ARIMA analysis is a parsimonious representation of the process governing the residual. The specication can also be applied directly to a series.

3.1

ARMA estimation

Open an equation by selecting Quick / Estimate Equation... and enter your specication, y c x1 ... xk ar(1) ... ar(p) ma(1) ... ma(q)

3.2

ARMA Equation Diagnostics

From the menu of an estimated equation View / ARMA Structure.... Roots If the estimated ARMA process is (covariance) stationary, then all inverse AR roots should lie inside the unit circle. If the estimated ARMA process is invertible, then inverse all MA roots should lie inside the unit circle. Correlogram If the ARMA model is correctly specied, the residuals from the model should be nearly white noise. More general tests for serial correlation in the residuals may be carried out with View / Residual Tests / Correlogram-Q-statistic and View / Residual Tests / Serial Correlation LM Test....

GARCH Models
We turn into the heteroskedasticity issue.

Besides the return series, we also consider the volatility process. The volatility process is concerned with the evolution of conditional variance 2 of the return over time, denoting by t , namely the oneperiod ahead forecast variance based on past information. Why? The variabilities of returns vary over time and appear in clusters (i.e., volatility may be high for certain time periods and low for other periods). Plots of logreturns show the socalled volatility clustering phenomenon, where large changes in returns are likely to be followed by further large changes. Moreover, volatility seems to react dierently to a big price increase or a big price drop, referred to as the leverage eect. In application, volatility plays an important role in pricing options, risk management (e.g., ValueatRisk), and in asset allocation under the meanvariance framework. The advantage of knowing about risks is that we can change our behavior to avoid them. Thus, we optimize our reactions and in particular our portfolio, to maximize rewards and minimize risks. A special feature of stock volatility is that it is not directly observable. Forecast condence intervals may be timevarying, so that more accurate intervals can be obtained by modeling the variance of the errors. More ecient estimators can be obtained if heteroskedasticity in the errors is handled properly. The volatility index of a market has recently become a nancial instrument. The VIX volatility index compiled by the Chicago Board of Option Exchange (CBOE) started to trade in futures on March 26, 2004. Indepth 2 Option Pricing

Consider the price of an European call option, which is a contract giving its holder the right, but not the obligation, to buy a xed number of shares of a specied common stock at a xed price on a given date. The xed price is called the strike price and is commonly denoted by K. The given date is called the expiration date. The important time span here is the time to expiration, and we denote it by l. The wellknown BlackScholes option pricing formula states that the price of such a call option is ln pt /K rl + 0.5 t l , t l (1) where pt is the current price of the underlying stock, r is the riskfree interest rate, t is the conditional standard deviation of the log return of the specied stock, and () is the cumulative distribution function of the standard normal random variable. The conditional standard deviation t of the log return of the underlying stock plays an important role and it evolves over time. and x = ct = pt (x) K rl x t l

4.1

Basic GARCH Specications

In options markets, if one accepts the idea that the prices are governed by an econometric model such as the BlackScholes formula, then one can use the price to obtain the implied volatility. This approach is often criticized because of its own assumptions that might not hold in practice (e.g., the assumed geometric Brownian motion for the price of the underlying asset). For instance, from the observed prices of a European call option, one can use the BlackScholes formula in (1) to deduce the conditional standard deviation t . It might be dierent from the actual volatility. Experience shows that implied volatility of an asset return tends to be larger than that obtained by using a GARCH type of volatility model. For instance, the VIX of CBOE is an implied volatility. A simple approach, called historical volatility, is widely used. In this method, the volatility is estimated by the sample standard deviation of returns over a short period. If the period is too long, then it will not be so relevant for today and if the period is too short, it will be very noisy. It is logically inconsistent to assume, for example, that the variance is constant for a period.

Conditional heteroscedastic models can be classied into two general categories. Those in the rst category use an exact function to govern the evo2 lution of t , whereas those in the second category use a stochastic equation 2 to describe t . The GARCH model belongs to the rst category. Generalized Autoregressive Conditional Heteroskedasticity (GARCH) models are specically designed to model and forecast conditional variances. The variance of the dependent variable is modeled as a function of past values of the dependent variable and independent, or exogenous variables. GARCH(1, 1):

rt = xt + ut ut = t t , t IID (0, 1) 2 2 2 t = + ut1 + t1 An ordinary ARCH model is a special case of a GARCH specication in which there are no lagged forecast variances in the conditional variance equation; i.e., a GARCH(1, 0). This specication is often interpreted in a nancial context, where an agent or trader predicts this periods variance by forming a weighted average of a long term average (the constant), the forecasted variance from last period (the GARCH term), and information about volatility observed in the previous period (the ARCH term). If the asset return was unexpectedly large in either the upward or the downward direction, then the trader will increase the estimate of the variance for the next period. This model is also consistent with the volatility clustering. u2 t Equivalent representations. Rearranging terms and dening t = 2 t u2 = + ( + ) u2 + t t1 t t1 the squared errors follow a heteroskedastic ARMA(1, 1) process; the autoregressive root which governs the persistence of volatility shocks is ( + ) and, in many applied settings, this root is very close to unity so that shocks die out rather slowly. Higher order GARCH models, denoted GARCH(p, q),

0.4

0.3

Density

Density
4 2 0 2 4

0.2

0.1

0.0

0.0

0.1

0.2

0.3

0.4

(a)

(b)

Figure 4: Normal density (solid line) versus tStudent and GED density with 3 and 1.5 degree of freedom, respectively.

rt = xt + ut ut = t t , t IID (0, 1)
p 2 t q

= +
i=1

i u2 ti

+
j=1

2 j tj

The basic GARCH specication requires an assumption about the conditional distribution of the error term ut . Gaussian distribution (cf. Figure 4). Students tdistribution (cf. Figure 4). Generalized Error distribution (cf. Figure 4). Given a distributional assumption, GARCH models are typically estimated by the method of (quasi) maximum likelihood. Quick / Estimate Equation ... or by selecting Object / New Object ... / Equation .... Select ARCH from the method combo box at the bottom of the dialog.

10

The presence of GARCH errors in a regression or autoregressive model does not invalidate OLS estimation. It does imply, however, that more ecient (nonlinear) estimators exist than OLS. Estimation procedures are often computationallyintensive.

4.2

Diagnostic Checking

Building a volatility model for an asset return series consists of four steps. 1. Specify a mean equation by testing for serial dependence in the data and, if necessary, building an econometric model (e.g., an ARMA model) for the return series to remove any linear dependence. 2. Use the residuals of the mean equation to test for ARCH eects. To carry out the for autoregressive conditional heteroskedasticity (ARCH) in the residuals, push View / Residual Tests / ARCH LM Test ... on the equation toolbar and specify the order of ARCH to be tested against. It carries out Lagrange multiplier tests to test whether the standardized residuals exhibit additional ARCH. If the variance equation is correctly specied, there should be no ARCH left in the standardized residuals. 3. Specify a volatility model if ARCH eects are statistically signicant and perform a joint estimation of the mean and volatility equations. 4. Check the tted model carefully and rene it if necessary.

Actual, Fitted, Residual GARCH Graph Covariance Matrix Coecient Tests Likelihood ratio tests on the estimated coecient. Residual Tests / CorrelogramQstatistics This view can be used to test for remaining serial correlation in the mean equation and to check the specication of the mean equation. If the mean equation is correctly specied, all Qstatistics should not be signicant.

11

Residual Tests / Correlogram Squared Residuals This view can be used to test for remaining ARCH in the variance equation and to check the specication of the variance equation. If the variance equation is correctly specied, all Qstatistics should not be signicant. See also Residual Tests / ARCH LM Test. Residual Tests / HistogramNormality Test

4.3

Regressors in the Variance Equation


p 2 t q

=+
i=1

i u2 ti

+
j=1

2 j tj + z t

Note that the forecasted variances from this model are not guaranteed to be positive.

4.4

The GARCHM Model

Finance theory suggests that an asset with an higher perceived risk would pay an higher return on average. Then, the theory suggests that the mean return would be related to the conditional variance or standard deviation,
2 rt = xt + t + ut

The parameter is called the risk premium parameter. Not so used in practice; i.e., sometimes are not interpretable and catch eects dierent from the inuence of volatility on conditional mean.

4.5

The Threshold GARCH (TARCH) Model


p 2 t q r 2 j tj j=1

=+
i=1

i u2 ti

+
k=1

k u2 Itk tk

where It = 1 if ut < 0 and 0 otherwise. Good news, uti > 0, and bad news, uti < 0, have dierential eects on the conditional variance; i.e., good news has an impact of i , while bad news has an impact of i + i . If i > 0, bad news increases volatility, and we say that there is a leverage eect for the ith order. If i = 0, the news impact is asymmetric.

12

4.6

The Exponential GARCH (EGARCH) Model


p 2 log t = + i=1 q 2 j log tj + j=1 k=1 r

uti + ti

utk tk

This equation highlights the asymmetric responses in volatility to the past positive and negative shocks. The log of the conditional variance implies that the leverage eect is exponential and that forecasts of the conditional variance are guaranteed to be nonnegative. The presence of leverage eects can be tested by the hypothesis that i < 0. The impact is asymmetric if i = 0.

4.7

The Power ARCH (PARCH) Model


p t = + i=1 q

i (|uti | i uti ) +
j=1

j tj

where > 0, i 1 for i = 1, . . . , r, i = 0 for i > r and r p.

4.8

The Component GARCH (CGARCH) Model

It allows mean reversion to a varying level mt ,


2 2 t mt = + u2 + t1 t1 2 2 mt = + (mt1 ) + ut1 t1

2 t1 is still the volatility, while mt takes the place of and is the time varying longrun volatility. The rst equation describes the transitory com2 ponent, t mt , which converges to zero with powers of ( + ). The second equation describes the long run component mt , which converges to with powers of .

13

You might also like