Sie sind auf Seite 1von 16

Stock Price Analysis using GARCH model

Pradipta Patra 17th March 2011

Abstract This paper reviews the relevant literature on time series with particular focus on Autoregressive Conditional Heteroscedasticity(ARCH) and Generalized Autoregressive Conditional Heteroscedasticity(GARCH). Then we take adjusted closing stock price from Indian Market and provide GARCH analysis on same.

Introduction

We encounter nancial time series in our daily lives. They are brought to our attention by newspaper, television and other mass media. For example: latest stock market index values, currency exchange rates, electricity prices, interest rates. Investors (private and corporate), businessmen, anyone dealing in international trade, brokers and nancial analysts who advice people regarding investing can all benet from a deeper understanding of price behaviour. So it is often desirable to monitor price behaviour frequently and to understand the probable path taken by prices in the future. Changes in prices and associated risks are important to many traders. These risks can be quantied by the variances of future returns (directly) or by their relationship with relevant covariances in a portfolio context. Forecasts of future standard deviations can provide measure of risk involved. These forecasts might be used to avoid unacceptable risks perhaps by hedging. Here we discuss two main objectives of investigating nancial time series. First, it is important to understand how prices behave (evolve over time). The variance of the time series is particularly important and relevant. Since future price is uncertain it must be characterized by a probability distribution. This motivates us to use statistical methods for investigating prices. The econometric models that we build are a detailed description of how successive prices are determined. The second objective is to use our knowledge of price behaviour to reduce risk and use for decision making. Time series models may for instance be used for forecasting, option pricing and risk management. In this paper we discuss some of the econometric models and statistical methods that are predominantly used for analysing nancial time series. Then we use these methodologies on a live time series, adjusted closing stock price of a company which is recorded daily from 2003 to 2012. 2

Literature Review

A stochastic process is a collection of random variables ordered in time. If it is a continuous time stochastic process we denote it by Y (t) and for discrete time Yt . A time series Yt is a discrete time, continuous state, stochastic process where t (t = 1, ....., T ) are certain discrete time points. Usually time is taken at equally spaced intervals, and the time increment may be everything from seconds to years. Since in this paper we deal with nancial time series and particularly adjusted closing stock price of a company, it is worth mentioning that there are two types of price changes: arithmetic and geometric returns. Daily arithmetic returns are dened by, rt =
Yt Yt1 Yt1 .

Daily geometric returns are dened by, dt = log (Yt ) log (Yt1 ). A time series is stationary if its mean, variance, autocovariance(at dierent lags) are time invariant i.e. they remain the same no matter at what point we measure them. In mathematical terms these can be represented as follows: E (Yt ) = V ar(Yt ) = E (Yt )2 = 2 k = E [(Yt )(Yt+k )] The random walk model (RWM) is a classical example of a non-stationary time series. It can be represented as follows: Yt = Yt1 + ut (without drift) where ut is a white noise error term with mean 0 and variance 2 . E (Yt ) = Y0 and V ar(Yt ) = t 2 . Hence this is a non-stationary time series. Another form of this RWM is with drift: Yt = + Yt1 + ut . This is also a non-stationary time series.

The standard method of analysing non-stationary time series is to take rst dierence and work on the resulting series. For RWM the rst dierence is enough to remove non-stationarity. Hence RWM is a I (1) or Integrated Process of order 1. Higher order integrated processes are where successive dierences are needed to remove non-stationarity. In nance, the random walk model is commonly used for equities, and it is usually assumed that it is the geometric returns of the time series that follows this model. A stationary time series can be modelled as Autoregressive Process, Moving Average Process or both. These are discussed below. An autoregressive process of order 1 or AR(1) is written as follows: (Yt ) = 1 (Yt1 ) + ut where is mean of {Yt } and ut is uncorrelated random error term with zero mean and constant variance 2 . Similarly AR(p) model is given as follows: (Yt ) = 1 (Yt1 ) + ........... + p (Ytp ) + ut MA(q) or moving average model of order q is as follows: Yt = + 0 ut + 1 ut1 + .............. + q utq ARMA(1,1) model is given by: Yt = + 1 Yt1 + 0 ut + 1 ut1 With the models discussed above for stationary time series, it is not possible to analyse or take care of every aspect of a nancial time series. For example, nancial time series (stock prices, exchange rates, ination rates) exhibit a phenomenon called volatility clustering. Volatility clustering in laymans language is, periods in which prices show wide swings for an extended time period followed by periods of relative calm. Knowledge of volatility is important in many areas. For example, we are studying the variability of ination. For a person involved in decision mak4

ing, ination is not problematic but, variability in ination rate is bad since it makes nancial planning dicult. For traders in exchange market variability in exchange rate means huge prots or losses. A special characteristic of stock volatility is that it is not directly observable. For example, consider the daily log returns of a stock. The daily volatility is not directly observable from the return data because there is only one observation in a trading day. Although volatility is not directly observable, it has some characteristics that are commonly seen in asset returns. Firstly, there exist volatility clusters i.e. volatility may be high for certain time periods and low for other periods. Secondly, volatility evolves over time in a continuous manner i.e. volatility jumps are rare. Thirdly, volatility does not diverge to innity(varies within some xed range). Fourthly, volatility seems to react dierently to a big price increase or a big price drop (leverage eect). Let Yt be log return of an asset at time index t. The basic idea behind volatility study is that the series Yt is either serially uncorrelated or with minor lower order serial correlations, but is a dependent series. Let us denote the information set available till time t 1 as Ft1 . Then,
2 2 = V ar (Y |F t = E (Yt |Ft1 ) and t t t1 ) = E [(Yt t ) |Ft1 ]

We assume that, Yt follows simple time series model like ARMA(p,q). Hence, Yt = t + at .
k p q

t = 0 +
i=1

i xit +
i=1

i Yti
i=1

i ati

2 = V ar (Y |F t t t1 ) = V ar (at |Ft1 ) 2 is called conditional heteroscedasticity. Conditional heteroscedasticity t is of two categories. First way is to use an exact function to model the 2 , example: GARCH model. Second way is to use stochastic evolution of t 2 , example: stochastic volatility model. equation to model t

The rst major work in volatility modelling was the Autoregressive Conditional Heteroscedasticity (ARCH) model by Engel(1982). The idea behind ARCH model is (a) the shock of an asset return (at ) is serially uncorre5

lated but dependent (b) the dependence of at can be described by a simple quadratic function of its lagged values. ARCH(m) is modelled as follows:
2 = + a2 2 at = t t , t 0 1 t1 + ........ + m atm

{ t } is a sequence of iid random variables with mean 0 and variance 1; 0 > 0; i 0f ori > 0. t is often assumed to follow standard normal, standardized Student-t distribution, generalized error distribution. Properties of ARCH Model: (a) E (at ) = 0 (b) V ar(at ) = 0 + 1 E (a2 t1 ) (c) Under normality assumption of Drawbacks of ARCH Model: (a) Model assumes that positive and negative shocks both have same eects on volatility due to presence of quadratic terms in model. But in reality, price of a nancial asset reacts dierently to positive and negative shocks. (b) Model rather restrictive. (c) Likely to over predict volatility. (d) Does not provide any new insight for understanding the source of variability of a nancial time series. Even though the ARCH model is simple, it often requires many parameters to adequately describe the volatility process of an asset return. So we go for the Generalized Autoregressive Conditional Heteroscedasticity (GARCH) model. The literature on GARCH can be found in Bollerslev,Chou,Kroner (1992); Bollerslev, Engle and Nelson (1994). at follows GARCH(m,s) model if
m 2 = + at = t t ; t 0 i=1 s t 2 2 we have, E (a4 t |Ft1 ) = 3(0 + 1 at1 )

i a2 ti +
j =1

2 j t j

where { t } is a sequence of iid random variables with mean 0 and varimax(m,s)

ance 1; 0 > 0; i 0; j 0 and


i=1

(i + i ) < 1.

The GARCH model suers from the same weakness as ARCH model. Aggarwal et al. (1999) explored the stock market volatility of 10 largest emerging markets in Asia and Latin America. From this study it was found that shifts in volatility of the emerging markets (considered) are related to important country-specic political, social and economic events. The time varying stock market volatility is modelled using GARCH. Kasch-Haroutounian and Price (2001), Gilmore and McManus (2001), Murinde and Poshakwale (2002) studied the volatility in Central and Eastern European stock markets. The major ndings from these studies were:high volatility persistence, signicant asymmetry, lack of relationship between stock market volatility and expected return and non-normality of the return distribution to be the basic characteristics of stock market volatility in those countries. Deb, Vuyyuri and Roy (2003) studied the monthly volatility of market indices (Sensex & S&P CNX-Nifty) of Indian capital markets using eight dierent univariate models. Out-of-sample forecasting performance of these models were also done using dierent symmetric as well as asymmetric loss functions. The GARCH (1, 1) model has been found to be the best t model based on most of the symmetric loss functions. The ARCH model was found to be better than the other models for investors who are more concerned about under predictions than over predictions. GARCH process was used to model stock volatility in emerging markets like Hungary and Poland by Murinde and Poshakwale(2001). Teresiene(2009) used GARCH to model stock price volatility in Lithunian stock market. Inspired by the above works on stock price volatility, we try to model stock price volatility of a company in Indian market.

Modelling Procedures and Results

The data is loaded in R using the following code: icici<- read.csv("/media/disk/Courses/Adv Econometrics/ICICI.csv",header=TRUE) adjcls <- as.matrix(icici$Adj.Close) Now we plot the data. plot(adjcls,type=l)

Figure 1: Data Plot Next we test the time series data for stationarity. We use autocorrelation function (ACF), partial autocorrelation function (PACF) plots and augmented dicky fuller (ADF) test for determining stationarity of the time series. The R-code used and corresponding graphs, results are provided below. acf(adjcls) pacf(adjcls) adf.test(adjcls)

(a) ACF Plot

(b) PACF plot

Figure 2: ACF and PACF Plots The augmented dicky fuller test results are given below: data: adjcls Dickey-Fuller = -2.018, Lag order = 12, p-value = 0.5707 alternative hypothesis: stationary The above plots and ADF test show that the time series is non-stationary. We remove the non-stationarity by taking rst dierence on the time series. The R-code and resulting time series plots are given below. dadjcls1 <- diff(log(adjcls)) dadjcls <- as.matrix(dadjcls1) plot(dadjcls,type=l)

Figure 3: Data Plot

Again we test the dierenced time series for stationarity using ACF, PACF plots and ADF test. acf(dadjcls,demean=FALSE) pacf(dadjcls) adf.test(dadjcls)

(a) ACF Plot

(b) PACF plot

Figure 4: ACF and PACF Plots Augmented Dickey-Fuller Test data: dadjcls Dickey-Fuller = -12.2482, Lag order = 12, p-value = 0.01 alternative hypothesis: stationary Warning message: In adf.test(dadjcls) : p-value smaller than printed p-value From the above plots and results we see that the dierenced time series is stationary. Next we try to t dierent ARMA models on this stationary time series. The best t model is selected based on AIC value. The model with least AIC value is the best. We tried various combinations: ARMA(5,2); ARMA(1,0); ARMA(0,1); ARMA(1,1); ARMA(2,2); ARMA(1,2); ARMA(2,1); ARMA(5,1); ARMA(5,3); ARMA(6,2); ARMA(4,2). ARMA(5,2) came out to be the best t model with least value of AIC. We provide code and results below. fitarma13 <- arima(dadjcls, order=c(5,0,2)) fitarma13

10

Call: arima(x = dadjcls1, order = c(5, 0, 2)) Coefficients: ar1 ar2 ar3 ar4 ar5 1.0675 -0.7231 0.1064 -0.0336 -0.0630 s.e. 0.2304 0.1799 0.0476 0.0395 0.0327 sigma^2 estimated as 0.0008553:

ma1 -0.9736 0.2307

ma2 0.5739 0.1577

intercept 0.0011 0.0006

log likelihood = 4126.83,

aic = -8235.66

Next we collect the residuals of the above model t and test for autocorrelation using ACF, PACF plots and Ljung-Box test. The code and results are as follows: Z1 <- as.matrix(fitarma13$residuals) acf(Z1) pacf(Z1) Box.test(Z1,type="Ljung-Box")

(a) ACF Plot

(b) PACF plot

Figure 5: ACF and PACF Plots of Residuals

Box-Ljung test data: Z1 X-squared = 1e-04, df = 1, p-value = 0.992 So we see from above plots and results that autocorrelation does not exist or is present at very far o lags. Even though there is no correlation there may be dependence. We test for dependence. 11

acf(abs(Z1)) acf(Z1*Z1) pacf(abs(Z1)) pacf(Z1*Z1)

(a) ACF Plot Absolute

(b) ACF plot Squared

Figure 6: ACF Plots of Absolute and Squared Residuals

(a) PACF Plot Absolute

(b) PACF plot Squared

Figure 7: PACF Plots of Absolute and Squared Residuals

12

From the above plots we see that there is dependence. We use volatility models to capture this dependence. We t GARCH + ARMA on the dierenced time series. The best model is selected based on least value of AIC. len<-length(dadjcls)-100 var<-as.matrix(dadjcls[1:len]) b <- garchFit(formula= ~ arma(5,2)+garch(1,1),data=var,cond.dist="std") summary(b) After trying various combinations: GARCH(2,2); GARCH(2,1); GARCH(1,2); GARCH(1,1); GARCH(0,1); GARCH(1,0) and conditional distributions: normal, skewnormal, student-t, standardized student-t, we found the above tted model to be the best. We next test the residuals of the above tted model. resid.b<-residuals(b,standardize=T) acf(abs(resid.b)) acf((resid.b)*(resid.b)) pacf(abs(resid.b)) pacf((resid.b)*(resid.b)) plot(resid.b,type="l") Box.test(resid.b,lag=1,type="Ljung")

(a) ACF Plot Absolute

(b) ACF plot Squared

Figure 8: ACF Plots of Absolute and Squared Residuals

13

(a) PACF Plot Absolute

(b) PACF plot Squared

Figure 9: PACF Plots of Absolute and Squared Residuals

Figure 10: Residual Plot

Box-Ljung test data: resid.b X-squared = 0.7149, df = 1, p-value = 0.3978

14

Conclusion

From the above analysis of residuals we conclude that the GARCH(1,1)+ ARMA(5,2) is able to capture autocorrelation and dependency in the differenced time series. Next we tried to forecast as follows. predict(b,n.ahead=2) meanForecast meanError standardDeviation 1 2.237949e-04 0.01546226 0.01546226 2 2.514630e-05 0.01575426 0.01570189

Future Research

(a) Instead of modelling the dependency in the time series as GARCH it can be captured using stochastic volatility model. (b) We can also try tting Exponential GARCH (EGARCH) model on the above data. This helps in overcoming some weaknesses of the GARCH model in handling nancial timeseries.

15

References

Aggarwal, R., Inclan, C., and Leal, R. (1999). Volatility in Emerging Stock Markets. Journal of Financial and Quantitative Analysis 34: 33-55 Bollerslev, T., Chou, R.Y., and Kroner, K.F. (1992). ARCH modeling in nance. Journal of Econometrics 52: 5-59 Bollerslev, T., Engle, R.F., and Nelson, D.B. (1994). ARCH model. In R.F. Engle and D.C. McFadden (eds.), Handbook of Econometrics IV, pp. 2959-3038. Elsevier Science, Amsterdam. Deb, S. S., Vuyyuri, S and Roy, B. (2003). Modelling Stock Market Volatility in India: A Comparison of Univariate Deterministic Models. ICFAI Journal of Applied Finance 9(7): 19-33 Engle, R.F. (1982). Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inations. Econometrica 50: 987-1007 Kasch-Haroutounian, M. and Price, S. (2001). Volatility in the Transition Markets of Central Europe. Applied Financial Economics 11: 93-105. Murinde, V. and Pashakwale, S. (2002). Volatility in the Emerging Stock Markets in Central and Eastern Europe: Evidence on Croatia, Czech Republic, Hungary, Poland, Russia and Slovakia. European Research Studies Journal, February Issue. Poshakwale, S., Murinde,V. (2001). Modeling the volatility in East European emerging stock markets evidence on Hungary and Poland. Appl. Financ. Econ. 11: 445-456. Teresiene, D. (2009). Lithuanian stock market analysis using a set of GARCH models. Journal of Business Economics and Management 10(4): 349-360.

16

Das könnte Ihnen auch gefallen