0% found this document useful (0 votes)
22 views54 pages

Lecture 3. Stationarity Test

Lecture 3 focuses on the stationarity test in financial data analysis, emphasizing the importance of stationarity for modeling and analysis methods like OLS, ARMA, and VAR. It covers concepts such as unit roots, time series characteristics, and various testing methods including the ADF test. The lecture also includes practical Eviews operations for conducting unit root tests on financial time series data.

Uploaded by

1910322305
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views54 pages

Lecture 3. Stationarity Test

Lecture 3 focuses on the stationarity test in financial data analysis, emphasizing the importance of stationarity for modeling and analysis methods like OLS, ARMA, and VAR. It covers concepts such as unit roots, time series characteristics, and various testing methods including the ADF test. The lecture also includes practical Eviews operations for conducting unit root tests on financial time series data.

Uploaded by

1910322305
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 54

Lecture 3.

Stationarity test

•The basic structure of financial experiment


reports
•Selection of indicators and description of data
•Descriptive statistical test of the data
•Stationarity test of the data
•Introduction to the research methods
•Empirical results and economic interpretation
•Concluding remarks
Lecture 3. Stationarity test

•The basic structure of financial experiment


reports
•Selection of indicators and description of data
•Descriptive statistical test of the data
•Stationarity test of the data
•Introduction to the research methods
•Empirical results and economic interpretation
•Concluding remarks
•The stationarity test of data is the
premise of data modeling and analysis.
•Only for stationary data, the ordinary
least square regression analysis, ARMA
model and VAR model can be carried
out.

•Through this experiment, you can learn:


•The concept of stationarity of data
•Stationarity and unit root of ARMA
model
•Unit root test for stationarity and Eviews
operation
•Presentation and interpretation of unit
root test results
•The concept of stationarity
•Stationarity and unit root of ARMA model
•Unit root test for stationarity and Eviews
operation
•Presentation and interpretation of unit root
test results
•Recognize the stationarity of the data
•Time series: In short, a sequence of random
variables arranged in a certain time order is
called a time series.

•Characteristics of time series:


•The items in a sequence depend on a certain time
order;
•The value of each item in the sequence has
certain randomness.
•There is a certain correlation between different
items in the sequence
•The dynamic change law of system.

•What is commonly referred to as "data" is


actually a sample of time series.
SH
7,000

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

•Graph of stationary time series


8

-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.

•White noise series are the cornerstone of


discrete time series models.

•Properties of white noise series {a t} :


(1) ;
(2) .
(3) ;

(4) White noise sequence is stationary


sequence.
• Stationarity test method
• Qualitative method testing

• Data graph test method

• Correlation function test

• Parametric test method

• Nonparametric tests

• Unit root test

•To introduce the concept of "unit root", we must start


from the ARMA model of time series and its basic
properties.
•The concept of stationarity of data
•Stationarity and Unit Roots of ARMA
Models
•Stability of unit root test and Eviews
operation
•Presentation and interpretation of unit
root test results
•Single variable time series model has
the following three categories:
•Moving average (MA) model
•Autoregressive (AR) model
•Autoregressive moving average
(ARMA) model
•MA(q) model and its stationarity
•MA (q) model: assume is zero mean and
variance is a white noise sequence,

𝑥𝑡 =𝑎𝑡 − 𝜃 1 𝑎 𝑡 − 1 − 𝜃 2 𝑎 𝑡 − 2 − ⋯− 𝜃 𝑞 𝑎𝑡 −𝑞

The above equation is a q order moving


average model, shorthand for MA (q)
model.
•"Moving average" means through the
"average" to eliminate the individual data
from the group of samples, makes the
model becomes smooth.

•MA (q) can be seen as white noise


sequence.
•Stationarity of the MA(q) model
•The MA(q) model has many interesting
properties, including simple mean, simple
variance and covariance, etc.

•MA(1) model : xt =at‒θ1at-1

•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)
=

•Therefore, the MA(1) model is stationary.


•Generally, the MA(q) model is always
stationary.
•AR (p) model and its stability
•AR (p) model: Suppose that is a white noise
sequence with mean value of zero and
variance of

is a p order autoregressive model, abbreviated


as AR(p) model.

•Stationarity of AR (p) model is far from


simple like MA model.
•Stationarity of the AR(p) model
• AR(1) model : xt =φ1xt-1+at

•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.

•The condition for the AR(1) model to be


stationary is : |φ |<1 。
•A non stationary AR (1) model
•Random walk: Supposeis a white noise
sequence with mean value of zero and
variance of , then
𝑥𝑡 = 𝑥 𝑡 − 1 + 𝑎 𝑡
follows a random walk.

•Since the coefficient of this model is , the


random walk is non-stationary.

•Under the efficient market hypothesis,


stock price is a random walk sequence.
•Stationarity of the AR(p) model
• AR(2) model : xt = φ1xt-1+φ2 xt-2+at

•When {xt} is stationary and φ1+φ2≠1,


•Taking the expectation value on both sides of the
model, we can obtain : E(xt)=0 ,

•It can be obtained through calculation that,


Var(xt)=+Cov(xt-1, xt-2)

•If we denote the two roots of the characteristic


equation of the AR(2) model
λ2 φ1λ φ2=0
as ω1 and ω2,

Then the condition for the AR(2) model to be


stationary is that the magnitudes of these two
characteristic roots are all less than 1, that is,
|ω1|<1 , |ω2|<1
•Stationarity of the AR(p) model

• 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

•In other words , The condition for the


AR(p) model to be non-stationary is that
at least one of the characteristic roots has
a modulus equal to 1, which means there
exists a unit root.
•ARMA (p, q) model: Supposeis a white
noise sequence with mean value of zero
and variance of , then

is a (p, q) order autoregressive moving


average model and shorthand for ARMA
(p, q) model.

• The MA and AR models are respectively


the special cases of the ARMA model
when p = 0 and q = 0. The ARMA model
is a simple superposition of the MA and
AR models..

•Since the MA model is always stationary,


the stationarity of the ARMA model is
determined by the stationarity of the AR
model in its autoregressive part.
•The concept of stationarity of data
•ARMA model and unit root
•Stability of unit root test and Eviews
operation
•Presentation and interpretation of unit
root test results
•Unit root test
• With the development of econometrics,

the unit root test theory has been


continuously improved and expanded.
Over the past 40 years, various methods
for testing unit roots have emerged.

• Eviews provides 6 types of test methods.


• ADF test

• DF_GLS test

• PP test

• KPSS test

• ERS test

• NP test
•ADF test:
• The first unit root test is proposed by Dickey

and Fuller (1976) so it is called "DF test".

•Three forms of Random walk:


•A simple
𝑥 random
= 𝑥 walk:
+𝑎
𝑡 𝑡− 1 𝑡

•Random𝑥walk
= 𝑐+with
𝑥 drift
+ term
𝑎
𝑡 𝑡− 1 𝑡

•Random𝑥walk with drift and deterministic trend


𝑡 = 𝑐+ 𝑏𝑡 + 𝑥 𝑡 − 1+ 𝑎𝑡

• Assuming that the generation process of the data


𝑥𝑡by
is governed =𝜌 𝑥 𝑡of
one + 𝑎following
− 1the 𝑡 models :
𝑥𝑡 = 𝜌 𝑥 𝑡 − 1+ 𝑐+ 𝑎𝑡
𝑥𝑡 = 𝜌 𝑥 𝑡 − 1+ 𝑐+𝑏𝑡 + 𝑎𝑡

• To test whether the data set has a unit root, it is


equivalent to testing whether the autoregressive
coefficient ρ of the corresponding model is
equal to 1.
•ADF test :
• The null hypothesis of the DF test

• Null hypothesis

H0 : ρ=1 , The sequence has a unit root.


• Alternative 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.

•In the DF test, it is assumed that the data


generation follows a special first-order
autoregressive model. The application scope of
this method is thus restricted. Dickey and Fuller
extended the DF test method and proposed the
"ADF test".
•ADF test:
•Consider that the data is generated by one of
the following three forms of p-th order
autoregressive models::

+
+
+

•The null hypothesis of the ADF test is


H0: ρ =1, that is, the series has a unit root.

•Under this hypothesis, the corresponding T-


statistic is constructed, and the hypothesis is
tested.

• Note:
• ADF test is the most commonly used methods

of unit root test.


• Eviews operation of unit root test:
• Open the data in Eviews

• Click on the View, the Unit root test... ,

• In the dialog box select testing method,

selecting the appropriate model


• Click OK to output the test results
• Case 1: ADF unit root test for the closing
price series of SSE Index
• Open data sh
• Case 1: the Shanghai composite index
closing sequence of ADF unit root test
• Open data sh,
• Click View\Unit root test...
• 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
• 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

• Default ADF test, select "Intercept" button,

default AIC criterion and fill in 5 in "Maximun


lags"
• 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

• The default ADF test, select the "Intercept"

button, the default AIC criterion and the


Maximun lags "fill in the 5, click OK, the output
• Click OK to output the result
• Case 1: ADF unit root test for the closing
price and return series of the SSE Index
• Open data sh,
• Click on the View, the Unit root test...

• Output window

• Select "None" button, other Settings unchanged,

click OK, output results


• Case 1: the Shanghai composite index
closing price and yield sequence of ADF
unit root test
• Open data sh,
• Click View\Unit root test...

• Output window

• Select "Trend and Intercept" button, keep other


settings unchanged, click OK, and the output
result will be obtained.
•Open data RSH, click “View \ Unit root test...” ,
the ADF test is conducted in the output window.
Enter 5 in "Maximun lags", and click the buttons
"None", "Intercept" and "Trend and Intercept"
respectively. Then click "OK" to output the
results one by one.
单选题 1分

For the ADF unit root test of the


closing price series of the SSE
Index, the type of equation should
be selected as ( )

A None

B Intercept

C Trend and Intercept

D casually

Submit
•Note:

•When conducting the ADF unit root test,


the lag length (Lag length) therein is
automatically determined by the EViews
software based on the pre-selected
information criterion and the set
maximum lags. However, the setting of
the maximum lags is somewhat
subjective. If the maximum lags are set
too small, it will cause the residual
sequence of the autoregressive model to
be correlated, resulting in a decrease in
the test power and significance level. 张成
思 [5] suggested setting the maximum
lags for monthly data at 12. We can use
the following "stepwise enlargement"
method to determine the maximum lag
number.
•Sairl and Dickey (1984) pointed out that
the "largest lag" lower bounds for Max l =
log (N) + 1, where N is the sample size.
•Therefore, the maximum Lag period is
first selected as l max. If the ADF unit root
test results show that the automatically
selected lag length (Lag length) is less
than l max, the maximum lag period can
be set as l max.
•Otherwise, the setting of the maximum lag
length should be enlarged, that is, the
maximum lag length should be selected as
l max +1. If the ADF unit root test results
show that the automatically selected Lag
length is less than l max + 1, then the
maximum lag period can be set as l max +
1.
•Otherwise, continue to enlarge the
maximum lag length setting, and so on.

• (Said, S.E., and D.A., Dickey 1984, Testing for


Unit Roots in Autoregressive - Moving Average
Models of Unk nown Order, Biometrika, 71,
599-607.)
• For example, the ADF unit root test for sh, the
SSE index

• Since the sample size is T =8311, l max


=[log(8311)]+1 =5. The ADF unit root test
results for the model with trend and intercept and
maximum lag period 4 are selected as follows

• Results show that the Lag length (Lag length)


5= maxlag,
单选题 1分

The type of equation in ADF unit


root test for the return series of SSE
index should be selected as (. )

A None

B Intercept

C Trend and 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

• Click the "Test type" drop-down button


• Case 2: PP unit root test of closing price
and return of SSE Index
• Click "Phlips-Peron" to output the window
• Case 2: PP unit root test of closing price
and return of SSE Index
• Respectively, click on "None, Intercept, Trend
and Intercept" button \ OK, output
• Case 2: PP unit root test of closing price
and return of SSE Index
• Open the rate of return data rsh and repeat the
above process to obtain the test results:
•The concept of stationarity of data
•ARMA model stationarity and unit root
•Unit root test for stationarity and
Eviews operation
•Presentation and interpretation of unit
root test results
• Case: Expression and interpretation of
ADF unit root test results for closing
price and return series of SSE Index
• Form with critical value:

Table 1 ADF unit root test of Shanghai Composite Index

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

It can be seen from Table 1 that the t-statistic of the ADF


test of sh is -2.1521, which is greater than the critical value of
10% -2.5669, indicating that the null hypothesis that the series
has unit root cannot be rejected at the significance level of 10%,
so the sh closing price series of Shanghai Composite Index is
non-stationary. The t-statistic -87.0205 of the ADF test for the
variable rsh is less than the 1% critical value -2.5652, which
indicates that the null hypothesis that the series has unit root is
rejected at the 1% significance level. Therefore, the return
series rsh of Shanghai Composite index is stationary.
• With accompanying probability form:

Table 2. ADF unit root test of Shanghai


Composite Index
variable T-statistic Probability
sh 2.1021 0.2244
rsh 80.5125 0.0001

It can be seen from Table 2 that the t-statistic of


the ADF test for the variable sh is 0.2244, indicating
that the null hypothesis that the series has unit root
cannot be rejected at the significance level of 10%, so
the sh closing price series of Shanghai Composite
Index is non-stationary. ADF test for the RSH
variables of the associated probability of t - statistic is
0.0001, shows that under the 1% significant level
declined to "sequence has a unit root" null hypothesis,
as a result, the Shanghai index yield sequence RSH is
stationary series.
• In the form of a model test:

Table 3. ADF unit root test of Shanghai Composite Index


None 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

It can be seen from Table 3 that the t-statistics of the


ADF test for the variable sh under the three models are all
greater than 0.1, indicating that the null hypothesis that the
series has unit root cannot be rejected at the significance
level of 10%, so the sh closing price series of Shanghai
Composite Index is non-stationary. For RSH variables
under the three models of ADF test t - statistic associated
probability is less than 0.01, shows that the three models
under the ADF test 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.
• Forms of various inspection methods:

Table 4. The Shanghai index of unit root test


Variables ADF test PP inspection
Probabil Probabili
T-statistic ity T-statistic ty
sh 0.269 0.589 0.1213 0.6420
rsh 87.02 0.000 87.6201 0.0001

It can be seen from Table 4 that the ADF test and PP


test t-statistics of sh are more than 0.1, which indicates
that the null hypothesis that "the series has unit root"
cannot be rejected at the significance level of 10%, so sh
is a non-stationary series. ADF test and PP test of
variable r sh t - statistic associated probability is less than
0.01, shows that two methods under the 1% significant
level consistent refused to "sequence has a unit root" null
hypothesis, so the Shanghai index yield sequence r sh is
stationary series.
• Forms of various inspection methods:
Table 5. The Shanghai composite index closing price
and the yield of ADF and PP unit root test

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!

• For example, the closing price series of the S&P


500 index has a clear trend SP
3,500

3,000

2,500

2,000

1,500

1,000

500
09 10 11 12 13 14 15 16 17 18 19 20

• The ADF test results of "Trend and Intercept" are


selected as stationary series

• However, selecting "None" or "Intercept" yields


the opposite result
•Model selection can be carried out as
follows:
(1) if the data graph in the position of a
deviation from 0 random change, means
that the average nonzero test sequence,
Intercept item shall be added, click on the
"Intercept" button;
(2) If the fluctuation Trend of the data
graph changes with time, it means that the
tested sequence has a time trend, and the
time trend item should be added, that is,
click "Trend and Intercept".

You might also like