Professional Documents
Culture Documents
- I ≡ Integrated
- MA ≡ Moving Average
Strict stationarity
Definition
Let FY (yt1+τ , . . . , ytn +τ ) represent the cumulative distribution function of the
unconditional joint distribution of {Yt } at times t1 + τ, . . . , tn + τ . Then, {Yt } is said to
be strictly stationary (or strongly stationary/strict-sense stationary) if
FY (yt1+τ , . . . , ytn +τ ) = FY (yt1 , . . . , ytn ) for all τ, t1, . . . , tn ∈ R and for all n ∈ N (1)
- Example 1. Let X be any scalar random variable, and define a time-series {Yt } :
Weak stationarity
- Remarks:
∗ First property ⇒ mY (t) must be constant
∗ Second property ⇒ KYY (t1, t2) depends only on the difference between t1 and t2 ≡ only
need to be indexed by one variable (i.e., τ = t1 − t2) rather than two variables.
∗ Third property says that the second moments must be finite for any time t.
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV 4 / 26
ARIMA Processes AR models
AR processes
AR processes (cont’d)
- First, solve Q(z) = 0 to get the p roots z1, z2 . . . , zp (solution always exists in C)
• yt is weakly stationary (or S2) if all the p roots z1 , z2 . . . , zp of Q(z) = 0 lie outside the Unit Circle
≡ {z ∈ C : |z| = 1}
• yt has (contains) a unit root if at least one of p roots z1 , z2 . . . , zp lies on the Unit Circle. yt is integrated of
order d if it has d unit roots ≡ yt ∼ I(d)
√
- Note: z ∈ C ⇒ z = a + ib, where i = −1. C ≡ complex set, a = <(z) ≡ real part of z,
√
b = =(z) ≡ imaginary part of z. Modulus of z is: |z| = a2 + b2. We can always write z as:
√
z = Re where R ≡ |z| = a2 + b2 (circle radius) eiθ = cos(θ) + i sin(θ), cos(θ) = Ra and
iθ
sin(θ) = Rb .
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV 6 / 26
ARIMA Processes Moving Average (MA) processes
MA processes
− yt is invertible if all the q roots z1, z2 . . . , zq of Θ(z) = 0 lie outside the Unit
Circle: any invertible MA (q) can be written as AR(∞).
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV 7 / 26
ARIMA Processes ARIMA processes
ARIMA(p,d,q)
Unit roots
yt = φ0 + φ1yt−1 + εt
- If yt contains exactly two unit roots, then the first-difference ∆yt = yt − yt−1 contains one unit
root
- A time series yt is weakly stationary if it does not contain a unit root, i.e., yt ∼ I(0)
yt = |{z}
β0 + β1t
|{z} +yt−1 + εt
drift deterministic trend
I Dickey-Fuller (DF) original test for unit roots involves fitting the AR(1) model:
yt = α + δt + φyt−1 + εt (8)
− To control for that, the augmented Dickey-Fuller (ADF) test instead fits a
model of the form
- command: pperron varname, lag(#) trend → lag(#)≡ lag length of Newey-West HAC
estimator
I GLS detrended ADF test:
- similar to the ADF test but prior to fitting the model in (9), one first transforms the actual
series via a generalized least-squares (GLS) regression
- maxlag(#) sets the value of k, the highest lag order for the first-differenced, detrended
T +1 41
variable in the DF regression: by default, kmax = floor 12{ 100 } → Schwert, G. W (1989,
JBES)
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV 16 / 26
Unit root processes Random Walk
clear all
set seed 2016
local T = 200
set obs ‘T’
gen time =− n
label var time "Time"
tsset time
gen eps =rnormal(0,5)
/*Random walk*/
gen yrw = eps in 1 /*keep first value of eps and replace other by dots */
replace yrw = l.yrw + eps in 2/l
/*Random walk with drift*/
gen yrwd1 = 0.1 + eps in 1
replace yrwd1 = 0.1 + l.yrwd1 + eps in 2/l
I Autocovariance function:
I Autocorrelation function:
cov (yt , yt−k )
: k = 0, 1, 2, . . .
ρk = (11)
γ0
Both γk and ρk are symmetric function of k , i.e., γ−k = γk and ρ−k = ρk . Note that
ρ0 = 1 and −1 ≤ ρk ≤ 1.
ACF (cont’d)
- MA(1): yt = εt + θ0 + θ1εt−1
PACk = βk (13)
H For an AR(p) process, ρk is not zero after lag p but PACk = 0 for k > p ⇒ PACk is used to
identify p
H For an MA(q) process, PACk is not zero after lag q but ρk = 0 for k > q ⇒ ρk is used to
identify q
I In STATA, the command corrgram plots the estimated ACs and PACs.
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV 22 / 26
Autocorrelation and Partial Autocorrelation functions Partial autocorrelation function of stationary time series
Corrgram in STATA
- We can use ‘ac’ to produce a graph of the autocorrelations → Command: ac varname [if]
[in] [, ac−options]
- We can use ‘pac’ to produce a graph of the partial autocorrelations → Command: pac
Application
Application (cont’d)
(c) Autocorrelogram
Application (cont’d)
I Can account for both together with time-series operators: command→ pac DS12.air,
lags(20) srv
- Here we graph the partial autocorrelations after controlling for trends and seasonality