Documente Academic
Documente Profesional
Documente Cultură
IMFx
This training material is the property of the International Monetary Fund (IMF) and is intended for use in IMF
I i
Institute ffor C
Capacity
i D Development
l (ICD) courses. A
Any reuse requires
i the
h permission
i i off the
h ICD
ICD.
EViews is a trademark of IHS Global Inc.
Properties of Time Series
L-1: Introduction
Introduction
General comments
Univariate analysis
y
Two general classes
classes of processes
Both
h science andd art ((judgement):
d )
Understandingg behavior and forecastingg
Assessing/testing
Introduction
Univariate analysis
Stochastic process vs time series
C
Covariance
i d
depends
d on time
i j that
h h has elapsed
l db between
observations not on reference period:
observations,
Cov(Yt ,Yt j ) Cov(Ys ,Ys j ) j
Introduction
Stationary?
y
X X
Introduction
Understanding behavior and forecasting
Find the
Yes best ARMA Forecast
model
Is Y
stationary?
y
Transform
No (difference or
other)
Introduction
Assessing and Testing M4
Find the
Yes best ARMA Forecast
model
Is Y
stationary?
y Diagnostic
Transform tests
M3, Part 1 Diagnostic
Unit root tests No (difference or tests
other)
M3, Part 2
Outline
Part 1: Stationary processes
Identification
Estimation & Model Selection
Putting it all together
Part 2: Nonstationary processes
Characterization
Testing
i
Properties of Time Series
Id
Identification
tifi ti
Estimation & Model Selection
Puttingg it all together
g
Identification
The
h fi
first step iis visual
i l iinspection:
i graph
h and
d
observe yyour data.
Yogi Berra
Identification
Does the series look stationary?
AR(1)
MA(1)
AR(1)
with
X X
AR(1)
trend with
b k
break
Identification
Note: differencing can remove the trend:
y yt yt 1
*
t
Identification
Assuming that the process is stationary,
stationary there
are three basic types that interest us:
Autoregressive
g (AR)
( ) yt a b1 yt 1 b2 yt 2 .... bp yt p t
yt a b1 yt 1 b2 yt 2 ... bp yt p
Combined (ARMA)
ut 1ut 1 2ut 2 ... q ut q
Identification
Some notation:
notation
AR(p),
(p), MA(q),
(q), ARMA(p,q),
(p,q), where p,q refer to the
order (maximum lag) of the process
t is a white
white noise
noise disturbance:
E t 0,
0 Var t E , Cov
t
2 2
C t , s 00, if t s
Properties of Time Series
Stationaryy process
p (visual inspection
p )y
Learned about possible processes for y
Need to identify which one in order to
understand, then eventuallyy forecast y
tools to help identify
Part 1: Stationary Time Series
Autocovariance and autocorrelation
Relations between observations at different lags:
g
Autocovariance:
A i j E yt yt j
j
Autocorrelation: j
0
ACF or Correlogram
Correlogram
Correlogram: graph of autocorrelations at
each lagg
Part 1: Stationary Time Series
Back to our previous examples Different
ff
p
patterns:
AR(1), Geometric
b1 = 0.7
07 decay
MA(1)
MA(1),
1=0.7 Cutoff
Part 1: Stationary Time Series
Partial autocorrelation
The pth partial autcorrelation is the pth coefficient of a
li
linear regression
i off yt on its
it llags up tto p:
yt a b1 yt 1 b2 yt 2 ... bp yt p et
Thus, PACp = bbp
Relationship between yt and yt-p, controlling for effects of
other lags up to p
For example, for p = 3, regress yt on yt-1, yt-2, yt-3
Part 1: Stationary Time Series
Some identifiable patterns for ACF, PACF
Geometric decay of ACF in AR(1)
AR(1), oscillating if b<0
b<0.
Part 1: Stationary Time Series
Some identifiable patterns for ACF, PACF
Gradual decay of ACF in AR(p)
AR(p), tending toward zero
relatively
l ti l quickly.
i kl
Part 1: Stationary Time Series
Some identifiable patterns for ACF, PACF
Abrupt dropoff in PACF in AR(p) after lag p
p.
Part 1: Stationary Time Series
Some identifiable patterns for ACF, PACF
Opposite patterns for MA(q): abrupt dropoff in ACF after
q, gradual
d ld decay ttoward
d zero iin PACF
PACF.
Properties of Time Series
Now we will:
Summarize the basic patterns to look for
Observe an actual data series and make an initial guess
Next
N t step:
t estimate
ti t (several
( l alternatives)
lt ti ) b based
d on thi
this
guess
Part 1: Stationary Time Series
ACF PACF
White
h noise Allll
's
' =0 Allll b's
b' = 0
Geometric decay Cutoff after lagg 1;;
S
Summary off AR(1)
(oscillating if b <0)
Decays toward zero,
zero
1 =b1
Decay (direct or
ARMA(p,q) Decay (direct or oscillatory) after
oscillatory) after lag q lag p
Part 1: Stationary Time Series
Some tips
p
ACFs
that
h dod not go to zero couldld b
be sign
i off
nonstationarity
ACF of both AR,, ARMA decayy gradually,
g y, drops
p to 0 for MA
PACF decays gradually for ARMA
ARMA, MA,MA drops to 0 for AR
Possible
P ibl approach:
approachh begin
b i with i h parsimonious
i i llow order
d
AR, check residuals to decide on possible MA terms.
Part 1: Stationary Time Series
When looking at ACF, PACF
Box-Jenkins p
provide sampling
p g variance of the
observed ACF and PACFs (rs and bs)
Permits one to construct confidence intervals around
each
h assess whether
h th significantly
i ifi tl 0
Computer
p p
packages
g ((EViews)) p
provide this
automatically!
Properties of Time Series
View graph
g
View ACF, PACF do they behave as expected?
Decide on alternative specifications (one correct, one or more
incorrect)
Estimate and compare the results
Use the EViews Automatic ARIMA Modeling feature
Question:
Q ti RW is
i a special
i l case off what
h t process??
Part 2: Nonstationary Time Series
Example of a random walk:
Part 2: Nonstationary Time Series
Example
p off a random walk with drift:
f
= 2.0
What is nonstationarity?
Why is it important?
How do we determine whether a time series is
nonstationary?
o stat o a y
Part 2: Nonstationary Time Series
Consequences of non-non-stationarity
Shocks
Sh k d do nott di
die out
t
Statistical consequences
Non-normall ddistribution
b off test statistics
Bias in AR coefficients; poor forecast ability
Part 2: Nonstationary Time Series
Shocks do not die out
Consider
C id a generall AR(1)
AR(1):
yt byt 1 t
Can be expressed as an MA(q):
yt b y0 t b t 1 b t 2 ...b 2 b 1
t 2 t 2 t 1
Three cases:
1 b< 1
1. t
1, b 0 as t , so the eect of a shock will
di i i h as ti
diminish time elapses
l t 1
, yt y0 t i
2. b = 1,, bt = 1 for all t;; effect persists,
p
i 0
variance grows indefinitely with time
3. b > 1, shocks become more influential over time
Part 2: Nonstationary Time Series
Statistical consequences of nonstationarity
N -normall di
Non-
Non distribution
t ib ti off ttestt statistics
t ti ti
Where
Wh Dt contains
i d deterministic
i i i components (constant or constant
) t is a random walk
plus time trend),
H0: 0
2
therefore is a constant
constant, y is trend
stationary
stationary.
H1: 2 0
KPSS critical values are obtained by simulation methods
methods.
Part 2: Nonstationary Time Series
A few notes:
DF
DF, ADF
ADF, and PP are called unit root tests
tests; the null
h
hypothesis
h i iis that
h yt has
h a unit i root; iis I(1) or hi
higher.
h
KPSS, on the other hand, is a stationarity
stationarity test
test,, null
hypothesis is that yt is I(0)
I(0).
Correct
C t specification
ifi ti iis kkey: iintercept
t t and d ttrendd
should be included when appropriate.
Structural breaks can complicate matters further.
further
Part 2: Nonstationary Time Series
A unified way of looking at the unit root tests
Slightly different representation
representation:
yt t ut
In practice,
ut ut 1 t
this is what
H0: = 1 y has h a unit it roott EViews does
H1: | |< 1 y is stationary (test for ).
If t is white noise, then DF can be used
If t is ARMA(p,q) then use ADF or PP.
Properties of Time Series
Part 2:
P 2 Nonstationary
N i Ti
Times SSeries
i
L-12: Some exercises with simulated
data
Part 2: Nonstationary Time Series
Simulate three processes in EViews
Stationary process with near-unit
near unit roots
Trend stationaryy process
p
An I(1) process
Graphh them
h andd observe
b their
h b behavior
h
Conduct Unit Root/Stationarity Tests on all three
three.
Part 2: Nonstationary Time Series
In Simulated
Simulated Times Series Examples.xlsx
Examples.xlsx
Si l t an I(0) process with
Simulate ith a structural
t t lb breakk
Import into EViews
Graph and observe
Conduct Unit Root/Stationarityy Tests
Properties of Time Series
Part 2:
P 2 Nonstationary
N i Ti
Times SSeries
i
L-13: Some exercises with real-world
data
Part 2: Nonstationary Time Series
Now let
letss work with real world data
Choose a series:
Look at graph and correlogram for a specific time series
Does it appear to be non-stationary?
Does it appear to have a trend, or a structural break?