stat 497 lecture note 11 var models and granger causality 1

56
STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

Upload: sydney-perkins

Post on 17-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

STAT 497LECTURE NOTE 11

VAR MODELS AND GRANGER CAUSALITY

1

Page 2: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR TIME SERIES

• A vector series consists of multiple single series.

• Why we need multiple series?– To be able to understand the relationship

between several components– To be able to get better forecasts

2

Page 3: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR TIME SERIES

• Price movements in one market can spread easily and instantly to another market. For this reason, financial markets are more dependent on each other than ever before. So, we have to consider them jointly to better understand the dynamic structure of global market. Knowing how markets are interrelated is of great importance in finance.

• For an investor or a financial institution holding multiple assets play an important role in decision making.

3

Page 4: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR TIME SERIES

4

Page 5: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR TIME SERIES

5

Page 6: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR TIME SERIES

6

Page 7: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

7

Page 8: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

8

Page 9: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR TIME SERIES

• Consider an m-dimensional time series Yt=(Y1,Y2,…,Ym)’. The series Yt is weakly stationary if its first two moments are time invariant and the cross covariance between Yit and Yjs for all i and j are functions of the time difference (s-t) only.

9

Page 10: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR TIME SERIES

• The mean vector:

• The covariance matrix function

10

mtE ,,, 21 Y

kkk

kkk

kkk

ECovk

mmmm

m

m

tkttkt

21

22221

11211

YYY,Y

Page 11: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR TIME SERIES

• The correlation matrix function:

where D is a diagonal matrix in which the i-th diagonal element is the variance of the i-th process, i.e.

• The covariance and correlation matrix functions are positive semi-definite.

11

kkk ij// 2121 DD

.0,,0,0 2211 mmdiag D

Page 12: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR WHITE NOISE PROCESS

• {at}~WN(0,) iff {at} is stationary with mean 0 vector and

12

o.w.

kk

,

0,

0

Page 13: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR TIME SERIES

• {Yt} is a linear process if it can be expressed as

where {j} is a sequence of mxn matrix whose entries are absolutely summable, i.e.

13

,~aa 0

0WN for Y t

jjtjt

jj l,i m.1,2,...,li, for 0

Page 14: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VECTOR TIME SERIES

• For a linear process, E(Yt)=0 and

14

,...,,, 210

kk

jjkj

Page 15: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

MA (WOLD) REPRESENTATION

• For the process to be stationary, s should be square summable in the sense that each of the mxm sequence ij.s is square summable.

15

tt B aY

0s

ssBB where

Page 16: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

AR REPRESENTATION

• For the process to be invertible, s should be absolute summable.

16

ttB aY

01

s

ssBB where

Page 17: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

THE VECTOR AUTOREGRESSIVE MOVING AVERAGE (VARMA) PROCESSES

• VARMA(p,q) process:

17

tqtp BB aY

q

qq

ppp

BBB

BBB where

10

10

pVARBq ttp aY 0

VMA(q)B0p tqt aY

Page 18: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VARMA PROCESS

• VARMA process is stationary if the zeros of |p(B)| are outside the unit circle.

• VARMA process is invertible if the zeros of |q(B)| are outside the unit circle.

18

BBB qptt 1 aY

ttpq

tt

BB

B

aY

aY

1

Page 19: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

IDENTIFIBILITY PROBLEM

• Multiplying matrices by some arbitrary matrix polynomial may give us an identical covariance matrix. So, the VARMA(p,q) model is not identifiable. We cannot uniquely determine p and q.

19

Page 20: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

IDENTIFIBILITY PROBLEM

• Example: VARMA(1,1) process

20

12

11

2

1

12

11

2

1

00

0

00

0

t,

t,

t,

t,

t,

t,

t,

t,

a

am

a

a

Y

Ym

Y

Y

t,

t,

t,

t,

a

amB

Y

YBm

2

1

2

1

10

1

10

1

t,

t,

t,

t,

t,

t,

a

aB

a

amBBm

Y

Y

2

1

2

11

2

1

10

1

10

1

10

1

MA()=VMA(1)

Page 21: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

21

Page 22: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

IDENTIFIBILITY

• To eliminate this problem, there are three methods suggested by Hannan (1969, 1970, 1976, 1979).– From each of the equivalent models, choose the

minimum MA order q and AR order p. The resulting representation will be unique if Rank(p(B))=m.

– Represent p(B) in lower triangular form. If the order of ij(B) for i,j=1,2,…,m, then the model is identifiable.

– Represent p(B) in a form p(B) =p(B)I where p(B) is a univariate AR(p). The model is identifiable if p0.

22

Page 23: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VAR(1) PROCESS

• Yi,t depends not only the lagged values of Yit but also the lagged values of the other variables.

• Always invertible.• Stationary if outside the unit

circle. Let =B-1.

23

ttB aYI

0 BI

00 BI

The zeros of |IB| is related to the eigenvalues of .

Page 24: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VAR(1) PROCESS

• Hence, VAR(1) process is stationary if the eigenvalues of ; i, i=1,2,…,m are all inside the unit circle.

• The autocovariance matrix:

24

tkttkt

ttkttkt

E

EEk

aYYY

aYYYY

1

1

101

01

k,k

k,k k

Page 25: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VAR(1) PROCESS

• k=1,

25

0101 1

00

100010

1010

11

1

1

Page 26: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VAR(1) PROCESS

• Then,

26

BvecAC

vecIvec

ABCvec

product Kronecker where

10

00

7

6

2

1

4

3

71

64

23

XX vece.g.

Ba

BB

BA

mnm1

1n

aB

aa

e.g.

11

Page 27: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VAR(1) PROCESS

• Example:

27

5080

04031

30602011

2060

3011

2060

3011

21

2

1

.,.

..

....det

..

..

..

..ttt

I

I

aYY

The process is stationary.

Page 28: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VMA(1) PROCESS

• Always stationary.• The autocovariance function:

• The autocovariance matrix function cuts of after lag 1.

28

.,WN~ where t1ttt 0aaaY

0

o.w.,

k,

k,

k

0

1

1

Page 29: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

VMA(1) PROCESS

• Hence, VMA(1) process is invertible if the eigenvalues of ; i, i=1,2,…,m are all inside the unit circle.

29

Page 30: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

IDENTIFICATION OF VARMA PROCESSES

• Same as univariate case.• SAMPLE CORRELATION MATRIC FUNCTION:

Given a vector series of n observations, the sample correlation matrix function is

where ‘s are the crosscorrelation for the i-th and j-th component series.

• It is very useful to identify VMA(q).

30

kˆkˆ ij kˆ ij

Page 31: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

SAMPLE CORRELATION MATRIC FUNCTION

• Tiao and Box (1981): They have proposed to use +, and . signs to show the significance of the cross correlations.

+ sign: the value is greater than 2 times the estimated standard error

sign: the value is less than 2 times the estimated standard error

. sign: the value is within the 2 times estimated standard error

31

Page 32: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

PARTIAL AUTOREGRESSION OR PARTIAL LAG CORRELATION MATRIX FUNCTION

• They are useful to identify VAR order. The partial autoregression matrix function is proposed by Tiao and Box (1981) but it is not a proper correlation coefficient. Then, Heyse and Wei (1985) have proposed the partial lag correlation matrix function which is a proper correlation coefficient. Both of them can be used to identify the VARMA(p,q).

32

Page 33: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

GRANGER CAUSALITY

• In time series analysis, sometimes, we would like to know whether changes in a variable will have an impact on changes other variables.

• To find out this phenomena more accurately, we need to learn more about Granger Causality Test.

33

Page 34: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

GRANGER CAUSALITY

• In principle, the concept is as follows:

• If X causes Y, then, changes of X happened first then followed by changes of Y.

34

Page 35: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

GRANGER CAUSALITY

• If X causes Y, there are two conditions to be satisfied:

1. X can help in predicting Y. Regression of X on Y has a big R2

2. Y can not help in predicting X.

35

Page 36: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

GRANGER CAUSALITY

• In most regressions, it is very hard to discuss causality. For instance, the significance of the coefficient in the regression

only tells the ‘co-occurrence’ of x and y, not that x causes y.

• In other words, usually the regression only tells us there is some ‘relationship’ between x and y, and does not tell the nature of the relationship, such as whether x causes y or y causes x.

36

iii xy

Page 37: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

GRANGER CAUSALITY

• One good thing of time series vector autoregression is that we could test ‘causality’ in some sense. This test is first proposed by Granger (1969), and therefore we refer it Granger causality.

• We will restrict our discussion to a system of two variables, x and y. y is said to Granger-cause x if current or lagged values of y helps to predict future values of x. On the other hand, y fails to Granger-cause x if for all s > 0, the mean squared error of a forecast of xt+s based on (xt, xt−1, . . .) is the same as that is based on (yt, yt−1, . . .) and (xt, xt−1, . . .).

37

Page 38: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

GRANGER CAUSALITY

• If we restrict ourselves to linear functions, x fails to Granger-cause x if

• Equivalently, we can say that x is exogenous in the time series sense with respect to y, or y is not linearly informative about future x.

38

,y,y,,x,xxEMSE,x,xxEMSE ttttststttst 111

Page 39: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

GRANGER CAUSALITY

• A variable X is said to Granger cause another variable Y, if Y can be better predicted from the past of X and Y together than the past of Y alone, other relevant information being used in the prediction (Pierce, 1977).

39

Page 40: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

GRANGER CAUSALITY• In the VAR equation, the example we

proposed above implies a lower triangular coefficient matrix:

Or if we use MA representations,

40

t

t

pt

pt

pp

p

t

t

t

t

a

a

y

x

y

x

c

c

y

x

2

1

2221

11

1

1

122

121

111

2

1 00

t

t

t

t

a

a

BB

B

y

x

2

1

2221

11

2

1 0

.,,BBB where ijijijij 01 021

022

011

2210

Page 41: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

GRANGER CAUSALITY

• Consider a linear projection of yt on past, present and future x’s,

where E(etx ) = 0 for all t and . Then y fails to Granger-cause x iff dj = 0 for j = 1, 2, . . ..

41

0 1jt

jjtjjtjt exdxbcy

Page 42: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

TESTING GRANGER CAUSALITYProcedure1) Check that both series are stationary in mean, variance

and covariance (if necessary transform the data via logs, differences to ensure this)

2) Estimate AR(p) models for each series, where p is large enough to ensure white noise residuals. F tests and other criteria (e.g. Schwartz or Akaike) can be used to establish the maximum lag p that is needed.

3) Re-estimate both model, now including all the lags of the other variable

4) Use F tests to determine whether, after controlling for past Y, past values of X can improve forecasts Y (and vice versa)

42

Page 43: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

TEST OUTCOMES

1. X Granger causes Y but Y does not Granger cause X

2. Y Granger causes X but X does not Granger cause Y

3. X Granger causes Y and Y Granger causes X (i.e., there is a feedback system)

4. X does not Granger cause Y and Y does not Granger cause X

43

Page 44: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

TESTING GRANGER CAUSALITY

• The simplest test is to estimate the regression which is based on

using OLS and then conduct a F-test of the null hypothesis

H0 : 1 = 2 = . . . = p = 0.

44

p

it

p

jjtjitit uyxcx

0 11

Page 45: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

TESTING GRANGER CAUSALITY

2.Run the following regression, and calculate RSS (full model)

3.Run the following limited regression, and calculate RSS (Restricted model).

45

p

it

p

jjtjitit uyxcx

0 11

p

ititit uxcx

01

Page 46: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

TESTING GRANGER CAUSALITY

4.Do the following F-test using RSS obtained from stages 2 and 3:

F = [{(n-k) /q }.{(RSSrestricted-RSSfull) / RSSfull}]

n: number of observationsk: number of parameters from full modelq: number of parameters from restricted model

46

Page 47: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

TESTING GRANGER CAUSALITY

5. If H0 rejected, then X causes Y.

• This technique can be used in investigating whether or not Y causes X.

47

Page 48: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

Example of the Usage of Granger Test

World Oil Price and Growth of US Economy• Does the increase of world oil price influence the

growth of US economy or does the growth of US economy effects the world oil price?

• James Hamilton did this study using the following model:

Zt= a0+ a1 Zt-1+...+amZt-m+b1Xt-1 +…bmXt-m+εt

Zt= ΔPt; changes of world price of oilXt= log (GNPt/ GNPt-1)

48

Page 49: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

World Oil Price and Growth of US Economy

• There are two causalities that need to be observed:

(i) H0: Growth of US Economy does not influence world oil price

Full: Zt= a0+ a1 Zt-1+...+amZt-m+b1Xt-1 +…+bmXt-m+εt

Restricted: Zt= a0+ a1 Zt-1+...+amZt-m+ εt

49

Page 50: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

World Oil Price and Growth of US Economy

(ii) H0 : World oil price does not influence growth of US Economy

• Full : Xt= a0+ a1 Xt-1+ …+amXt-m+ b1Zt-1+…+bmZt-m+ εt

• Restricted: Xt= a0+ a1 Xt-1+ …+amXt-m+ εt

50

Page 51: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

World Oil Price and Growth of US Economy

• F Tests Results:1. Hypothesis that world oil price does not

influence US economy is rejected. It means that the world oil price does influence US economy .

2. Hypothesis that US economy does not effect world oil price is not rejected. It means that the US economy does not have effect on world oil price.

51

Page 52: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

World Oil Price and Growth of US Economy

• Summary of James Hamilton’s Results

52

Null Hypothesis (H0) (I)F(4,86) (II)F(8,74)

I. Economic growth ≠→World Oil Price

0.58 0.71

II. World Oil Price≠→Economic

growth

5.55 3.28

Page 53: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

World Oil Price and Growth of US Economy

• Remark: The first experiment used the data 1949-1972 (95 observations) and m=4; while the second experiment used data 1950-1972 (91 observations) and m=8.

53

Page 54: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

Chicken vs. Egg• This causality test is also can be used in

explaining which comes first: chicken or egg. More specifically, the test can be used in testing whether the existence of egg causes the existence of chicken or vise versa.

• Thurman and Fisher did this study using yearly data of chicken and egg productions in the US from 1930 to1983

• The results:1. Egg causes the chicken.2. There is no evidence that chicken causes egg.

54

Page 55: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

Chicken vs. Egg

• Remark: Hypothesis that egg has no effect on chicken population is rejected; while the other hypothesis that chicken has no effect on egg is not rejected. Why?

55

Page 56: STAT 497 LECTURE NOTE 11 VAR MODELS AND GRANGER CAUSALITY 1

GRANGER CAUSALITY

• We have to be aware of that Granger causality does not equal to what we usually mean by causality. For instance, even if x1 does not cause x2, it may still help to predict x2, and thus Granger-causes x2 if changes in x1 precedes that of x2 for some reason.

• A naive example is that we observe that a dragonfly flies much lower before a rain storm, due to the lower air pressure. We know that dragonflies do not cause a rain storm, but it does help to predict a rain storm, thus Granger-causes a rain storm.

56