Econ21_Baum
Econ21_Baum
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 1 / 52
Introduction
The popularity of Granger causality stems from the fact that it is identified
using reduced-form VAR models, applicable to a set of potentially jointly
determined variables.
Advantages:
No need for normalization
No need for guidance from economic theory
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 2 / 52
Introduction
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 3 / 52
Introduction
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 4 / 52
Introduction
Phillips, Wu, and Yu (2011) and Phillips, Shi, and Yu (2014, 2015a,b)
derive theoretical results for testing for and date-stamping asset price
bubbles.
Based on these results, Shi, Phillips, and Hurn (2018) and Shi, Hurn, and
Phillips (2020) revisit the notion of time variation in testing for Granger
causality. They establish that it is possible to assess the stability of causal
relationships over time.
Shi, Phillips, and Hurn (2018) study the stationary VAR model,
Shi, Hurn, and Phillips (2020) study the lag-augmented VAR
(LA-VAR) model, which allows for non-stationary variables.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 5 / 52
Introduction
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 6 / 52
Introduction
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 7 / 52
Granger causality
where y1t and y2t , respectively, represent economic time series of interest.
Variable y1 is said to Granger cause variable y2 if the past values of y1
have predictive power for the current value of y2 , conditional on the past
returns of y2 .
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 8 / 52
Granger causality
Recasting the bivariate VAR(m) in matrix notation:
yt = Πxt + εt . (3)
where
yt = [ y1t y2t ]0 ,
0
xt = [ 1 yt−1 0
yt−2 0
· · · yt−k ]0
Π2×(2m+1) = [ Φ0 Φ1 · · · Φm ]
with
(2) 0
Φ0 = [ φ(1)
0 φ0 ]
and " #
(1) (1)
φ1k φ2k
Φk = (2) (2) for k = 1, . . . , m.
φ1k φ2k
The null of no Granger causality from variable y1 to y2 is R1→2 π = 0,
where R1→2 is the coefficient restriction matrix and π = vec(Π)
using row vectorization.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 9 / 52
Granger causality
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 10 / 52
Granger causality
To test for Granger causality in the LA-VAR model, one proceeds just as
before.The coefficients associated to the additional d are not included in
the testing restrictions.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 11 / 52
Recursive testing algorithms
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 12 / 52
Recursive testing algorithms
Then Tr1 ,r will be taken to denote a Wald test statistic computed over a
subsample starting at y[Tr1 ] and ending at y[Tr ] .
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 13 / 52
The forward expanding window
The Wald test statistic is computed first for a minimum window length,
τ0 = [Tr0 ] > 0, and the sample size then expands sequentially by one
observation until the final test statistic is computed using the entire
sample. The starting point of every subsample is the first data point.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 14 / 52
The forward expanding window
Figure 1: Forward expanding window (based on Phillips, Shi, and Yu, 2015a)
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 15 / 52
The rolling window
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 16 / 52
The rolling window
τ0 = [Tr0 ]
τ0 = [Tr0 ]
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 17 / 52
The recursive evolving window
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 18 / 52
The recursive evolving window
The information derived from these test statistics can be used over the full
sample or analyzed through the period in order to focus on the timing of
these time-varying phenomena via date stamping.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 19 / 52
The recursive evolving window
τ0 = [Tr0 ]
τ0 = [Tr0 ]
Figure 3: Sample sequences and window widths (based on Phillips, Shi, and Yu,
2015a)
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 20 / 52
Full sample analysis
The maximal FE statistic is the largest element of the first row of the
upper triangular matrix of test statistics.
The maximal RO statistic is the largest element of the main diagonal
of the matrix.
The maximal RE statistic is the largest element of the entire upper
triangular matrix.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 21 / 52
Date stamping
Beyond these summary measures for the full sample, the sequence of FE,
RO and RE statistics can be graphed and compared with the bootstrap
percentiles derived by methods described in Shi, Hurn, and Phillips (2020),
section 3 and Shi, Phillips, and Hurn (2018), section 4.1.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 22 / 52
The tvgc command
Syntax
The tvgc command tests whether the first variable in the varlist is
Granger-caused by the remaining variables.
Before using the tvgc command, it is necessary to tsset the data. The
varlist cannot contain gaps, but can contain time-series operators. tvgc
does not support the by: prefix. It may be applied to one unit of a panel
dataset.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 23 / 52
The tvgc command
Options
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 25 / 52
The tvgc command
Options
graph specifies that the timeseries of the three test statistics should
be graphed along with their 90% and 95% critical values. The graphs
will be saved with names specified by the prefix() option as
prefix forward, prefix rolling and prefix rolling. The eps and
pdf options specify the format in which the graphs are saved. The
notitle option suppresses the graph titles.
restab specifies that a LATEX table containing the test statistics and
their 95th and 99th percentile values should be written to
restab.tex. The file will be replaced if it exists. When including this
fragment in a LATEX document, use the booktabs package.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 26 / 52
The tvgc command
Implementation
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 27 / 52
Empirical application
The tvgc command is illustrated using a three-variable VAR specification
for monthly US data.
4.5 10.0
8.0
4.0
6.0
3.5
4.0
3.0
1959 1965 1971 1977 1983 1989 1995 2001 2007 2013 2019 1959 1965 1971 1977 1983 1989 1995 2001 2007 2013 2019
(a) ln i (b) u
5.0
4.0
3.0
2.0
1.0
1959 1965 1971 1977 1983 1989 1995 2001 2007 2013 2019
(c) ln o
The order of integration of the variables is assessed with the ADFmax and
DFGLS unit root tests of Leybourne (1995) and Elliott, Rothenberg, and
Stock (1996).
Using the Stata commands adfmaxur (Otero and Baum, 2018) and ersur
(Otero and Baum, 2017), the results suggest:
presence of a unit root in ln i and ln o,
stationarity of the unemployment rate
As there are I(1) variables in the VAR model, our analysis proceeds in the
context of a LA-VAR model where d = 1.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 30 / 52
Empirical application
The optimal lag order of the VAR model is chosen using the Stata
command varsoc.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 31 / 52
Empirical application
GC ?
Letting x −−→ y to denote that the direction of Granger causality being
tested runs from x to y , the following relationships are tested:
GC ? GC ?
u −−→ ln i and ln o −−→ ln i;
GC ? GC ?
ln i −−→ u and ln o −−→ u;
GC ? GC ?
ln i −−→ ln o and u −−→ ln o.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 32 / 52
Empirical application
The results for the full sample show that we fail to reject the null
hypothesis of no Granger causality from income and unemployment to the
price of oil when applying the FE window.
In all other cases there is evidence of Granger causality when the test
statistics are compared with the 95th percentiles of the empirical
distribution of the bootstrap test statistics.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 34 / 52
Empirical application
GC ?
u−
−−→ ln i 20.524 31.073 38.806
(10.283) (10.355) (10.775)
[15.751] [15.110] [16.131]
GC ?
ln o −
−−→ ln i 12.037 28.322 31.689
(8.709) (8.970) (9.324)
[12.459] [13.526] [14.389]
GC ?
ln i −
−−→u 70.205 68.762 75.290
(10.360) (10.469) (10.544)
[15.850] [17.025] [17.892]
GC ?
ln o −
−−→u 46.355 42.252 64.877
(9.673) (9.807) (10.118)
[13.607] [13.607] [13.962]
GC ?
ln i −
−−→ ln o 4.349 25.639 30.328
(7.913) (8.565) (9.344)
[14.964] [14.956] [14.964]
GC ?
u−
−−→ ln o 3.440 17.229 17.253
(9.333) (9.333) (10.121)
[15.417] [14.775] [15.417]
The 95th and 99th percentiles of the empirical distribution of the bootstrap statistics are in parentheses and brackets,
respectively.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 35 / 52
Empirical application
These plots display the 90th and 95th percentiles of the empirical
distribution of the bootstrap statistics, to be compared with the sequence
of FE, RO, and RE test statistics.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 36 / 52
Empirical application
20 30
15
20
10
10
0 0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1 1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ? GC ?
(a) Forward: u −−→ ln i (b) Rolling: u −−→ ln i
40
30
20
10
0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ?
(c) Recursive: u −−→ ln i
60 60
40 40
20 20
0 0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1 1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ? GC ?
(a) Forward: ln i −−→ u (b) Rolling: ln i −−→ u
80
60
40
20
0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ?
(c) Recursive: ln i −−→ u
20
6
15
10
2
5
0 0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1 1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ? GC ?
(a) Forward: ln i −−→ ln o (b) Rolling: ln i −−→ ln o
30
20
10
0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ?
(c) Recursive: ln i −−→ ln o
10 20
5 10
0 0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1 1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ? GC ?
(a) Forward: ln o −−→ ln i (b) Rolling: ln o −−→ ln i
30
20
10
0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ?
(c) Recursive: ln o −−→ ln i
8
15
10
5
2
0 0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1 1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ? GC ?
(a) Forward: u −−→ ln o (b) Rolling: u −−→ ln o
20
15
10
0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ?
(c) Recursive: u −−→ ln o
40
30
30
20
20
10
10
0 0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1 1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ? GC ?
(a) Forward: ln o −−→ u (b) Rolling: ln o −−→ u
60
40
20
0
1960m1 1970m1 1980m1 1990m1 2000m1 2010m1 2020m1
GC ?
(c) Recursive: ln o −−→ u
Estimation using the FE and RE windows indicate that during most of the
study period there is evidence of Granger causality from unemployment to
income; see Figures 5(a) and 5(c), and vice versa, see Figures 6(a) and
6(c). These results provide strong support for the intuition that these two
measures of economic activity are closely related.
FE estimation also shows that the price of oil Granger-causes income in
the late 1960s and early 1970s; see Figure 8(a).
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 43 / 52
Summary of findings
The fact that the FE window fails to pick up the opening of this causal
channel confirms a well-known problem with the FE algorithm: namely,
that it is not sensitive to changes late in the sample period.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 44 / 52
Summary of findings
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 45 / 52
Concluding remarks
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 46 / 52
Concluding remarks
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 46 / 52
Concluding remarks
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 46 / 52
Concluding remarks
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 46 / 52
Concluding remarks
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 47 / 52
References I
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 48 / 52
References II
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 49 / 52
References III
Otero, J. and C. F. Baum (2017). Response surface models for the Elliott,
Rothenberg, and Stock unit-root test. The Stata Journal 17 (4),
985–1002.
Otero, J. and C. F. Baum (2018). Unit-root tests based on forward and
reverse Dickey-Fuller regressions. The Stata Journal 18 (1), 22–28.
Phillips, P. C. B. and S. Shi (2020). Real time monitoring of asset
markets: bubbles and crises. In H. D. Vinod and C. R. Rao (Eds.),
Handbook of Statistics: Financial, Macro and Micro Econometrics
Using R, Volume 42, pp. 61–80. Amsterdam: Elsevier.
Phillips, P. C. B., S. Shi, and J. Yu (2014). Specification sensitivity in
right-tailed unit root testing for explosive behaviour. Oxford Bulletin of
Economics and Statistics 76 (3), 315–333.
Phillips, P. C. B., S. Shi, and J. Yu (2015a). Testing for multiple bubbles:
Historical episodes of exuberance and collapse in the S&P 500.
International Economic Review 56 (4), 1043–1077.
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 50 / 52
References IV
Baum, Otero, Hurn Testing for time-varying Granger causality 2021 Stata Symposium 52 / 52