Applied Econometrics –

Introduction to Time Series
Roman Horváth
Lecture 3

Contents
• Stationarity
– What it is and what it is for

• Some basic time series models
– Autoregressive (AR)
– Moving average (MA)

• Consequences of non-stationarity (spurious
regression)
• Testing for (non)-stationarity
– Dickey-Fuller test
– Augmented Dickey-Fuller test
2

(Weak) Stationarity • Xt is stationary if: • the series fluctuates around a constant long run mean • Xt has finite variance which is not dependent upon time • Covariance between two values of Xt depends only on the difference apart in time (e. covariance between Xt and Xt-1 is the same as for Xt-8 and Xt-9) E(Xt) = μ (mean is constant in t) Var(Xt) = σ2 (variance is constant in t) Cov(Xt .Xt+k) = χ(k) (covariance is constant in t) • If data not stationary. spurious regression problem 3 .g.

ARMA (1.Examples of Times Series Models • AR – autoregressive models  Xt = β + α*Xt-1 + ut ……is called AR(1) process  Xt = β + α1*Xt-1 + α2*Xt-2 +….+αk*ut-k ….is called MA(k) process • If you combine AR and MA process.1) is Xt = β +α*Xt-1+ut+ α2 ut-1 4 . you get ARMA process • E.g.+αk*Xt-k + ut …is AR(k) process • MA – moving average models  Xt = β + ut + α2*ut-1 ……is called MA(1) process  Xt = β + ut + α2*ut-1 +….

Xt-k) is either 0 if k>1 or ut2*α2 .so it does not depend on time (MA(k) is stationary process) 5 . variance and covariance and check if it depends on time • For AR process.Is MA and AR process stationary? • Compute mean. you may easily derive that the process is stationary if α < 1 • For MA (1) process. variance is ut2 *(1+α22) and covariance cov(Xt . mean is β.

6 0.4 0.2 -0.4 -0.2 0 -0. σ2 ) 0.Example of Stationary Time Series • White noise process: Xt = ut ut ~ IID(0.6 6 .

Another Example of Stationary Time Series Xt = 0.4 0.2 -0.5*Xt-1 + ut ut ~ IID(0.2 0 -0.6 0. σ2 ) Stationary without drift 0.8 0.4 -0.6 7 .

Example of Non-stationary Time Series • Yt = α + β*t + ut . clearly the mean depends on time and the series is non-stationary 8 . where t is time trend • Take the expected value E(Yt ) = α + β*t .

long memory 9 .Non-stationary time series In contrast a non-stationary time series has at least one of the following characteristics: • Does not have a long run mean which the series returns • Variance is dependent upon time and goes to infinity as the sample period approaches infinity • Correlogram does not die out .

. the mean increases over 10 time.Example of Non-stationary Time Series 2003 Q1 2002 Q2 2001 Q3 2000 Q4 2000 Q1 1999 Q2 1998 Q3 1997 Q4 1997 Q1 1996 Q2 1995 Q3 1994 Q4 1994 Q1 1993 Q2 1992 Q3 120 100 80 60 40 20 0 UK GDP Level • The level of GDP is not constant.

2 0.4 0.5 0.9 0.0 ACF-Y 0.3 0.7 0.8 0.1 0 1 2 3 4 5 6 7 • For non-stationary series the Autocorrelation Function (ACF) declines towards zero at a slow rate as k increases.6 0. 11 .Non-stationary time series – correlogram UK GDP (Yt) 1.

Yt-1) is stationary: .2 0 1992 Q3 • Some transformation = first differenece.variance is also reasonably constant through time 12 .6 0. second difference .2 1 0. •First difference of UK GDP (ΔYt = Yt .growth rate is reasonably constant through time ..4 1. logarithm.4 0..8 0.Possible solutions of non-stationarity 2003 Q1 2002 Q2 2001 Q3 2000 Q4 2000 Q1 1999 Q2 1998 Q3 1997 Q4 1997 Q1 1996 Q2 1995 Q3 1994 Q4 1994 Q1 1993 Q2 1.

75 0.Stationary time series .50 -0.25 -0.50 0.75 0 1 2 3 4 5 6 7 • ACF decline towards zero as k increases • Decline of ACF is rapid for stationary series 13 .00 ACF-DY 0.00 -0.25 0.correlogram UK GDP Growth (Δ Yt) 1.

Non-stationary Time Series Continued – Random Walk • Xt = Xt-1 + ut . σ2 ) • Mean is constant in t: E(Xt) = E(Xt-1) X1 = X0 + u1 (take initial value X0) X2 = X1 + u2 = (X0 + u1 ) + u2 … Xt = X0 + u1 + u2 +…+ ut (take expectations) E(Xt) = E(X0 + u1 + u2 +…+ ut) = E(X0) = constant • Variance is not constant in t: Var(Xt) = Var(X0) + Var(u1) +…+ Var(ut) = 0 + σ2 +…+ σ2 = t σ2 14 . where ut ~ IID(0.

σ2 ) 2.5 1 0.5 0 15 .Random walk • Xt = Xt-1 + ut ut ~ IID(0.5 2 1.

Relationship between stationary and nonstationary process • AR(1) process: Xt =  + α Xt-1 + ut .“process does not forget past”  = 0 without drift   0 with drift • MA process is always stationary 16 . σ2 )) α < 1stationary process .(ut ~ IID(0.“process forgets past” α = 1non-stationary process .

then you have ARIMA (p.l) – estimation of ARIMA models is a subject of next lecture 17 .k.Summary on basic time series processes • • • • AR (k) process MA(k) process ARMA (p.l) process If you k-th difference the data.

. large t-statistics) . even if unrelated in economic terms 18 .Spurious Regression ( spurious correlation) • Problem that time-series data usually includes trend • Result: – Spurious correlation (variables with similar trends are correlated) – Spurious regression (independent variable with similar trend looks as dependent = strong statistical relationship) coefficient significant (high adjusted-R2..

T) 2. Cointegration + ECM = Long-run relationship + short-run adjustment 19 .. Include a time trend as an independent variable (oldfashioned) yt = c + 1xt + 2t + ut ...How to avoid spurious regression: 3 approaches to non-stationarity 1.2.(t = 1..... 2nd difference if I(2) = converts non-stationary variables into stationary variables Problems: – theory often about levels – detrending  loss of information 3. . 1st difference the data if variables I(1).

Correlogram (B) Formal methods: .Dickey-Fuller tests.Plot time series .Statistical test for stationarity . 20 .How do we identify non-stationary processes? (A) Informal methods: .

Informal Procedures to identify non-stationary processes (a) Constant mean? 12 RW2 10 8 6 4 2 0 0 50 100 150 200 250 300 350 400 450 500 (b) Constant variance? var 200 150 100 50 0 -50 -100 -150 21 -200 0 50 100 150 200 250 300 350 400 450 500 .

Informal Procedures to identify non-stationary processes • Diagnostic test – Correlogram for stationary process (dies out rapidly.0 50 100 150 200 250 300 350 400 450 500 ACF-whitenoise 0.0 -0.50 whitenoise 0.5 0.25 0.00 -0. series has no memory) 0.5 0 5 10 22 .25 0 1.

0 7.75 0.0 0 1.50 0.5 5.25 0 5 10 23 .00 50 100 150 200 250 300 350 400 450 500 ACF-randomwalk 0.5 0.0 2.Informal Procedures to identify non-stationary processes • Diagnostic test – Correlogram for a random walk (does not die out.5 randomwalk 10. high autocorrelation for large values of k) 12.

Yt-1 = (-1)Yt-1 + ut – Reparameterise: Yt = Yt-1 + ut where = (-1) – Test =0 equivalent to test =1 24 .. Yt ..DF test to determine whether =1 • Yes  unit root  non-stationary • No  no unit root • Dynamic model: – Subtract Yt-1 .Dickey-Fuller Test • Test based on Yt = Yt-1 + ut .

white noise in residual 25 ..Augmented Dickey-Fuller Test • Augment „dynamic model“ Yt = Yt-1 + ut: 1) Constant or “drift” term (0) Yt = 0 + Yt-1 + ut 2) Time trend (T) Yt = 0 +  T + Yt-1 + ut 3) Lagged values of the dependent variable Yt = 0 + T + Yt-1 + 1Yt-1 + 2Yt-2 + . + ut • Find the right specification. trade-off parsimony vs..

Critical values • DF/ADF use t.and F-tests not valid in presence of unit roots 26 .and F-statistics but critical values are not standard • Problems: • distributions of these statistics are non-standard • special tables of critical values (derived from numerical simulations) • Usual t.