1
00:00:11,130 --> 00:00:15,840
So in this lecture, we will be looking at a notebook to demonstrate Granger causality.

2
00:00:16,590 --> 00:00:21,630
Note that the beginning of this notebook is very similar to the previous notebook on econometrics,

3
00:00:22,020 --> 00:00:24,090
so we won't repeat that analysis.

4
00:00:24,720 --> 00:00:30,990
Simply recall that we are looking at two quarterly time series The Difference GDP and the term spread.

5
00:00:33,480 --> 00:00:38,970
Recall that the GDP has a strong trend, which is why we took the difference and the term spread, it

6
00:00:38,970 --> 00:00:40,410
looks like it might be cyclical.

7
00:00:41,100 --> 00:00:43,740
So let's go to the part where we actually do the tests.

8
00:00:48,380 --> 00:00:53,900
Now, at this point, you should be asking the question, what is the direction of the Granger causality?

9
00:00:54,590 --> 00:00:58,910
We know that we're going to pass in a two time series and we know that we're going to get significant

10
00:00:58,910 --> 00:01:02,120
P values if one of the time series affects the other.

11
00:01:02,660 --> 00:01:07,970
But is it the first time series that affects the second or the second time series that affects the first?

12
00:01:08,720 --> 00:01:13,460
In order to know this, you have to check the documentation, which I've pasted in this notebook.

13
00:01:14,240 --> 00:01:18,560
The states that the test is for whether or not the second column affects the first.

14
00:01:19,100 --> 00:01:24,740
So in this case, because we've put term spread after GDP growth, we'll be testing whether or not term

15
00:01:24,740 --> 00:01:27,020
spread can forecast GDP growth.

16
00:01:29,790 --> 00:01:34,350
Note that have set the Max Light to 18, which is what we used in the previous notebook.

17
00:01:41,450 --> 00:01:47,630
OK, so we can see that the coefficients are significant at a threshold of five percent for like one.

18
00:01:52,200 --> 00:01:54,540
For like two, they are again, a significant.

19
00:01:58,390 --> 00:02:00,670
For like three, they are again significant.

20
00:02:03,840 --> 00:02:06,180
For like four, they are again, a significant.

21
00:02:08,750 --> 00:02:13,970
Note that this pattern keeps repeating, but only up to a point at the later legs, you'll see that

22
00:02:13,970 --> 00:02:17,270
the P values do not pass this five percent threshold.

23
00:02:22,090 --> 00:02:27,580
Now, let's do the Granger causality test again, but this time let's reverse the order of the columns.

24
00:02:28,060 --> 00:02:32,110
So now we are testing whether GDP growth can forecast term spread.

25
00:02:39,110 --> 00:02:45,890
So this time, note that we see very significant P values for all legs, these p values are much smaller

26
00:02:45,890 --> 00:02:46,940
than the first Test.

27
00:02:47,630 --> 00:02:49,790
So you might be wondering how can this be?

28
00:02:50,510 --> 00:02:56,630
How is it possible that if one variable causes the second, that the second can also cause the first?

29
00:02:57,350 --> 00:03:03,020
This might seem like a paradox, but only if you mistakenly think that this is a test for causality.

30
00:03:03,740 --> 00:03:09,590
Remember that Granger causality is not actually a test of causality, but a test of forecasting ability.

31
00:03:10,220 --> 00:03:14,510
This simply means that these are useful input features for making a forecast.
