review of unit root testing d. a. dickey north carolina state university
TRANSCRIPT
Review of Unit Root TestingReview of Unit Root Testing
D. A. DickeyD. A. DickeyNorth Carolina State North Carolina State
UniversityUniversity
Nonstationary Forecast
Stationary Forecast
”Trend Stationary” Forecast
Nonstationary Forecast
Autoregressive ModelAutoregressive Model AR(1) AR(1)
Yt Yt-1et
Yt Yt-1et
Yt Yt-1
et
Yt Yt-1 et
where Yt is Yt Yt-1
AR(p) AR(p)
Yt Yt-1Yt-2pYt-1et
AR(1) Stationary AR(1) Stationary | |– OLS Regression Estimators – Stationary caseOLS Regression Estimators – Stationary case– Mann and Wald (1940’s) : For |Mann and Wald (1940’s) : For |
21 1
2 2
1/ 2 1 21 1
2 2
22
1 22
ˆ ( )( ) / ( )
ˆ( ) ( ) / ( )
1( ) { }
1
n n
t t tt t
n n
t t tt t
pn
tt
Y Y Y Y Y Y
n n Y Y e n Y Y
Y Y Var Yn
More exciting algebra coming up ……
AR(1) Stationary AR(1) Stationary | |– OLS Regression Estimators – Stationary caseOLS Regression Estimators – Stationary case
4
1 22
4
1 22
2
1{ ( ) }
1
1( ) (0, )
1
ˆ: ( ) (0,1 )
n
t tt
n L
t tt
L
Var Y Y en
Y Y e Nn
Slutzky n N
(1)Same limit if sample mean replaced by AR(p) Multivariate Normal Limits
||
YYttYYt-1t-1eett YYt-2t-2eet-1t-1eett
eetteet-1t-1 eet-2t-2 … … k-1k-1eet-k+1t-k+1kkYYt-t-
kk
YYttconverges for converges for
Var{YVar{Ytt } }
ButBut if if , then Y, then Ytt YYt-1t-1 e ett, a , a random walkrandom walk. .
YYtt YY00 e et t e et-1 t-1 e et-2 t-2 … … e e11
VarVarYYtt YY00 t t
YYttYY00
AR(1) AR(1) ||
E{YE{Ytt} }
Var{YVar{Ytt } is constant } is constant
Forecast of YForecast of Yt+Lt+L converges to converges to (exponentially fast) (exponentially fast)
Forecast error variance is boundedForecast error variance is bounded
YYtt YYt-1t-1 e ett
YYttYY00
VarVarYYttgrows without boundgrows without bound
Forecast Forecast notnot mean reverting mean reverting
E = MC2
Nonstationary cases:
Case 1: known (=0)
Regression Estimators (Yt on Yt-1 noint )
12
21
2
ˆ( 1)
n
t tt
n
tt
Y e
Y
n
/n
/n2
12
2 21
2
/ˆ( 1) " "
/
L
n
t ttn
tt
Y e nn DF
Y n
12
2 21
2
L
n
t tt
n
tt
Y et statistic
s Y
2ˆ( ) (0,1 ), (0,1)L L
n N t N
Nonstationary
Recall stationary results:
Note: all results independent of
Where are my clothes?H0: H1:
?
DF Distribution ??
Numerator: 2 2
2 211 2
2
1 1/( ) ( 1)
2 2
n
n tnt
t tt
Y eY e n
n
e1 e2 e3 … en
e1 e12 e1e2 e1e3 … e1en
e2 e22 e2e3 … e2en
e3 e32 … e3en
: :en en
2
Y2e3Y1e2 Yn-1en…
:
Denominator
42 2 2 2
1 1 2 1 2 32
( ) ( )tt
Y e e e e e e
1 1
1 2 3 2 1 2 3 2
3 3
3 2 1 ? 0 0
2 2 1 0 ? 0
1 1 1 0 0 ?
( ~ (0,1))
e z
e e e e z z z z
e z
Z N
For n Observations:
11 2 3 ... 1 1 1 0 ... 0
2 2 3 ... 1 1 2 1 ... 0
3 3 3 ... 1 0 1 2 ... 0
: : : \ : : : : \ :
1 1 1 1 1 0 0 0 ... 2
n
n n n
n n n
A n n n
(eigenvalues are reciprocals of each other)
2
2
:
1 ( )sec
4 2 1
in
Eigenvalues
n i
n
Results:
Graph of
and limit :
eTAne = 2 2 2
1
~ (0,1)n
in i ni
Z Z N
n-2 eTAne = limn
212 2
1
2( 1)~ (0,1)
(2 1)
i
ii
Z Z Ni
Histograms for n=50:
-8.1
-1.96
Theory 1: Donsker’s Theorem (pg. 68, 137 Billingsley)
{et} an iid(0,)
sequence
Sn = e1+e2+ …+en
X(t,n) = S[nt]/(n1/2)=Sn normalized
(n=100)
Theory 1: Donsker’s Theorem (pg. 137 Billingsley)
Donsker: X(t,n) converges in law to W(z), a “Wiener Process”
plots of X(t,n) versus z= t/n for n=20, 100, 2000
20 realizations of X(t,100) vs. z=t/n
Theory 2: Continuous mapping theorem (Billingsley pg. 72)
h( ) a continuous functional => h( X(t,n) ) h(W(t)) L
For our estimators, / (1)L
nY n W
and 2 1
2
1 0
/ (1/ ) ( )n L
tt
Y n n W t dt
so……
2 2 2 2 2
12 1
2
1 0
2
12
0
1 1( / / ) ( (1) 1)2 2ˆ( 1)
( )/ (1/ )
1( (1) 1)
2
( )
n
n t Lt
n
tt
Y n e n Wn
W t dtY n n
W
W t dt
Distribution is …. ???????
Extension 1: Add a mean (intercept)Extension 1: Add a mean (intercept)
1
1 1
( )
( ) ( 1)( )
t t t
def
t t t t t
Y Y e
Y Y Y Y e
^
, New quadratic forms.New distributions
Estimator independent of Y0
0 1 2
0 1 2
1 1t t
t
t
Y Y e e e
nY Y e e e
n nY Y
Extension 2: Add linear trendExtension 2: Add linear trend
1
1
0
( ) ( ( ( 1))
( 1)( ( ( 1))
" "
t t t
t t t
t t t
Y t Y t e
Y Y t e
and under H
Y e drift e
^
,
New quadratic forms.New distributions
Regress Yt on 1, t, Yt-1 annihilates Y0 , t
1 0 1
2 1 2 0 1 2
[ ]
[ ] [ 2 ]
Y Y e
Y Y e Y e e
The 6 DistributionsThe 6 Distributions
coefficient n(j-1)
t test
f(t) = 0 mean trend
- 1.96
0
-1.95
-8.1-14.1 -21.8
-2.93 -3.50
pr< 0.01 0.025 0.05 0.10 0.50 0.90 0.95 0.975 0.99
f(t)
--- -2.62 -2.25 -1.95 -1.61 -0.49 0.91 1.31 1.66 2.08
1 -3.59 -3.32 -2.93 -2.60 -1.55 -0.41 -0.04 0.28 0.66
(1,t) -4.16 -3.80 -3.50 -3.18 -2.16 -1.19 -0.87 -0.58 -0.24
percentiles, n=50
pr< 0.01 0.025 0.05 0.10 0.50 0.90 0.95 0.975 0.99
f(t)
--- -2.58 -2.23 -1.95 -1.62 -0.51 0.89 1.28 1.62 2.01
1 -3.42 -3.12 -2.86 -2.57 -1.57 -0.44 -0.08 0.23 0.60
(1,t) -3.96 -3.67 -3.41 -3.13 -2.18 -1.25 -0.94 -0.66 -0.32
percentiles, limit
Higher Order Models
1 2
1 1
2
1.3( ) .4( )
0.1( ) .4( )
1.3 0.4 ( .5)( .8) 0
t t t t
t t t t
Y Y Y e
Y Y Y e
m m m m
“characteristic eqn.”roots 0.5, 0.8 ( < 1)
1 2
1 1 1
2
1.3( ) .3( )
0.0( ) .3( ) , .3( )
1.3 0.3 ( .3)( 1)
" !"
t t t t
t t t t t t t
Y Y Y e
Y Y Y e Y Y e
m m m m
unit root
note: (1-.5)(1-.8) = -0.1
stationary:
nonstationary
Higher Order Models- General AR(2)
1 2
1 1
( ) ( ) ( )
(1 ) ( ) ( )
(1 ) (1 )(1 )
t t t t
t t t t
Y Y Y e
Y Y Y e
roots: (m )( m ) = m2 m AR(2): ( Yt ) =( Yt-1 ) ( Yt-2 ) + et
nonstationary
1 1(1 ) ( ) ( )t t t tY Y Y e
(0 if unit root)
t test same as AR(1).Coefficient requiresmodification
t test N(0,1) !!
Tests
Regress:
tY 1 2 1, , ,t t t pY Y Y on (1, t) Yt-1
( “ADF” test )
-1 ( )
augmenting affects limit distn.
“ does not affect “ “
These coefficients normal!| |
Nonstationary Forecast
Stationary Forecast
Silver example:Silver example:
Is AR(2) sufficient ? test vs. AR(5).Is AR(2) sufficient ? test vs. AR(5).proc reg; model D = Y1 D1-D4;proc reg; model D = Y1 D1-D4; test D2=0, D3=0, D4=0;test D2=0, D3=0, D4=0;
Source df Coeff. t Pr>|t|Source df Coeff. t Pr>|t|Intercept 1 Intercept 1 121.03 3.09 0.0035121.03 3.09 0.0035
YYt-1t-1 1 1 -0.188 -3.07 0.0038-0.188 -3.07 0.0038
YYt-1t-1-Y-Yt-2t-2 1 0.639 4.59 0.0001 1 0.639 4.59 0.0001
YYt-2t-2-Y-Yt-3t-3 1 0.050 0.30 1 0.050 0.30 0.76910.7691
YYt-3t-3-Y-Yt-4t-4 1 0.000 0.00 1 0.000 0.00 0.99850.9985
YYt-4t-4-Y-Yt-5t-5 1 0.263 1.72 1 0.263 1.72 0.09240.0924
FF41413 3 = 1152 / 871 = 1.32 Pr>F = 0.2803 = 1152 / 871 = 1.32 Pr>F = 0.2803
X
Fit AR(2) and do unit root testMethod 1: OLS output and tabled critical value (-2.86)proc reg; model D = Y1 D1;
Source df Coeff. t Pr>|t|Source df Coeff. t Pr>|t|Intercept 1 Intercept 1 75.581 2.762 0.0082 X75.581 2.762 0.0082 X
YYt-1t-1 1 1 -0.117 -0.117 -2.776-2.776 0.0038 X 0.0038 X
YYt-1t-1-Y-Yt-2t-2 1 0.671 6.211 0.0001 1 0.671 6.211 0.0001
Method 2: OLS output and tabled critical valuesproc arima; identify var=silver stationarity = (dickey=(1));
Augmented Dickey-Fuller Unit Root Tests
Type Lags t Prob<t Zero Mean 1 -0.2803 0.5800 Single Mean 1 -2.7757 0.0689 Trend 1 -2.6294 0.2697
?
First part ACF IACF PACF
Full data ACF IACF PACF
Amazon.com Stock ln(Closing Price) L
evel
sD
iffe
ren
ces
Augmented Dickey-Fuller Unit Root Tests
Type Lags Tau Pr < Tau
Zero Mean 2 1.85 0.9849 Single Mean 2 -0.90 0.7882 Trend 2 -2.83 0.1866
Levels
Differences
Augmented Dickey-Fuller Unit Root Tests
Type Lags Tau Pr<Tau
Zero Mean 1 -14.90 <.0001 Single Mean 1 -15.15 <.0001 Trend 1 -15.14 <.0001
Autocorrelation Check for White Noise
To Chi- Pr > Lag Square DF ChiSq -------------Autocorrelations-------------
6 3.22 6 0.7803 0.047 0.021 0.046 -0.036 -0.004 0.014 12 6.24 12 0.9037 -0.062 -0.032 -0.024 0.006 0.004 0.019 18 9.77 18 0.9391 0.042 0.015 -0.042 0.023 0.020 0.046 24 12.28 24 0.9766 -0.010 -0.005 -0.035 -0.045 0.008 -0.035
Are differences white noise (p=q=0) ?
Amazon.com Stock Volume L
evel
sD
iffe
ren
ces
Augmented Dickey-Fuller Unit Root Tests
Type Lags Tau Pr < Tau
Zero Mean 4 0.07 0.7063 Single Mean 4 -2.05 0.2638 Trend 4 -5.76 <.0001
Maximum Likelihood Estimation
Approx Parameter Estimate t Value Pr > |t| Lag Variable MU -71.81516 -8.83 <.0001 0 volume MA1,1 0.26125 4.53 <.0001 2 volume AR1,1 0.63705 14.35 <.0001 1 volume AR1,2 0.22655 4.32 <.0001 2 volume NUM1 0.0061294 10.56 <.0001 0 date
To Chi- Pr >Lag Square DF ChiSq -------------Autocorrelations-------------
6 0.59 3 0.8978 -0.009 -0.002 -0.015 -0.023 -0.008 -0.016 12 9.41 9 0.4003 -0.042 0.002 0.068 -0.075 0.026 0.065 18 11.10 15 0.7456 -0.042 0.006 0.013 -0.014 -0.017 0.027 24 17.10 21 0.7052 0.064 -0.043 0.029 -0.045 -0.034 0.035 30 21.86 27 0.7444 0.003 0.022 -0.068 0.010 0.014 0.058 36 28.58 33 0.6869 -0.020 0.015 0.093 0.033 -0.041 -0.015 42 35.53 39 0.6291 0.070 0.038 -0.052 0.033 -0.044 0.023 48 37.13 45 0.7916 0.026 -0.021 0.018 0.002 0.004 0.037
Amazon.com Spread = ln(High/Low)L
evel
sD
iffe
ren
ces
Augmented Dickey-Fuller Unit Root Tests
Type Lags Tau Pr<Tau
Zero Mean 4 -2.37 0.0174 Single Mean 4 -6.27 <.0001 Trend 4 -6.75 <.0001
Maximum Likelihood Estimation
Approx Parm Estimate t Value Pr>|t| Lag Variable MU -0.48745 -1.57 0.1159 0 spread MA1,1 0.42869 5.57 <.0001 2 spread AR1,1 0.38296 8.85 <.0001 1 spread AR1,2 0.42306 5.97 <.0001 2 spread NUM1 0.00004021 1.82 0.0690 0 date
To Chi- Pr > Lag Square DF ChiSq -------------Autocorrelations------------- 6 2.87 3 0.4114 -0.004 0.021 0.025 -0.039 0.014 -0.053 12 3.83 9 0.9221 0.000 0.016 0.013 -0.000 0.008 0.037 18 7.62 15 0.9381 -0.038 -0.062 0.010 -0.032 -0.004 0.027 24 15.96 21 0.7721 -0.006 0.008 -0.076 -0.085 0.045 0.022 30 19.01 27 0.8695 0.008 0.043 0.013 -0.018 -0.007 0.057 36 22.38 33 0.9187 0.004 0.027 0.041 -0.030 0.014 -0.052 42 25.39 39 0.9546 0.043 0.042 0.019 0.003 0.034 -0.016 48 30.90 45 0.9459 0.015 -0.054 -0.061 -0.049 -0.004 -0.021
S.E. Said: Use AR(k) model even if MA S.E. Said: Use AR(k) model even if MA terms in true model.terms in true model.
N. Fountis: Vector Process with One Unit N. Fountis: Vector Process with One Unit Root Root
D. Lee: Double Unit Root EffectD. Lee: Double Unit Root Effect
M. Chang: Overdifference ChecksM. Chang: Overdifference Checks
G. Gonzalez-Farias: Exact MLEG. Gonzalez-Farias: Exact MLE
K. Shin: Multivariate Exact MLE K. Shin: Multivariate Exact MLE
T. Lee: Seasonal Exact MLET. Lee: Seasonal Exact MLE
Y. Akdi, B. Evans – Periodograms of Unit Y. Akdi, B. Evans – Periodograms of Unit Root ProcessesRoot Processes
H. Kim: Panel Data testsH. Kim: Panel Data tests
S. Huang: Nonlinear AR processesS. Huang: Nonlinear AR processes
S. Huh: Intervals: Order StatisticsS. Huh: Intervals: Order Statistics
S. Kim: Intervals: Level Adjustment & S. Kim: Intervals: Level Adjustment & RobustnessRobustness
J. Zhang: Long Period Seasonal. J. Zhang: Long Period Seasonal.
Q. Zhang: Comparing Seasonal Q. Zhang: Comparing Seasonal Cointegration Methods.Cointegration Methods.