Nonstationary Time Series Data and Cointegration ECON 6002 Econometrics Memorial University of...
-
Upload
judith-robertson -
Category
Documents
-
view
231 -
download
6
Transcript of Nonstationary Time Series Data and Cointegration ECON 6002 Econometrics Memorial University of...
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
Figure 12.1(a) US economic time series
Yt-Y t-1On the right hand side
“Differenced series”
Fluctuates about a rising trend
Fluctuates about a zero mean
1 , 1t t ty y v
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)
1 , 1t t ty y v
1 0 1
22 1 2 0 1 2 0 1 2
21 2 0
( )
..... tt t t t
y y v
y y v y v v y v v
y v v v y
We can show that the constant mean of this series is zero
21 2[ ] [ .....] 0t t t tE y E v v v
1( ) ( )t t ty y v
1 , 1t t ty y v
We can also allow for a non-zero mean, by replacing yt with yt-mu
Which boils down to (using alpha = mu(1-rho))
( ) / (1 ) 1/ (1 0.7) 3.33tE y
1( ) ( ( 1)) , 1 t t ty t y t v
1t t ty y t v
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:
With alpha =(mu(1-rho)+rho times delta)And lambda = delta(1-rho)
1t t ty y v
1 0 1
2
2 1 2 0 1 2 01
1 01
( )
ss
t
t t t ss
y y v
y y v y v v y v
y y v y v
The first component is usually just zero, since it is so far in thepast that it has a negligible effect nowThe second one is the stochastictrend
A random walk is non-stationary, although the mean is constant:
0 1 2 0( ) ( ... )t tE y y E v v v y
21 2var( ) var( ... )t t vy v v v t
A random walk with a drift both wanders and trends:
1 0 1
2
2 1 2 0 1 2 01
1 01
( ) 2
ss
t
t t t ss
y y v
y y v y v v y v
y y v t y v
1t t ty y v
1 1 1
2 1 2
:
:
t t t
t t t
rw y y v
rw x x v
21 217.818 0.842 , .70
( ) (40.837)t trw rw R
t
Both independent and artificially generated, but…
Dickey-Fuller Test 1 (no constant and no trend)
1t t ty y v
1 1 1
1
1
1
t t t t t
t t t
t t
y y y y v
y y v
y v
Dickey-Fuller Test 1 (no constant and no trend)
0 0
1 1
: 1 : 0
: 1 : 0
H H
H H
Easier way to test the hypothesis about rho
Remember that the null is a unit root: nonstationarity!
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
An important extension of the Dickey-Fuller test allows for the
possibility that the error term is autocorrelated.
The unit root tests based on (12.6) and its variants (intercept excluded
or trend included) are referred to as augmented Dickey-Fuller tests.
11
m
t t s t s ts
y y a y v
1 1 2 2 2 3, ,t t t t t ty y y y y y
1 1
1 1
0.178 0.037 0.672
( ) ( 2.090)
0.285 0.056 0.315
( ) ( 1.976)
t t t
t t t
F F F
tau
B B B
tau
F = US Federal funds interest rate
B = 3-year bonds interest rate
In STATA:
use usa, cleargen date = q(1985q1) + _n - 1format %tq datetsset date
TESTING UNIT ROOTS “BY HAND”:* Augmented Dickey Fuller Regressionsregress D.F L1.F L1.D.Fregress D.B L1.B L1.D.B
In STATA:
TESTING UNIT ROOTS “BY HAND”:* Augmented Dickey Fuller Regressionsregress D.F L1.F L1.D.Fregress D.B L1.B L1.D.B
_cons .1778617 .1007511 1.77 0.082 -.0228016 .378525 LD. .6724777 .0853664 7.88 0.000 .5024559 .8424996 L1. -.0370668 .0177327 -2.09 0.040 -.0723847 -.001749 F D.F Coef. Std. Err. t P>|t| [95% Conf. Interval]
Total 17.5433842 78 .224915182 Root MSE = .35436 Adj R-squared = 0.4417 Residual 9.54348876 76 .12557222 R-squared = 0.4560 Model 7.99989546 2 3.99994773 Prob > F = 0.0000 F( 2, 76) = 31.85 Source SS df MS Number of obs = 79
. regress D.F L1.F L1.D.F
In STATA:
Augmented Dickey Fuller Regressions with built in functionsdfuller F, regress lags(1)dfuller B, regress lags(1)
Choice of lags if we want to allow For more than a AR(1) order
In STATA:
Augmented Dickey Fuller Regressions with built in functionsdfuller F, regress lags(1)
_cons .1778617 .1007511 1.77 0.082 -.0228016 .378525 LD. .6724777 .0853664 7.88 0.000 .5024559 .8424996 L1. -.0370668 .0177327 -2.09 0.040 -.0723847 -.001749 F D.F Coef. Std. Err. t P>|t| [95% Conf. Interval]
MacKinnon approximate p-value for Z(t) = 0.2484 Z(t) -2.090 -3.539 -2.907 -2.588 Statistic Value Value Value Test 1% Critical 5% Critical 10% Critical Interpolated Dickey-Fuller
Augmented Dickey-Fuller test for unit root Number of obs = 79
. dfuller F, regress lags(1)
_cons .1778617 .1007511 1.77 0.082 -.0228016 .378525 LD. .6724777 .0853664 7.88 0.000 .5024559 .8424996 L1. -.0370668 .0177327 -2.09 0.040 -.0723847 -.001749 F D.F Coef. Std. Err. t P>|t| [95% Conf. Interval]
MacKinnon approximate p-value for Z(t) = 0.2484 Z(t) -2.090 -3.539 -2.907 -2.588 Statistic Value Value Value Test 1% Critical 5% Critical 10% Critical Interpolated Dickey-Fuller
Augmented Dickey-Fuller test for unit root Number of obs = 79
. dfuller F, regress lags(1)
In STATA:
Augmented Dickey Fuller Regressions with built in functionsdfuller 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)
In STATA:
Augmented Dickey Fuller Regressions with built in functionsdfuller F, regress lags(1)
Alternatives: use tests with stationarity as the nullKPSS (Kwiatowski, Phillips, Schmidt and Shin. 1992) which also has an automatic bandwidth selection tool or the Leybourne & McCabe test .
1t t t ty y y v
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
1t t t ty y y v
10.340
( ) ( 4.007)
t tF F
tau
10.679
( ) ( 6.415)
t tB B
tau
So now we reject the Unit root after differencingonce:We have a I(1) series
In STATA:
ADF on differencesdfuller D.F, noconstant lags(0)dfuller D.B, noconstant lags(0)
_cons .1778617 .1007511 1.77 0.082 -.0228016 .378525 LD. .6724777 .0853664 7.88 0.000 .5024559 .8424996 L1. -.0370668 .0177327 -2.09 0.040 -.0723847 -.001749 F D.F Coef. Std. Err. t P>|t| [95% Conf. Interval]
MacKinnon approximate p-value for Z(t) = 0.2484 Z(t) -2.090 -3.539 -2.907 -2.588 Statistic Value Value Value Test 1% Critical 5% Critical 10% Critical Interpolated Dickey-Fuller
Augmented Dickey-Fuller test for unit root Number of obs = 79
. dfuller F, regress lags(1)
Z(t) -4.007 -2.608 -1.950 -1.610 Statistic Value Value Value Test 1% Critical 5% Critical 10% Critical Interpolated Dickey-Fuller
Dickey-Fuller test for unit root Number of obs = 79
. dfuller D.F, noconstant lags(0)
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!
2ˆ 1.644 0.832 , 0.881
( ) (8.437) (24.147)t tB F R
t
1 1ˆ ˆ ˆ0.314 0.315
( ) ( 4.543)t t te e e
tau
Z(t) -4.543 -2.608 -1.950 -1.610 Statistic Value Value Value Test 1% Critical 5% Critical 10% Critical Interpolated Dickey-Fuller
Augmented Dickey-Fuller test for unit root Number of obs = 79
. dfuller ehat, noconstant lags(1)
Check: These are wrong!
The null and alternative hypotheses in the test for cointegration are:
0
1
: the series are not cointegrated residuals are nonstationary
: the series are cointegrated residuals are stationary
H
H
12.5.1 First Difference Stationary
The variable yt is said to be a first difference stationary series.
Then we revert to the techniques we saw in Ch. 9
1t t ty y v
1t t t ty y y v
1 0 1 1t t t t ty y x x e
1t t ty y v
t ty v
1 0 1 1t t t t ty y x x e
Manipulating this one you can construct and Error Correction Modelto investigate the SR dynamics of the relationship between y and x
where
and
t ty t v
t ty t v
1 0 1 1t t t t ty y x x e
1 0 1 1t t t t ty t y x x e
1 1 2 0 1 1 1 1 2(1 ) ( )
1 1 2 0 1(1 ) ( )
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
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.
Slide 12-48Principles of Econometrics, 3rd Edition
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
Further issues
Slide 12-49Principles of Econometrics, 3rd Edition
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
Further issues