Lecture 3. Stationarity Test
Lecture 3. Stationarity Test
Stationarity test
6,000
5,000
4,000
3,000
2,000
1,000
0
92 94 96 98 00 02 04 06 08 10 12 14 16 18
Data graph of the closing price series of the Shanghai
Composite Index
electric fans
Sales volume of
•The concept of stationarity
•For time series, if the mean and variance
are constant at each time point, the
covariance between two random
variables at different time points is only
related to the time interval, but not to the
time point, that is
•(1) = μ =const.,
•(2)
•Then the sequence is said to be weakly
stationary (stationary for short).
12
-4
-8
SP
-12 3,500
250 500 750 1000 1250 1500 1750 2000
DLOG(ZHZ)*100 3,000
2,500
2,000
1,500
1,000
500
09 10 11 12 13 14 15 16 17 18 19 20
•White noise sequence is a zero mean and
variance and independent identically
distributed random variables sequences.
• Nonparametric tests
𝑥𝑡 =𝑎𝑡 − 𝜃 1 𝑎 𝑡 − 1 − 𝜃 2 𝑎 𝑡 − 2 − ⋯− 𝜃 𝑞 𝑎𝑡 −𝑞
•E(xt )=E(at)‒θ1E(at-1)=0
•Var(xt )=E([xt‒E(xt)]2)=E([xt]2)
=E([at‒θ1at-1]2)=E(at2‒2θ1at at-1+θ12at-12)
=E(at2)‒2θ1E(at at-1)+θ12E(at-12)
=σa2+θ12σa2=(1+θ12)σa2
•Cov(xt, xt+l)=E([xt‒E(xt)][xt+l‒E(xt+l)])
=E(xt xt+l)= E([at‒θ1at-1][at+l‒θ1at+l-1])
=E(at at+l‒θ1at-1at+l‒θ1at at+l-1+θ12at-1at+l-1)
=E(atat+l)‒θ1E(at-1at+l)‒θ1E(atat+l-1)+θ12E(at-1at+l-1)
= ‒θ1E(at at+l-1)
=
•E(xt )=φ1E(xt-1)+E(at)=φ1E(xt-1)
•When {xt} is stationary , E(xt )=E(xt-
1)=μ ( Constant )
therefore , μ= φ1μ ,
whenφ1≠1, we have E(xt)= μ= 0
•Var(xt)=E([xt ‒E(xt)]2)=E([xt]2)
=E([φ1xt-1+at]2)=E(φ12xt-12 +2φ1xt-1at +at2)
=φ12E(xt-12) +2φ1E(xt-1at) +E(at2)
•When {xt}is stationary , E(xt-12)=Var(xt-
1)=Var(xt) ,
•E(xt-1at)=0 ( The white noise at of period t is
uncorrelated with the lagged sequence xt-j (j>0) ),
•Therefore , Var(xt)=φ12Var(xt)+σa2 ,
•When φ1≠1,we have :
Var(xt)=
•The variance Var(xt) is positive, and the
coefficient φ1 should satisfy |φ1|<1.
•Therefore, the necessary condition for the AR(1)
model to be stationary is that |φ1| < 1.
• AR(p) model :
xt =φ1xt-1+φ2 xt-2 + ∙∙∙ +φpxt-p+at
•Can be transformed into :
xtφ1xt-1φ2 xt-2∙∙∙φpxt-p=at
•The characteristic equation is :
λpφ1λp-1∙∙∙φp=0
•The characteristic roots are :
ω1, ω2 , ∙∙∙ , ωp
•The condition for the AR(p) model to be
stationary is that the modulus of each
characteristic root ωj is less than 1, that
is |ωj|<1
• DF_GLS test
• PP test
• KPSS test
• ERS test
• NP test
•ADF test:
• The first unit root test is proposed by Dickey
•Random𝑥walk
= 𝑐+with
𝑥 drift
+ term
𝑎
𝑡 𝑡− 1 𝑡
• Null hypothesis
H1 : ρ<1
•T-statistic is :
•When the T-statistic value is greater than
the three critical values at the given
significance level, the null hypothesis
that "the series has a unit root" is
accepted, which means the series is non-
stationary. Otherwise, at the
corresponding significance level, we
reject the null hypothesis that "the series
has a unit root", which means that the
series is stationary.
+
+
+
• Note:
• ADF test is the most commonly used methods
• Output window
• Case 1: ADF unit root test for the closing
price and return series of the SSE Index
• Open data sh,
• Click View\Unit root test...
• Output window
• Output window
• Output window
• Output window
A None
B Intercept
D casually
Submit
•Note:
A None
B Intercept
D casually
Submit
• Case 2: PP unit root test of closing price
and return of SSE Index
• Open the closing price data sh and click View\
Unit root test... Output window
Variab
les of
interes 1% critical 5% critical 10% critical
t value value value T-statistic
sh 3.4310 2.8617 2.5669 2.1521
rsh - 2. 5652 1.9408 1.6167 87.0205
Seen from table 5, under the three models, ADF test and
PP test for the sh variables t - statistic associated probability
is greater than 0.1, shows that under the 10% significant level
three models of the two methods of inspection are obliged
not to reject "sequence has a unit root" null hypothesis, So
the Shanghai composite index closing sequence sh is a
stationary series. For under the three models, ADF test and
PP test for the RSH variables t - statistic associated
probability is less than 0.01, shows that the three model test
of two methods under the 1% significant level consistent
refused to "sequence has a unit root" null hypothesis, so the
Shanghai index yield sequence RSH is stationary series.
• Tabular form with "*" :
Without intercept
and trend With intercept Intercept and trend
variab
le
T- probabi T- probabil T- probabil
statistic lity statistic ity statistic ity
sh 0.269 0.589 2.152 0.224 3.287 0.068
rsh 87.02 0.000 87.05 0.000 87.08 0.000
T - statistic
variab
le Without intercept
and trend With intercept Intercept and trend
sh 0.269 2.152 3.287
rsh 87.02 * * * 87.05 * * * -87.08 ***
• Form marked "*" :
• Note: The ADF test should choose the
appropriate model, improper model selection
may lead to wrong results!
3,000
2,500
2,000
1,500
1,000
500
09 10 11 12 13 14 15 16 17 18 19 20