Unit roots and cointegration - Memorial University of Newfoundland
Download
Report
Transcript Unit roots and cointegration - Memorial University of Newfoundland
ECON 6002
Econometrics
Memorial University of Newfoundland
Nonstationary Time Series Data and
Cointegration
Adapted from Vera Tabakova’s notes
12.1 Stationary and Nonstationary Variables
12.2 Spurious Regressions
12.3 Unit Root Tests for Stationarity
12.4 Cointegration
12.5 Regression When There is No Cointegration
Principles of Econometrics, 3rd Edition
Slide 12-2
Fluctuates about a rising trend
Yt-Y t-1
On the right
hand side
Fluctuates about a zero mean
“Differenced
series”
Figure 12.1(a) US economic time series
Principles of Econometrics, 3rd Edition
Slide 12-3
Yt-Y t-1
On the right
hand side
“Differenced
series”
Figure 12.1(b) US economic time series
Principles of Econometrics, 3rd Edition
Slide 12-4
Stationary if:
E yt
(12.1a)
var yt 2
(12.1b)
cov yt , yt s cov yt , yt s s
Principles of Econometrics, 3rd Edition
(12.1c)
Slide 12-5
Principles of Econometrics, 3rd Edition
Slide 12-6
yt yt 1 vt ,
1
(12.2a)
Each realization of the process has a proportion rho of the previous one
plus an error drawn from a distribution with mean zero and variance
sigma squared
It can be generalised to a higher autocorrelation order
We just show AR(1)
Principles of Econometrics, 3rd Edition
Slide 12-7
yt yt 1 vt ,
1
(12.2a)
We can show that the constant mean of this series is zero
y1 y0 v1
y2 y1 v2 (y0 v1 ) v2 2 y0 v1 v2
yt vt vt 1 2vt 2 ..... t y0
E[ yt ] E[vt vt 1 2vt 2 .....] 0
Principles of Econometrics, 3rd Edition
Slide 12-8
We can also allow for a non-zero mean, by replacing yt with yt-mu
( yt ) ( yt 1 ) vt
Which boils down to (using alpha = mu(1-rho))
yt yt 1 vt ,
1
(12.2b)
E ( yt ) / (1 ) 1/ (1 0.7) 3.33
Principles of Econometrics, 3rd Edition
Slide 12-9
Or we can allow for a AR(1) with a fluctuation around a linear trend
(mu+delta times t)
The “de-trended” model , which is now stationary, behaves like
an autoregressive model:
( yt t ) ( yt 1 (t 1)) vt ,
yt yt 1 t vt
1
(12.2c)
With alpha =(mu(1-rho)+rho times delta)
And lambda = delta(1-rho)
Principles of Econometrics, 3rd Edition
Slide 12-10
Figure 12.2 (a) Time Series Models
Principles of Econometrics, 3rd Edition
Slide 12-11
Figure 12.2 (b) Time Series Models
Principles of Econometrics, 3rd Edition
Slide 12-12
Figure 12.2 (c) Time Series Models
Principles of Econometrics, 3rd Edition
Slide 12-13
yt yt 1 vt
(12.3a)
y1 y0 v1
2
y2 y1 v2 ( y0 v1 ) v2 y0 vs
s 1
t
yt yt 1 vt y0 vs
s 1
Principles of Econometrics, 3rd Edition
The first component is usually
just zero, since it is so far in the
past that it has a negligible
effect now
The second one is the stochastic
trend
Slide 12-14
A random walk is non-stationary, although the mean is constant:
E ( yt ) y0 E (v1 v2 ... vt ) y0
var( yt ) var(v1 v2 ... vt ) tv2
Principles of Econometrics, 3rd Edition
Slide 12-15
yt yt 1 vt
(12.3b)
A random walk with a drift both wanders and trends:
y1 y0 v1
2
y2 y1 v2 ( y0 v1 ) v2 2 y0 vs
s 1
t
yt yt 1 vt t y0 vs
s 1
Principles of Econometrics, 3rd Edition
Slide 12-16
E ( yt ) t y0 E (v1 v2 v3 ... vt ) t y0
var( yt ) var(v1 v2 v3 ... vt ) tv2
Principles of Econometrics, 3rd Edition
Slide 12-17
rw1 : yt yt 1 v1t
rw2 : xt xt 1 v2t
Both independent and artificially generated, but…
rw1t 17.818 0.842 rw2t ,
(t )
Principles of Econometrics, 3rd Edition
R 2 .70
(40.837)
Slide 12-18
Figure 12.3 (a) Time Series of Two Random Walk Variables
Principles of Econometrics, 3rd Edition
Slide 12-19
Figure 12.3 (b) Scatter Plot of Two Random Walk Variables
Principles of Econometrics, 3rd Edition
Slide 12-20
Dickey-Fuller Test 1 (no constant and no trend)
yt yt 1 vt
(12.4)
yt yt 1 yt 1 yt 1 vt
yt 1 yt 1 vt
(12.5a)
yt 1 vt
Principles of Econometrics, 3rd Edition
Slide 12-21
Dickey-Fuller Test 1 (no constant and no trend)
H0 : 1 H0 : 0
H1 : 1 H1 : 0
Easier way to test the hypothesis about rho
Remember that the null is a unit root: nonstationarity!
Principles of Econometrics, 3rd Edition
Slide 12-22
Dickey-Fuller Test 2 (with constant but no trend)
yt yt 1 vt
Principles of Econometrics, 3rd Edition
(12.5b)
Slide 12-23
Dickey-Fuller Test 3 (with constant and with trend)
yt yt 1 t vt
Principles of Econometrics, 3rd Edition
(12.5c)
Slide 12-24
First step: plot the time series of the original observations on the
variable.
If the series appears to be wandering or fluctuating around a sample
average of zero, use Version 1
If the series appears to be wandering or fluctuating around a sample
average which is non-zero, use Version 2
If the series appears to be wandering or fluctuating around a linear
trend, use Version 3
Principles of Econometrics, 3rd Edition
Slide 12-25
Principles of Econometrics, 3rd Edition
Slide 12-26
An important extension of the Dickey-Fuller test allows for the
possibility that the error term is autocorrelated.
m
yt yt 1 as yt s vt
(12.6)
s 1
yt 1 yt 1 yt 2 , yt 2 yt 2 yt 3 ,
The unit root tests based on (12.6) and its variants (intercept excluded
or trend included) are referred to as augmented Dickey-Fuller tests.
Principles of Econometrics, 3rd Edition
Slide 12-27
F = US Federal funds interest rate
Ft 0.178 0.037 Ft 1 0.672Ft 1
(tau )
( 2.090)
B = 3-year bonds interest rate
Bt 0.285 0.056 Bt 1 0.315Bt 1
(tau )
Principles of Econometrics, 3rd Edition
( 1.976)
Slide 12-28
In STATA:
use usa, clear
gen date = q(1985q1) + _n - 1
format %tq date
tsset date
TESTING UNIT ROOTS “BY HAND”:
* Augmented Dickey Fuller Regressions
regress D.F L1.F L1.D.F
regress D.B L1.B L1.D.B
Principles of Econometrics, 3rd Edition
Slide 12-29
In STATA:
. regress D.F
L1.F ROOTS
L1.D.F
TESTING
UNIT
“BY HAND”:
Source
SS Fuller
dfRegressions
MS
* Augmented
Dickey
7.99989546
regressModel
D.F L1.F
L1.D.F 2 3.99994773
Residual
9.54348876
76
.12557222
regress D.B L1.B L1.D.B
Total
17.5433842
78
Number of obs
F( 2,
76)
Prob > F
R-squared
Adj R-squared
Root MSE
.224915182
t
P>|t|
79
31.85
0.0000
0.4560
0.4417
.35436
D.F
Coef.
F
L1.
LD.
-.0370668
.6724777
.0177327
.0853664
-2.09
7.88
0.040
0.000
-.0723847
.5024559
-.001749
.8424996
_cons
.1778617
.1007511
1.77
0.082
-.0228016
.378525
Principles of Econometrics, 3rd Edition
Std. Err.
=
=
=
=
=
=
[95% Conf. Interval]
Slide 12-30
In STATA:
Augmented Dickey Fuller Regressions with built in functions
dfuller F, regress lags(1)
dfuller B, regress lags(1)
Choice of lags if we want to allow
For more than a AR(1) order
Principles of Econometrics, 3rd Edition
Slide 12-31
In STATA:
Augmented Dickey Fuller Regressions with built in functions
dfuller F, regress lags(1)
. dfuller F, regress lags(1)
. dfuller F, regress lags(1)
Augmented Dickey-Fuller test for unit root
Augmented Dickey-Fuller test for unit root
TestTest
Statistic
Statistic
Z(t) Z(t)
Number of obs
Number of obs
=
=
79
79
Interpolated Dickey-Fuller
Interpolated Dickey-Fuller
1% 1%
Critical
5%
10%Critical
Critical
Critical
5% Critical
Critical
10%
Value
Value
Value
Value
Value
Value
-2.090
-2.090
-3.539
-3.539
-2.907
-2.907
-2.588
-2.588
MacKinnon
approximate
p-value
Z(t)= =0.2484
0.2484
MacKinnon
approximate
p-value
forfor
Z(t)
D.F D.F
Coef. Std.
Std.
Err.
Coef.
Err.
tt
P>|t|
P>|t|
[95%
[95% Conf.
Conf.Interval]
Interval]
F
F L1.
-.0370668
.0177327
L1. LD.-.0370668
.6724777 .0177327
.0853664
LD.
.6724777
.0853664
_cons
_cons
.1778617
.1778617
Principles of Econometrics, 3rd Edition
.1007511
.1007511
-2.09
7.88
7.88
-2.09
0.040
0.000
0.000
0.040
-.0723847
-.0723847
.5024559
1.77
0.082
-.0228016
1.77
0.082
.5024559
-.0228016
-.001749
-.001749
.8424996
.8424996
.378525
.378525
Slide 12-32
In STATA:
Augmented Dickey Fuller Regressions with built in functions
dfuller F, regress lags(1)
Alternative: pperron uses Newey-West standard errors to account for
serial correlation, whereas the augmented Dickey-Fuller test implemented in
dfuller uses additional lags of the first-difference variable.
Also consider now using DFGLS (Elliot Rothenberg and Stock, 1996) to
counteract problems of lack of power in small samples. It also has in STATA
a lag selection procedure based on a sequential t test suggeste by Ng and
Perron (1995)
Principles of Econometrics, 3rd Edition
Slide 12-33
In STATA:
Augmented Dickey Fuller Regressions with built in functions
dfuller F, regress lags(1)
Alternatives: use tests with stationarity as the null
KPSS (Kwiatowski, Phillips, Schmidt and Shin. 1992) which also has an
automatic bandwidth selection tool or the Leybourne & McCabe test .
Principles of Econometrics, 3rd Edition
Slide 12-34
yt yt yt 1 vt
The first difference of the random walk is stationary
It is an example of a I(1) series (“integrated of order 1”
First-differencing it would turn it into I(0) (stationary)
In general, the order of integration is the minimum number of times a
series must be differenced to make it stationarity
Principles of Econometrics, 3rd Edition
Slide 12-35
yt yt yt 1 vt
F t 0.340 F t 1
(tau )
( 4.007)
So now we reject the
Unit root after differencing
once:
We have a I(1) series
B t 0.679 B t 1
(tau )
Principles of Econometrics, 3rd Edition
( 6.415)
Slide 12-36
In STATA:
ADF on differences
dfuller D.F, noconstant lags(0)
dfuller D.B, noconstant lags(0)
. dfuller F, regress lags(1)
Augmented Dickey-Fuller test for unit root
Number of obs
=
79
Interpolated Dickey-Fuller
5% Critical
10% Critical
Value
Value
Number of obs
=
79
-3.539
-2.907
-2.588
Interpolated Dickey-Fuller
Test
1% Critical
5% Critical
10% Critical
MacKinnon approximate
p-value
for Z(t) = 0.2484
Statistic
Value
Value
Value
. dfuller D.F, noconstantTest
lags(0)
Statistic
Dickey-Fuller test for unit root
Z(t)
-2.090
Z(t)
-4.007
D.F
Coef.
1% Critical
Value
-2.608
Std.
Err.
t
-1.950
P>|t|
-1.610
[95% Conf.
Interval]
F
L1.
LD.
-.0370668
.6724777
.0177327
.0853664
-2.09
7.88
0.040
0.000
-.0723847
.5024559
-.001749
.8424996
_cons
.1778617
.1007511
1.77
0.082
-.0228016
.378525
Slide 12-37
eˆt eˆt 1 vt
(12.7)
Case 1: eˆt yt bxt
(12.8a)
Case 2 : eˆt yt b2 xt b1
(12.8b)
Case 3: eˆt yt b2 xt b1 ˆ t
(12.8c)
Principles of Econometrics, 3rd Edition
Slide 12-38
Not the same as for dfuller, since the residuals are estimated errors no actual
ones
Note: unfortunately STATA dfuller will not notice and give you erroneous
critical values!
Principles of Econometrics, 3rd Edition
Slide 12-39
Bˆt 1.644 0.832Ft , R 2 0.881
(12.9)
(t ) (8.437) (24.147)
eˆt 0.314eˆt 1 0.315eˆt 1
(tau ) (4.543)
Check: These are wrong!
. dfuller ehat, noconstant lags(1)
Augmented Dickey-Fuller test for unit root
Test
Statistic
Z(t)
-4.543
Number of obs
=
79
Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value
-2.608
-1.950
-1.610
Slide 12-40
The null and alternative hypotheses in the test for cointegration are:
H 0 : the series are not cointegrated residuals are nonstationary
H1 : the series are cointegrated residuals are stationary
Principles of Econometrics, 3rd Edition
Slide 12-41
12.5.1 First Difference Stationary
yt yt 1 vt
yt yt yt 1 vt
The variable yt is said to be a first difference stationary series.
Then we revert to the techniques we saw in Ch. 9
Principles of Econometrics, 3rd Edition
Slide 12-42
Manipulating this one you can construct and Error Correction Model
to investigate the SR dynamics of the relationship between y and x
yt yt 1 0xt 1xt 1 et
(12.10a)
yt yt 1 vt
yt vt
yt yt 1 0xt 1xt 1 et
Principles of Econometrics, 3rd Edition
(12.10b)
Slide 12-43
yt t vt
yt t vt
yt yt1 0 xt 1xt1 et
(12.11)
yt t yt 1 0 xt 1xt 1 et
where 1 (1 1 ) 2 (0 1 ) 11 12
and
1 (1 1 ) 2 (0 1 )
Principles of Econometrics, 3rd Edition
Slide 12-44
To summarize:
If variables are stationary, or I(1) and cointegrated, we can estimate a
regression relationship between the levels of those variables without
fear of encountering a spurious regression.
Then we can use the lagged residuals from the cointegrating
regression in an ECM model
This is the best case scenario, since if we had to first-differentiate the
variables, we would be throwing away the long-run variation
Additionally, the cointegrated regression yields a “superconsistent”
estimator in large samples
Principles of Econometrics, 3rd Edition
Slide 12-45
To summarize:
If the variables are I(1) and not cointegrated, we need to estimate a
relationship in first differences, with or without the constant term.
If they are trend stationary, we can either de-trend the series first and
then perform regression analysis with the stationary (de-trended)
variables or, alternatively, estimate a regression relationship that
includes a trend variable. The latter alternative is typically applied.
Principles of Econometrics, 3rd Edition
Slide 12-46
Augmented Dickey-Fuller test
Autoregressive process
Cointegration
Dickey-Fuller tests
Mean reversion
Order of integration
Random walk process
Random walk with drift
Spurious regressions
Stationary and nonstationary
Stochastic process
Stochastic trend
Tau statistic
Trend and difference stationary
Unit root tests
Principles of Econometrics, 3rd Edition
Slide 12-47
Further issues
Kit Baum has really good notes on these topics that can be used to learn
also about extra STATA commands to handle the analysis:
http://fmwww.bc.edu/ec-c/s2003/821/ec821.sect05.nn1.pdf
http://fmwww.bc.edu/ec-c/s2003/821/ec821.sect06.nn1.pdf
For example, some of you should look at seasonal unit root analysis
(command HEGY in STATA)
Panel unit roots would be here
http://fmwww.bc.edu/ec-c/s2003/821/ec821.sect09.nn1.pdf
Principles of Econometrics, 3rd Edition
Slide 12-48
Further issues
You may want to some time consider unit root tests that allow for structural
Breaks
You can also take a look at the literature review in this working paper:
http://ideas.repec.org/p/wpa/wuwpot/0410002.html
Principles of Econometrics, 3rd Edition
Slide 12-49
Further issues
When you deal with more than 2 regressors you should consider the
Johansen’s method to examine the cointegration relationships
Principles of Econometrics, 3rd Edition
Slide 12-50