Granger Causality

9
Granger Causality Guy Lion December 2005

description

Introducing Granger Causality

Transcript of Granger Causality

Page 1: Granger Causality

Granger Causality

Guy Lion

December 2005

Page 2: Granger Causality

04/10/23 2

Granger Causality vs “Causality”

• Granger causality measures whether A happens before B and helps predict B.

• A Granger causing B may entail “real”causality. But, you can’t be sure.

• If A does not Granger cause B. You can be more confident, A does not cause B.

Page 3: Granger Causality

04/10/23 3

Granger Causality steps

1. Develop a Base case autoregressive model using dependent variable and its lagged values as independent variable.

2. Develop a Test case model by adding a second lagged independent variable you want to test.

3. Calculate the square of the residual errors for the two models and run an F test or t Test (unpaired) to check if the residuals are significantly lower when you add tested second variable.

4. Redo steps 1 through 3, but reverse the direction. By comparing the tests significance or P value, you can see if A Granger causes B more than B Granger causes A.

Page 4: Granger Causality

04/10/23 4

The Basic Picture

A Granger causes B

Base case Model Test ModelAutoregressive Multivariate

X1 = Lag B X1 = Lag BY = B X2 = Lag A

Y = B

Square Residuals Square Residuals

Hypothesis testing

F or t TestDo the 2 samples ofresiduals come from same population?

Linear Regression

Independent Variable being tested

Page 5: Granger Causality

04/10/23 5

The Whole Picture

A Granger causes B B Granger causes A

Base case Model Test Model Base case Model Test ModelAutoregressive Multivariate Autoregressive Multivariate

X1 = Lag B X1 = Lag B X1 = Lag A X1 = Lag AY = B X2 = Lag A Y = A X2 = Lag B

Y = B Y = A

Square Residuals Square Residuals Square Residuals Square Residuals

Hypothesis testing Hypothesis testing

F or t Test F or t TestDo the 2 samples of Do the 2 samples ofresiduals come from residuals come from same population? same population?

Granger CausalityCompare significance of F or t Stat P value to find out if A causes B more than B causes A.

Linear Regression Linear Regression

Page 6: Granger Causality

04/10/23 6

Does Loan Granger cause Deposit

CorrelationSince mid 1987All loans

Alldeposits

Current 0.52 Lag 1 0.15 Lag 2 0.43 Lag 3 0.07 Lag 4 0.61

Data source: quarterly basis since 2nd quarter of 1987. Total loans and total deposits aggregated from Fed Data Flow of Funds Accounts (L109, L215,

L216, L217, L222).

Let’s test if Loan Granger causes Deposit . We will use Loan with a 4 quarter lag since it has the highest correlation with Deposit .

Page 7: Granger Causality

04/10/23 7

t Test (unpaired) (Loans cause Deposits)

The Test model achieved a higher adjusted R Square of 0.41 vs the Base case model’s 0.28.

Unpaired t Test (large sample formula)Input Base Test

Model ModelSample size 72 72Avg. of square residuals 0.012% 0.010%Standard deviation 0.016% 0.013%Standard error 0.002% 0.001%

A Average difference 0.002%

Output

B Group standard error 0.002%A/B t statistic 0.92 (nbr. of stand. errror)

Degree of freedom 142Group's t statistics:P Value, prob. population are same: a) One tail 17.8%b) Two tail 35.7%Using normal distribution 35.5% Using NORMDIST

Page 8: Granger Causality

04/10/23 8

t Test (unpaired) (Deposits cause Loans)

Unpaired t Test (large sample formula)

Input Base TestModel Model

Sample size 72 72Avg. of square residuals 0.003% 0.003%Standard deviation 0.006% 0.006%Standard error 0.001% 0.001%

A Average difference 0.000%

OutputB Group standard error 0.001%

A/B t statistic 0.000 distance (nbr. of stand. errror)Degree of freedom 142Group's t statistics:P Value, prob. population are same: a) One tail 49.99%b) Two tail 99.98%Using normal distribution 99.98% Using NORMDIST

The Test model achieved a lower adjusted R Square of 0.45 vs the Base case model’s 0.46.

Page 9: Granger Causality

04/10/23 9

Loans Granger causes Deposits more than the reverse

Loans cause Deposits Deposits cause Loans

Base Test Base TestVariables model model model modelDependent Y Deposit Deposit Loan Loan

Independent X1 Lagged " Lagged " Lagged " Lagged "Independent X2 Lagged Loan Lagged Deposit

Regression StatisticsAdj. R Square 0.28 0.41 0.46 0.45Standard Error 1.11% 1.01% 0.59% 0.60%

Testing if Square Residuals coming from same population.Significance of F 35.7% 99.98%t test P value 35.7% 99.98%