ECON 4551 Economerics II Memorial Universiy of Newfoundland Nonsaionary Time Series Daa and Coinegraion Adaped from Vera Tabakova s noes
12.1 Saionary and Nonsaionary Variables 12.2 Spurious Regressions 12.3 Uni Roo Tess for Saionariy 12.4 Coinegraion 12.5 Regression When There is No Coinegraion Slide 12-2
In ime series regressions he daa need o be saionary In simple erms: he means, variances and covariances of he daa series canno depend on he ime period in which hey are observed Observaions on saionary ime series can be correlaed wih one anoher, bu he naure of ha correlaion can' change over ime The presen is like he pas Slide 12-3
How could he series is nonsaionary? A GDP series maybe growing over ime (no mean saionary) may have become less volaile hroughou he decades (no variance saionary) Changes in informaion echnology, macroeconomic policy, and insiuions may have shorened he persisence of shocks in he economy (no covariance saionary) Slide 12-4
The firs hing when working wih ime series is o ake a look a he daa graphically A ime series plo will reveal poenial problems wih your daa and sugges ways o proceed saisically GRETL: view>muliple>graphs>time series Slide 12-5
Real Gross Domesic Produc Inflaion Rae 13000 12000 11000 10000 9000 8000 7000 6000 5000 4000 1986 1991 1996 2001 2006 6.5 6 5.5 5 4.5 4 3.5 3 2.5 2 1.5 1 1986 1991 1996 2001 2006 Federal Funds Rae 3-year Bond rae 10 11 9 10 8 9 7 8 6 7 5 6 4 5 3 4 2 3 1 2 0 1986 1991 1996 2001 2006 1 1986 1991 1996 2001 2006 Slide 12-6
Flucuaes abou a rising rend Y-Y -1 On he righ hand side Flucuaes abou a zero mean Differenced series Figure 12.1(a) US economic ime series Slide 12-7
Y-Y -1 On he righ hand side Differenced series # GRETL: diff gdp inf F B Figure 12.1(b) US economic ime series Slide 12-8
Saionary if: E y (12.1a) var 2 y (12.1b) y y y y cov, cov, s s s (12.1c) Slide 12-9
Slide 12-10
y y 1 v, 1 (12.2a) Each realizaion of he process has a proporion rho of he previous one plus an error drawn from a disribuion wih mean zero and variance sigma squared I can be generalised o a higher auocorrelaion order We jus show AR(1) Slide 12-11
y y 1 v, 1 (12.2a) We can show ha he consan mean of his series is zero y y v 1 0 1 y y v ( y v ) v y v v 2 2 1 2 0 1 2 0 1 2 y v v v... y 2 1 2 0 E[ y ] E[ v v v...] 0 2 1 2 Slide 12-12
We can also allow for a non-zero mean, by replacing y wih y-mu ( y ) ( y ) v 1 Which boils down o (using alpha = mu(1-rho)) y y 1 v, 1 (12.2b) Ey ( ) / (1 ) 1/ (1 0.7) 3.33 Slide 12-13
Or we can allow for a AR(1) wih a flucuaion around a linear rend (mu+dela imes ) The de-rended model, which is now saionary, behaves like an auoregressive model: ( y ) ( y ( 1)) v, 1 1 y y v 1 (12.2c) Wih alpha =(mu(1-rho)+rho imes dela) And lambda = dela(1-rho) Slide 12-14
Figure 12.2 (a) Time Series Models Slide 12-15
Figure 12.2 (b) Time Series Models Slide 12-16
Figure 12.2 (c) Time Series Models Slide 12-17
y y v 1 (12.3a) y y v 1 0 1 y2 y1 v2 ( y0 v1 ) v2 y0 vs 2 s 1 y y v y v 1 0 s s 1 The firs componen is usually jus zero, since i is so far in he pas ha i has a negligible effec now The second one is he sochasic rend Slide 12-18
A random walk is non-saionary, alhough he mean is consan: E( y ) y E( v v... v ) y 0 1 2 0 var( y ) var( v v... v ) 2 1 2 v Slide 12-19
y y v 1 (12.3b) A random walk wih a drif boh wanders and rends: y y v 1 0 1 y2 y1 v2 ( y0 v1 ) v2 2 y0 vs 2 s 1 y y v y v 1 0 s s 1 Slide 12-20
E( y ) y E( v v v... v ) y 0 1 2 3 0 var( y ) var( v v v... v ) 2 1 2 3 v Slide 12-21
rw : y y v 1 1 1 rw : x x v 2 1 2 Boh independen and arificially generaed, bu rw rw R 2 1 17.818 0.842 2,.70 ( ) (40.837) Slide 12-22
Figure 12.3 (a) Time Series of Two Random Walk Variables Slide 12-23
Figure 12.3 (b) Scaer Plo of Two Random Walk Variables Slide 12-24
Dickey-Fuller Tes 1 (no consan and no rend) y y v 1 (12.4) y y y y v 1 1 1 y 1 y v 1 (12.5a) y 1 v Slide 12-25
Dickey-Fuller Tes Several varians based on wha he series looks like Tes ype choice are usually made based on visual inspecion of he ime series plos E.g.: Deermine wheher he series have a rend or no Deermine wheher hey have a linear or quadraic rend If he rend in he series is quadraic hen he differenced version of he series will have a linear rend in hem Slide 12-26
Dickey-Fuller Tes 1 (no consan and no rend) H : 1 H : 0 0 0 H : 1 H : 0 1 1 Easier way o es he hypohesis abou rho Remember ha he null is a uni roo: nonsaionariy! Slide 12-27
Dickey-Fuller Tes 2 (wih consan bu no rend) y y v 1 (12.5b) Slide 12-28
Dickey-Fuller Tes 3 (wih consan and wih rend) y y v 1 (12.5c) Slide 12-29
Firs sep: plo he ime series of he original observaions on he variable. If he series appears o be wandering or flucuaing around a sample average of zero, use Version 1 If he series appears o be wandering or flucuaing around a sample average which is non-zero, use Version 2 If he series appears o be wandering or flucuaing around a linear rend, use Version 3 Slide 12-30
As you may have guessed, analyzing ime series in his way is somehing of an ar This does no mean ha you can choose he version of he es ha suis you (if heir conclusions are conradicory!!!)
Slide 12-32
An imporan exension of he Dickey-Fuller es allows for he possibiliy ha he error erm is auocorrelaed. y y a y v 1 s s s 1 m y y y, y y y, 1 1 2 2 2 3 (12.6) The uni roo ess based on (12.6) and is varians (inercep excluded or rend included) are referred o as augmened Dickey-Fuller ess. Slide 12-33
The nex decision is hen o selec he number of lagged erms o include in he ADF regressions Again, his is a judgmen call, bu he residuals from he ADF regression should be void of any auocorrelaion Grel helps by reporing he oucome of an auocorrelaion es whenever he buil-in ADF rouines are used
F = US Federal funds ineres rae F 0.178 0.037F 0.672 F 1 1 ( au) ( 2.090) B = 3-year bonds ineres rae B 0.285 0.056B 0.315 B 1 1 ( au) ( 1.976) # GRETL: Augmened Dickey Fuller regressions ols d_f cons F(-1) d_f(-1) ols d_b cons B(-1) d_b(-1) Slide 12-35
In STATA: use usa, clear gen dae = q(1985q1) + _n - 1 forma %q dae sse dae TESTING UNIT ROOTS BY HAND : * Augmened Dickey Fuller Regressions regress D.F L1.F L1.D.F regress D.B L1.B L1.D.B Slide 12-36
In STATA: TESTING. regress D.F UNIT L1.F ROOTS L1.D.F BY HAND : * Augmened Dickey Fuller Regressions regress D.F L1.F L1.D.F regress D.B L1.B L1.D.B Source SS df MS Number of obs = 79 F( 2, 76) = 31.85 Model 7.99989546 2 3.99994773 Prob > F = 0.0000 Residual 9.54348876 76.12557222 R-squared = 0.4560 Adj R-squared = 0.4417 Toal 17.5433842 78.224915182 Roo MSE =.35436 D.F Coef. Sd. Err. P> [95% Conf. Inerval] F L1. -.0370668.0177327-2.09 0.040 -.0723847 -.001749 LD..6724777.0853664 7.88 0.000.5024559.8424996 _cons.1778617.1007511 1.77 0.082 -.0228016.378525 Slide 12-37
GRETL: Augmened Dickey Fuller Regressions wih buil in funcions adf 1 F --c --verbose adf 1 B --c --verbose Choice of lags if we wan o allow For more han a AR(1) order GRETL includes a es as an opion c is for consan Verbose is for exra oupu (See dialogs oo) Slide 12-38
GRETL: Augmened Dickey Fuller Regressions wih buil in funcions adf 1 F --c verbose Key oupu: 1s-order auocorrelaion coeff. for e: 0.061 es saisic: au_c(1) = -2.0903 asympoic p-value 0.2487 GRETL also repors an esimaed auocorrelaion coefficien for he errors (0.061), which should be small afer having chosen he correc number of lags in he ADF regression. Slide 12-39
In STATA: Augmened Dickey Fuller Regressions wih buil in funcions dfuller F, regress lags(1) dfuller B, regress lags(1) Choice of lags if we wan o allow For more han a AR(1) order Slide 12-40
In STATA: Augmened Dickey Fuller Regressions wih buil in funcions dfuller F, regress lags(1). dfuller F, regress lags(1). dfuller F, regress lags(1) Augmened Dickey-Fuller es for uni roo Augmened Dickey-Fuller es for uni roo Number of obs Number of obs = = 79 79 Inerpolaed Inerpolaed Dickey-Fuller Dickey-Fuller Tes Tes 1% 1% Criical Criical 5% 5% Criical Criical 10% 10% Criical Criical Saisic Saisic Value Value Value Value Value Z() Z() -2.090-2.090-3.539-2.907-2.588 MacKinnon MacKinnon approximae p-value p-value for for Z() Z() = = 0.2484 GRETL supplies his value oo D.F D.F Coef. Coef. Sd. Sd. Err. Err. P> P> [95% [95% Conf. Conf. Inerval] Inerval] F F L1. -.0370668.0177327-2.09 0.040 -.0723847 -.001749 L1. LD. -.0370668.6724777.0177327.0853664-2.09 7.88 0.040 0.000 -.0723847.5024559.8424996 -.001749 LD..6724777.0853664 7.88 0.000.5024559.8424996 _cons.1778617.1007511 1.77 0.082 -.0228016.378525 _cons.1778617.1007511 1.77 0.082 -.0228016.378525 Slide 12-41
Slide 12-42
In STATA: Augmened Dickey Fuller Regressions wih buil in funcions dfuller F, regress lags(1) Alernaive: pperron uses Newey-Wes sandard errors o accoun for serial correlaion, whereas he augmened Dickey-Fuller es implemened in dfuller uses addiional lags of he firs-difference variable. Also consider now using DFGLS (Ellio Rohenberg and Sock, 1996) o counerac problems of lack of power in small samples. I also has in STATA a lag selecion procedure based on a sequenial es suggese by Ng and Perron (1995) Slide 12-43
GRETL: Augmened Dickey Fuller Regressions wih buil in funcions adf 1 F --c --verbose --gls Alernaive: Also consider now using DFGLS (Ellio Rohenberg and Sock, 1996) o counerac problems of lack of power in small samples. I also has in STATA a lag selecion procedure based on a sequenial es suggesed by Ng and Perron (1995) The ADF-GLS es is a varian of he Dickey-Fuller es for a uni roo, for he case where he variable o be esed is assumed o have a non-zero mean or o exhibi a linear rend. The difference is ha he de-meaning or derending of he variable is done using he GLS procedure suggesed by Ellio, Rohenberg and Sock (1996). This gives a es of greaer power han he sandard Dickey-Fuller approach. Slide 12-44
GRETL: kpss 3 F --verbose Alernaives: use ess wih saionariy as he null KPSS (Kwiaowski, Phillips, Schmid and Shin. 1992) which in STATA also has an auomaic bandwidh selecion ool or he Leybourne & McCabe es The null hypohesis is ha he variable in quesion is saionary, eiher around a level or, if he "include a rend" box is checked, around a deerminisic linear rend. The seleced lag order deermines he size of he window used for Barle smoohing. If he "show regression resuls" box is checked he resuls of he auxiliary regression are prined, along wih he esimaed variance of he random walk componen of he variable. Slide 12-45
y y y v 1 The firs difference of he random walk is saionary I is an example of a I(1) series ( inegraed of order 1 Firs-differencing i would urn i ino I(0) (saionary) In general, he order of inegraion is he minimum number of imes a series mus be differenced o make i saionariy Slide 12-46
y y y v 1 F 0.340 F 1 ( au) ( 4.007) B 0.679 B 1 Remember: no consan!!! So now we rejec he Uni roo afer differencing once: We have a I(1) series ( au) ( 6.415) Slide 12-47
In STATA: ADF on differences dfuller D.F, noconsan lags(0) dfuller D.B, noconsan lags(0). dfuller F, regress lags(1) Augmened Dickey-Fuller es for uni roo Number of obs = 79 Inerpolaed Dickey-Fuller. dfuller D.F, noconsan Tes lags(0) 1% Criical 5% Criical 10% Criical Saisic Value Value Value Dickey-Fuller es for uni roo Number of obs = 79 Z() -2.090-3.539-2.907-2.588 Inerpolaed Dickey-Fuller MacKinnon approximae Tes p-value 1% Criical for Z() = 0.2484 5% Criical 10% Criical Saisic Value Value Value Z() D.F -4.007 Coef. Sd. -2.608 Err. -1.950 P> [95% Conf. -1.610 Inerval] F L1. -.0370668.0177327-2.09 0.040 -.0723847 -.001749 LD..6724777.0853664 7.88 0.000.5024559.8424996 _cons.1778617.1007511 1.77 0.082 -.0228016.378525 Slide 12-48
GRETL: # Dickey-Fuller regressions for firs differences adf 0 F --nc --verbose --difference adf 0 B --nc --verbose difference
eˆ eˆ v 1 (12.7) Case eˆ y bx 1: (12.8a) Case eˆ y b x b 2: 2 1 (12.8b) Case eˆ y b x b ˆ 3: 2 1 (12.8c) Slide 12-50
No he same as for dfuller, since he residuals are esimaed errors no acual ones Noe: unforunaely STATA dfuller will no noice and give you erroneous criical values! They would lead o an overopimisic conclusion Slide 12-51
ˆ 2 1.644 0.832, 0.881 B F R ( ) (8.437) (24.147) (12.9) eˆ 0.314eˆ 0.315 eˆ 1 1 ( au) ( 4.543). dfuller eha, noconsan lags(1) Check: These are wrong! Augmened Dickey-Fuller es for uni roo Number of obs = 79 Inerpolaed Dickey-Fuller Tes 1% Criical 5% Criical 10% Criical Saisic Value Value Value Z() -4.543-2.608-1.950-1.610 Slide 12-52
The null and alernaive hypoheses in he es for coinegraion are: H H 0 1 : he series are no coinegraed residuals are nonsaionary : he series are coinegraed residuals are saionary Slide 12-53
# Engle-Granger es of coinegraion coin 1 B F Oupu deails all he seps needed and reminds you of he null hypoheses and he conclusion
Le us consider he simple form of a dynamic model: Here he SR and LR effecs are measured respecively by: Rearranging erms, we obain he usual ECM: Slide 12-55
Where he LR effec will be given by: And is a parial correcion erm for he exen o which Y-1 deviaed from is Equilibrium value associaed wih X-1 Slide 12-56
This represenaion assumes ha any shor-run shock o Y ha pushes i off he long-run equilibrium growh rae will gradually be correced, and an equilibrium rae will be resored is he residual of he long-run equilibrium relaionship beween X and Y and is Coefficien can be seen as he speed of adjusmen Slide 12-57
This represenaion assumes ha any shor-run shock o Y ha pushes i off he long-run equilibrium growh rae will gradually be correced, and an equilibrium rae will be resored Usually So he SR effec is weaker han he LR effec Slide 12-58
If you have coinegraion, you can run an Error Correcion Model, so you can esimae boh he long run and he shor run relaionship beween he relevan variables The inegraion of he variables suggess ha we should no use hen in a regression, bu raher only heir differences. We may obain inconsisen esimaes (he spurious regression problem) However, he fac ha hey are coinegraed (a weighed average of he variables is saionary, I(0)) means ha you can include linear combinaions of he variables in regressions of heir differences in and Error Correcion Model (ECM) Slide 12-59
By having already concluding ha he variables are coinegraed, we have implicily decide ha here is a longrun causal relaion beween hem. Then he causaliy being esed for in a VECM is someimes called shor-run Granger causaliy Slide 12-60
The ECM analysis can show (by he magniude and significance of he EC erms) ha when values of he relevan variables move away from he equilibrium relaionship implied by he conegraing vecor, here was a srong endency for he variable(s) o change so ha he equilibrium would be resored The ECM analysis under coinegraion allows us no o hrow away he informaion on he LR effec behind he relaionship Slide 12-61
The EC erm will be significan if here is a coinegraing relaionship Therefore, you can es he exisence of coinegraion by looking a he significance of ha coefficien Slide 12-62
12.5.1 Firs Difference Saionary y y v 1 y y y v 1 The variable y is said o be a firs difference saionary series. Then we rever o he echniques we saw in Ch. 9 Slide 12-63
Manipulaing his one you can consruc and Error Correcion Model o invesigae he SR dynamics of he relaionship beween y and x y y x x e 1 0 1 1 (12.10a) y y v 1 y v y y x x e 1 0 1 1 (12.10b) Slide 12-64
y v y v y y x x e 1 0 1 1 (12.11) y y x x e 1 0 1 1 where and (1 ) ( ) 1 1 2 0 1 1 1 1 2 (1 ) ( ) 1 1 2 0 1 Slide 12-65
To summarize: If variables are saionary, or I(1) and coinegraed, we can esimae a regression relaionship beween he levels of hose variables wihou fear of encounering a spurious regression. Then we can use he lagged residuals from he coinegraing regression in an ECM model This is he bes case scenario, since if we had o firs-differeniae he variables, we would be hrowing away he long-run variaion Addiionally, he coinegraed regression yields a superconsisen esimaor in large samples Slide 12-66
To summarize: If he variables are I(1) and no coinegraed, we need o esimae a relaionship in firs differences, wih or wihou he consan erm. If hey are rend saionary, we can eiher de-rend he series firs and hen perform regression analysis wih he saionary (de-rended) variables or, alernaively, esimae a regression relaionship ha includes a rend variable. The laer alernaive is ypically applied. Slide 12-67
Augmened Dickey-Fuller es Auoregressive process Coinegraion Dickey-Fuller ess Mean reversion Order of inegraion Random walk process Random walk wih drif Spurious regressions Saionary and nonsaionary Sochasic process Sochasic rend Tau saisic Trend and difference saionary Uni roo ess Slide 12-68
Furher issues You may wan o some ime consider uni roo ess ha allow for srucural Breaks You can also ake a look a he lieraure review in his working paper: hp://ideas.repec.org/p/wpa/wuwpo/0410002.hml Slide 12-69
Furher issues Apar from he fac ha in your coinegraion relaionship you mus choose one variable o be he regressand (giving i a coefficien of one) When you deal wih more han 2 regressors you should consider he Johansen s mehod o examine he coinegraion relaionships This is because when here are more han 2 variables involved, here can be muliple coinegraing relaionships!!! In his case, you we exploi he noion of Vecor Auoregression (VAR) Models ha involve a srucural view of he dynamics of several variables The generalizaion of hese VAR echniques in his case resuled in he Vecor Error Correcion Models (VECM ) Slide 12-70
Furher issues GRETL offers a Johansen es oo You should consider looking carefully a his opion if you have more han 2 series o consider Slide 12-71