Lecure 5 Time series: ECM Bernardina Algieri Deparmen Economics, Saisics and Finance
Conens Time Series Modelling Coinegraion Error Correcion Model Two Seps, Engle-Granger procedure Error Correcion Model One Sep
Time series analsis If he variables in a given model are non-saionar, he OLS esimaes ma lead o a spurious regression or nonsense regression and he sandard and F ess become misleading Smpom of spurious regression is: R2 > Durbin Wason saisics To have a firs hand impression abou he variables we graphicall inspec he series We hen formall es for non saionari
Esimaing Single Equaions Daa Analsis Uni Roo Tess Non saionari Coinegraion Analsis Saionari ECM one sep ECM wo seps (Engle-Granger) Johansen Procedure OLS
Time series analsis To have a firs hand impression abou he variables we graphicall inspec he series We hen formall es for non saionari Two popular ess
ADF Tes If we rejec he Null Hpohesis, we sa ha our series is inegraed of order 0 and wrie he series is I(0) If we do no rejec he Null Hpohesis, we ake he firs differences d and es he new series for a uni roo. If he new series d is saionar hen we sa ha our series is inegraed of order, ha is we need o differeniae once o ransform our non-saionar series o saionar and wrie is I() (also d I(0))
ADF Tes Eamine he resuls of he hpohesis esing in Grel Since he Probabili is over 0.05 and he Null Hpohesis is Y has a uni roo, hen we do no rejec H0 => our series is non-saionar grel oupu
Time series analsis There are wo condiions ha make a given model no spurious an more: The considered variables should be non saionar in levels, bu he have o become saionar afer firs differences, i.e., he should be I() The residuals of he esimaed model should be found o be saionar If he residuals are saionar means ha he considered variables are coinegraed or he have a long-run relaionship or long-run equilibrium relaionship beween hem => The model is long-run model
Coinegraion When esimaing an economeric model wih nonsaionar variables, his variables have o be coinegraed in order for he model o be meaningful The Granger Theorem saes ha if wo series are non saionar (i.e. I()), here can be a linear combinaion of he wo series ha is saionar, in ha case we can sa he wo variables are coinegraed Economicall speaking, wo variables will be coinegraed if he have a long-erm or equilibrium relaionship beween hem.
Coinegraion Two series are coinegraed if
Coinegraion and Equilibrium Eamples of possible Coinegraing Relaionships in finance: spo and fuures prices raio of relaive prices and an echange rae equi prices and dividends Shor and long erm ineres rae No coinegraion implies ha series could wander apar wihou bound in he long-run.
ECM An Error Correcion Model (ECM) is he sandard wa o model ime series equaions. The ECM makes i possible o deal wih nonsaionar daa series and separaes he long and shor run. ECM models make no ad hoc assumpions of how he variables change over ime.
ECM Two pes of ECM implemenaion: Two-seps ECM Engle and Granger procedure (987, firs approach in ime) One-sep ECM
ECM Two seps Engle and Granger Consider a simple model, where and are boh I() (eq. ) If here is a linear combinaion of and ha is saionar (ha is I(0)), hen and are coinegraed. This implies ha he esimaed residuals are saionar, so ha ˆ 2 u 2 ˆ ˆ u ˆ 2 is he long - run coefficien
ECM Two seps Engle and Granger To summarize: 2 s STEP: The Engle and Granger es is done b firs running he co-inegraing regression, i.e. he long-run relaionship, using OLS, and hen es if he residual in he esimaed equaion comes ou being is saionar. If i is saionar, i indicaes ha here is a saionar coinegraing relaionship. u
Two seps 2 nd STEP: Epress he relaionship beween and wih an ECM specificaion as 3 4 uˆ The firs difference of => his variable become saionar afer he firs difference. β 3 = consan erm β 4 = shor-run coefficien, measure he immediae impac of a change in will have on a change in π = coefficien of he esimaed lagged residual of equaion ε = whie noise error erm
Two seps 3 4 uˆ π = coefficien of he esimaed lagged residual of equaion is he feedback effec, or he adjusmen effec, or error correcion coefficien and shows how much of he disequilibrium is being correced. = error correcion erm uˆ uˆ ˆ Of course Wih β 2 = long-run coefficien ˆ 2 In his case OLS perform well.
This has a nice economic inerpreaion: can wander awa from is long-run (equilibrium) pah in he shor run, bu will be pulled back o i b he ECM over he longer erm Two seps ( ) ˆ ˆ 2 4 3
One sep ECM- simple model 3 2 0 3 2 0 ) ( Consis in esimaing long-run and shor-run ogeher. Generae from original (non-saionar) series new saionar series b firs differencing Esimae he firs difference of dependen variable followed b: Lagged one period dependen and independen variables (long-run) Firs Differenced independen variable (shor-run) Tha can be rearranged (long-run) (shor-run)
When we would like o esimae long-run and shor-run ogeher in a more general model, we follow he same procedure as for he one lagged model. Generae from he original (non-saionar) series, new saionar series b firs differencing Esimae he s difference of dependen variable followed b: Lagged one period dependen and independen variables (long-run, remains he same) Firs Differenced variables and heir lags o be combined appropriael hrough a boom down approach (shor-run) Tha can be rearranged One sep ECM- more general model for large number of lagged erms i m i i i n i i 0 2 0 i m i i i n i i 0 2 0 ) (
Eample of specific case m=n=2 One sep ECM- simple model onl one lag 0 2 0 0 2 0 ) ( Check residuals and in case add dumm in presence of ouliers Wrie he long run equaion: he long run coefficiens are obained dividing he lagged independen variables b he lagged dependen variable and changing sign.
Task Task 5 Task 5.
Using he Console and Command Lines in Grel Geing lags of our variable grel Command for creaing : (-) or lags (jus add - in brake() ; or -2; -3 for more lags) (generae several lags, i.e. he number of lags will be equal o he frequenc of he daase, e.g. 4 lags in case of quarerl daa) or lags ; c (generae jus one lag for more variables, e.g. and c) or genr lag_=(-)
Using he Console and Command Lines in Grel Transform he non-saionar series ino saionar b aking he firs differences, ha is creaing a new series: grel Command for Creaing his new series: diff or series name=-(-) series name=diff() If we prefer aking firs differences in logs ldiff => ld_ is generaed ld_(-) lag period of firs difference ld_(-2) lag 2 period of firs difference
From firs differences o second differences Generae firs difference ldiff => ld_ is generaed Generae he second difference aking he diff of firs log differences diff ld_ Alernaivel Genr ldiff2_ =-2*(-) +(-2) Using he Console and Command Lines in Grel 2 2 2 2 ) ( z z z z
Using he Console and Command Lines Using a console (or a scrip) we are going o es for uni roo Use adf command o es if he variable " " has a uni roo. I compues Dicke-Fuller ess: he null hpohesis is he variable has a uni roo. adf 0 Using difference opion, ou can es he firs difference of he variable: adf 0 difference adf 0 d_ Tip: For more informaion refer o Tess in he Command Reference.
Using he Console and Command Lines Using a console (or a scrip) we are going o es for uni roo # uni roo ess for income adf 0 c # Wih consan adf 0 c # Wih cons. and rend quadraic rend adf c # Wih quadra. rend
Auoregressive models of order p are used o model ime dependence using pas realizaions Firs Order Auoregressive Model - AR() (simples case) Y c Y u Regress Y on iself (auo regressive), one lag back (firs order) grel command for esimaing an AR() Model ols Y cons Y(-) or arma 0 ; or arima 0 0 ; grel command for esimaing an AR(3) Model ols cons (-) (-2) (-3) or arma 3 0 ; or arima 3 0 0 ; arma and arima funcions will be eplained in more deail laer Behavior of Y depends on he value of ρ