Review of Unit Root Testing

Download Report

Transcript Review of Unit Root Testing

Understanding
Nonstationarity and
Recognizing it
When You See it
D. A. Dickey
North Carolina State University
Copyright © 2008, SAS Institute Inc. All rights reserved.
Nonstationary Forecast
Stationary Forecast
Copyright © 2008, SAS Institute Inc. All rights reserved.
”Trend Stationary” Forecast
Nonstationary Forecast
Copyright © 2008, SAS Institute Inc. All rights reserved.
 Autoregressive Model
 AR(1)
Yt - m = r (Yt-1-m) + et
Yt = m (1- r) + rYt-1 + et
DYt = m (1- r) + (r-1)Yt-1 + et
DYt = (r-1)(Yt-1 - m) + et
where DYt is Yt -Yt-1
• AR(p)
• Yt - m = a1(Yt-1-m) + a2(Yt-2-m) + ...+ ap(Yt-1-m) + et
Copyright © 2008, SAS Institute Inc. All rights reserved.
 AR(1) Stationary  |r| < 1
• OLS Regression Estimators – Stationary case
• Mann and Wald (1940’s) : For |r| < 1
n
n
t =2
t =2
rˆ m =  (Yt - Y )(Yt -1 - Y ) /  (Yt -1 - Y )
n ( rˆ m - r ) = n
-1/ 2
n
-1
1

2
 (Yt -1 - Y ) 
= Var{Y }
2
n t =2
1- r
2
More exciting algebra coming up ……
Copyright © 2008, SAS Institute Inc. All rights reserved.
n
 (Yt -1 - Y )et / n  (Yt -1 - Y )
t =2
p
n
2
t =2
2
 AR(1) Stationary  |r| < 1
• OLS Regression Estimators – Stationary case
1 n
4
Var{
 (Yt -1 - Y )et } 
2
t
=
2
1
r
n
L
1 n
4
 (Yt -1 - Y )et  N (0,
)
2
1- r
n t =2
L
Slutzky :
n ( rˆ m - r )  N (0,1 - r 2 )
(1)Same limit if sample mean replaced by m
(2) AR(p)  Multivariate Normal Limits 
Copyright © 2008, SAS Institute Inc. All rights reserved.
|r| < 1
•Yt-m = r(Yt-1-m) + et = r(r(Yt-2-m) + et-1) + et =
... = et + ret-1 +r2et-2 + … +rk-1 et-k+1+ rk (Yt-k-m)
• Yt=m +

j
r
 et - j
i =1
(converges for |r| < 1)
Var{Yt } = 2/(1-r2)
r=1
• But if r=1, then Yt = Yt-1 + et, a random walk.
• Yt = Y0 + et + et-1 + et-2 + … + e1
• Var{Yt - Y0} = t2
• E{Yt} = E{Y0}
Copyright © 2008, SAS Institute Inc. All rights reserved.
|r| < 1
• AR(1)
•
E{Yt} = m
•
Var{Yt } is constant
• Forecast of Yt+L converges to m
(exponentially fast)
• Forecast error variance is bounded
•AR(1)
r=1
•Yt = Yt-1 + et
•E{Yt} = E{Y0}
•Var{Yt} grows without bound
•Forecast not mean reverting
Copyright © 2008, SAS Institute Inc. All rights reserved.
E = MC2
r=?
Copyright © 2008, SAS Institute Inc. All rights reserved.
Nonstationary (r=1) cases:
Case 1: m known (=0)
Regression Estimators (Yt on Yt-1 noint )
n
n
( rˆ - 1) =
Y
t -1 t
e
/n
2
Y
 t -1
/n2
t =2
n
t =2
Copyright © 2008, SAS Institute Inc. All rights reserved.
r=1  Nonstationary
n
n( rˆ - 1) =
Y
t =2
n
e /n
t -1 t
L
 " DF "
2
2
Y
/
n
 t -1
t =2
n
t statistic =
Y
t =2
e
t -1 t
n
s
2
L

2
Y
 t -1
t =2
Recall stationary results:
L
n ( rˆ - r )  N (0,1 - r ),
2
L
t  N (0,1)
Note: all results independent of  2
Copyright © 2008, SAS Institute Inc. All rights reserved.
Where
H0:r=1are
?
my
clothes?
H1:|r|<1
Copyright © 2008, SAS Institute Inc. All rights reserved.
DF Distribution ??
Numerator:
e1
e2
e3
:
en
Copyright © 2008, SAS Institute Inc. All rights reserved.
 2 n 2
Yn -  et 

n
1
1 2
2
t =1


Y
e
/(
n

)
=

(  - 1)

t -1 t
2
2  n
 2
t =2




en
e2
e12
e1e2
e22
e1e3 … e1en
e2e3 … e2en
e32 … e3en
:
en2
Y1e2
Y2e3
:
e3
…
e1
… Yn-1en
Denominator
4
2
2
2
2
Y
=
e
+
(
e
+
e
)
+
(
e
+
e
+
e
)
t 1 1 2
1
2
3
t =2
= ( e1 e2
 3 2 1 e1 

 
e3 )  2 2 1 e2  = ( z1
 1 1 1 e 

 3 
For n
Observations:
 n - 1 n - 2 n - 3 ...

 n - 2 n - 2 n - 3 ...
An =  n - 3 n - 3 n - 3 ...

:
:
\
 :
 1
1
1
1

1  1 -1 0
 
1  -1 2 -1
1 =  0 -1 2
 
:  :
:
:
1  0 0 0
 ? 0 0  z1 

 
z2 z3 )  0 ? 0  z2 
 0 0 ?  z 

 3 
( Z ~ N (0,1))
... 0 

... 0 
... 0 

\ :
... 2 
-1
(eigenvalues are reciprocals of each other)
Copyright © 2008, SAS Institute Inc. All rights reserved.
Eigenvalues :
 in2 =
1 2  (n - i ) 
sec 

4
 2n - 1 
Results: eTAne =
lim
n-2
n
n
2
2
2

Z

 in in
i =1
eTAne
Graph of
i,502 and limit :
Copyright © 2008, SAS Institute Inc. All rights reserved.
Z ~ N (0,1)
2
 2(-1)  2 2
=
 Zi 
i =1  (2i - 1) 

i +1
Z ~ N (0,1)
Histograms for n=50:
-1.96
-8.1
Copyright © 2008, SAS Institute Inc. All rights reserved.
Theory 1: Donsker’s Theorem (pg. 68, 137 Billingsley)
{et} an iid(0,2)
sequence 
(n=100)
Sn =
e1+e2+ …+en
X(t,n) = S[nt]/(n1/2)=Sn normalized
Copyright © 2008, SAS Institute Inc. All rights reserved.
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
Copyright © 2008, SAS Institute Inc. All rights reserved.
Theory 2: Continuous mapping theorem
(Billingsley pg. 72)
L
h( ) a continuous functional => h( X(t,n) )
 h(W(t))
L
For our estimators, Yn / n   W (1)
 (Y /
n
and
t -1
t
)
2
L
1
n (1/ n)   W 2 (t )dt
0
n
n( rˆ - 1) =
1 2
(Yn / n 2 -  et2 / n 2 )
2
t =1
 (Y /
n
t -1
1 2
(W (1) - 1)
  2
1
W
0
Copyright © 2008, SAS Institute Inc. All rights reserved.
2
so……
(t )dt
t
)
2
n (1/ n)
1 2
(W (1) - 1)
L
 21
2
W
 (t )dt
0
Distribution is …. ???????
Nice proof Grandpa!
As you see, I’m very excited.
Copyright © 2008, SAS Institute Inc. All rights reserved.
Extension 1: Add a mean (intercept)
Yt - m = r (Yt -1 - m ) + et
def
Yt - m - (Yt -1 - m ) = Yt = ( r - 1)(Yt -1 - m ) + et
Yt = Y0 + e1 + e2 +
+ et
n -1
Y = Y0 + e1 +
e2 +
n
Yt - Y
^
rm , m
1
+ et
n
New quadratic forms.
New distributions
Estimator independent of Y0
Copyright © 2008, SAS Institute Inc. All rights reserved.
Extension 2: Add linear trend
Yt - (a +  t ) = r (Yt -1 - (a +  (t - 1)) + et
Yt =  + ( r - 1)(Yt -1 - (a +  (t - 1)) + et
and under H 0
Yt =  + et = " drift " + et
Y1 = [Y0 +  ] + e1
Y2 = [Y1 +  ] + e2 = [Y0 + 2 ] + e1 + e2
Regress  Yt
^
on 1, t, Yt-1 annihilates Y0 , t
r , 
Copyright © 2008, SAS Institute Inc. All rights reserved.
New quadratic forms.
New distributions
The 6 Distributions
-8.1
coefficient
n(rj-1)
-14.1
-21.8
0
t test

f(t) =
Copyright © 2008, SAS Institute Inc. All rights reserved.
--1.95
1.96
-2.93
0
mean
-3.50
trend
 percentiles, n=50
pr<
0.01
0.025 0.05
0.10
0.50
0.90
0.95
0.975 0.99
---
-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
f(t)
(1,t)
-4.16 -3.80 -3.50 -3.18 -2.16 -1.19 -0.87 -0.58 -0.24
 percentiles, limit
pr<
0.01
0.025 0.05
0.10
0.50
0.90
0.95
0.975 0.99
---
-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
f(t)
(1,t)
-3.96 -3.67 -3.41 -3.13 -2.18 -1.25 -0.94 -0.66 -0.32
Copyright © 2008, SAS Institute Inc. All rights reserved.
Higher Order Models
stationary:
Yt - m = 1.3(Yt -1 - m ) - .4 (Yt - 2 - m ) + et
Yt = - 0.1(Yt -1 - m ) + .4 ( Yt -1 ) + et
m 2 -1.3m + 0.4 = (m - .5)(m - .8) = 0
“characteristic eqn.”
roots 0.5, 0.8 ( < 1)
note: (1-.5)(1-.8) = -0.1
nonstationary
Yt - m = 1.3(Yt -1 - m ) - .3(Yt - 2 - m ) + et
Yt = - 0.0 (Yt -1 - m ) + .3( Yt -1 ) + et ,
m2 -1.3m + 0.3 = (m - .3)(m - 1)
" unit root !"
Copyright © 2008, SAS Institute Inc. All rights reserved.
Yt = .3( Yt -1 ) + et
Higher Order Models- General AR(2)
roots: (m - a )( m -  ) = m2 - ( a +  )m + a
AR(2): ( Yt - m ) = ( a +  ) ( Yt-1 - m ) - a ( Yt-2 - m ) + et
Yt - m = (a +  ) (Yt -1 - m ) - a (Yt - 2 - m ) + et
Yt = - (1 - a -  + a ) (Yt -1 - m ) + a ( Yt -1 ) + et
(1 - a -  + a ) = (1 - a )(1 -  )
nonstationary
(0 if unit root)
Yt = - (1 - a -  + a ) (Yt -1 - m ) + a ( Yt -1 ) + et
t test same as AR(1).
Coefficient requires
modification
Copyright © 2008, SAS Institute Inc. All rights reserved.
t test  N(0,1) !!
Tests
These coefficients  normal!
|
|
Regress:
Yt
on (1, t)
Yt-1 Yt -1 , Yt - 2 ,
, Yt - p +1
( “ADF” test )
r-1
augmenting affects limit distn.
()  “
Copyright © 2008, SAS Institute Inc. All rights reserved.
does not affect “
“
Silver example:
Nonstationary Forecast
Stationary Forecast
Copyright © 2008, SAS Institute Inc. All rights reserved.
 Is AR(2) sufficient ? test vs. AR(5).
 proc reg; model D = Y1 D1-D4; test D2=0, D3=0, D4=0;

Source df Coeff.
t
Intercept 1 121.03 3.09
Yt-1
1 -0.188 -3.07
Yt-1-Yt-2 1 0.639 4.59
Yt-2-Yt-3 1 0.050 0.30
Yt-3-Yt-4 1 0.000 0.00
Yt-4-Yt-5 1 0.263 1.72
F413 = 1152 / 871 = 1.32
Copyright © 2008, SAS Institute Inc. All rights reserved.
Pr>|t|
0.0035
0.0038
0.0001
0.7691
0.9985
0.0924
X
Pr>F = 0.2803
Fit AR(2) and do unit root test
Method 1: OLS output and tabled critical value (-2.86)
proc reg; model D = Y1 D1;
Source df Coeff. t
Intercept 1 75.581 2.762
Yt-1
1 -0.117 -2.776
Yt-1-Yt-2 1 0.671 6.211
Pr>|t|
0.0082
0.0038
0.0001
X
X

Method 2: OLS output and tabled critical values
proc arima; identify var=silver stationarity = (dickey=(1));
Augmented Dickey-Fuller Unit Root Tests
Type
Zero Mean
Single Mean
Trend
Copyright © 2008, SAS Institute Inc. All rights reserved.
Lags
1
1
1
t
-0.2803
-2.7757
-2.6294
Prob<t
0.5800
0.0689 
0.2697
?
First part ACF
Copyright © 2008, SAS Institute Inc. All rights reserved.
IACF
PACF
Full data ACF
Copyright © 2008, SAS Institute Inc. All rights reserved.
IACF
PACF
Differences
Levels
Amazon.com Stock ln(Closing Price)
Copyright © 2008, SAS Institute Inc. All rights reserved.
Levels
Augmented Dickey-Fuller Unit Root Tests
Type
Zero Mean
Single Mean
Trend
Lags
2
2
2
Tau
1.85
-0.90
-2.83
Pr < Tau
0.9849
0.7882
0.1866
Differences
Augmented Dickey-Fuller Unit Root Tests
Type
Zero Mean
Single Mean
Trend
Copyright © 2008, SAS Institute Inc. All rights reserved.
Lags
Tau
Pr<Tau
1
1
1
-14.90
-15.15
-15.14
<.0001
<.0001
<.0001
Are differences white noise (p=q=0) ?
Autocorrelation Check for White Noise
To
Lag
ChiSquare
DF
Pr >
ChiSq
6
12
18
24
3.22
6.24
9.77
12.28
6
12
18
24
0.7803
0.9037
0.9391
0.9766

Copyright © 2008, SAS Institute Inc. All rights reserved.
-------------Autocorrelations------------0.047 0.021 0.046 -0.036 -0.004 0.014
-0.062 -0.032 -0.024 0.006 0.004 0.019
0.042 0.015 -0.042 0.023 0.020 0.046
-0.010 -0.005 -0.035 -0.045 0.008 -0.035
Differences
Levels
Amazon.com Stock Volume
Copyright © 2008, SAS Institute Inc. All rights reserved.
Augmented Dickey-Fuller Unit Root Tests
Type
Lags
Zero Mean
Single Mean
Trend
4
4
4
Tau
Pr < Tau
0.07
-2.05
-5.76
0.7063
0.2638
<.0001
Maximum Likelihood Estimation
Parameter Estimate
MU
-71.81516
MA1,1
0.26125
AR1,1
0.63705
AR1,2
0.22655
NUM1
0.0061294
To
Lag
ChiSquare
DF
Pr >
ChiSq
6
12
18
24
30
36
42
48
0.59
9.41
11.10
17.10
21.86
28.58
35.53
37.13
3
9
15
21
27
33
39
45
0.8978
0.4003
0.7456
0.7052
0.7444
0.6869
0.6291
0.7916
Copyright © 2008, SAS Institute Inc. All rights reserved.
t Value
-8.83
4.53
14.35
4.32
10.56
Approx
Pr > |t|
<.0001
<.0001
<.0001
<.0001
<.0001
Lag
0
2
1
2
0
Variable
volume
volume
volume
volume
date
-------------Autocorrelations-------------

-0.009 -0.002 -0.015
-0.042 0.002 0.068
-0.042 0.006 0.013
0.064 -0.043 0.029
0.003 0.022 -0.068
-0.020 0.015 0.093
0.070 0.038 -0.052
0.026 -0.021 0.018
-0.023
-0.075
-0.014
-0.045
0.010
0.033
0.033
0.002
-0.008 -0.016
0.026 0.065
-0.017 0.027
-0.034 0.035
0.014 0.058
-0.041 -0.015
-0.044 0.023
0.004 0.037
Differences
Levels
Amazon.com Spread = ln(High/Low)
Copyright © 2008, SAS Institute Inc. All rights reserved.
Augmented Dickey-Fuller Unit Root Tests
Type
Lags
Zero Mean
Single Mean
Trend
4
4
4
Tau
Pr<Tau
-2.37
-6.27
-6.75
0.0174
<.0001
<.0001
Maximum Likelihood Estimation
Parm
Estimate
MU
-0.48745
MA1,1
0.42869
AR1,1
0.38296
AR1,2
0.42306
NUM1 0.00004021
To
Lag
6
12
18
24
30
36
42
48
ChiSquare
2.87
3.83
7.62
15.96
19.01
22.38
25.39
30.90
Copyright © 2008, SAS Institute Inc. All rights reserved.
DF
3
9
15
21
27
33
39
45
Pr >
ChiSq
0.4114
0.9221
0.9381
0.7721
0.8695
0.9187
0.9546
0.9459
t Value
-1.57
5.57
8.85
5.97
1.82

Approx
Pr>|t|
0.1159
<.0001
<.0001
<.0001
0.0690
Lag
0
2
1
2
0
Variable
spread
spread
spread
spread
date
-------------Autocorrelations-------------0.004 0.021 0.025 -0.039 0.014 -0.053
0.000 0.016 0.013 -0.000 0.008 0.037
-0.038 -0.062 0.010 -0.032 -0.004 0.027
-0.006 0.008 -0.076 -0.085 0.045 0.022
0.008 0.043 0.013 -0.018 -0.007 0.057
0.004 0.027 0.041 -0.030 0.014 -0.052
0.043 0.042 0.019 0.003 0.034 -0.016
0.015 -0.054 -0.061 -0.049 -0.004 -0.021
 S.E. Said: Use AR(k) model even if MA terms in true
model.
 N. Fountis: Vector Process with One Unit Root
 D. Lee: Double Unit Root Effect
 M. Chang: Overdifference Checks
 G. Gonzalez-Farias: Exact MLE
 K. Shin: Multivariate Exact MLE
 T. Lee: Seasonal Exact MLE
 Y. Akdi, B. Evans – Periodograms of Unit Root
Processes
Copyright © 2008, SAS Institute Inc. All rights reserved.
 H. Kim: Panel Data tests
 S. Huang: Nonlinear AR processes
 S. Huh: Intervals: Order Statistics
 S. Kim: Intervals: Level Adjustment & Robustness
 J. Zhang: Long Period Seasonal.
 Q. Zhang: Comparing Seasonal Cointegration Methods.
Copyright © 2008, SAS Institute Inc. All rights reserved.
Copyright © 2008, SAS Institute Inc. All rights reserved.