efficient computation of adf test
play

Efficient computation of ADF test: The need of big computer power in - PowerPoint PPT Presentation

ADF test Recent works and applications Octave implementation Concluding remarks Efficient computation of ADF test: The need of big computer power in economics Athanassios Stavrakoudis Department of Economics University of Ioannina


  1. ADF test Recent works and applications Octave implementation Concluding remarks Efficient computation of ADF test: The need of big computer power in economics Athanassios Stavrakoudis Department of Economics University of Ioannina http://195.130.120.120.178/stavrakoudis/ April 23, 2007 Athanassios Stavrakoudis UOI-GRID 23/4/07

  2. ADF test Recent works and applications Octave implementation Concluding remarks 1 ADF test Traditional approach A new approach 2 Recent works and applications 3 Octave implementation 4 Concluding remarks Athanassios Stavrakoudis UOI-GRID 23/4/07

  3. ADF test Recent works and applications Traditional approach Octave implementation A new approach Concluding remarks Augmented Dickey-Fuller test Assuming that dynamics of the data have, in general, an ARMA structure, then, the ADF test tests the null hypothesis that a time series y t is I (1) against the null hypothesis that the it is I (0). In order to perform an Unit Root test, the following regression is estimated: p � ∆ Y t = β D t + φ Y t − 1 − α j ∆ Y t − j + ǫ t j =1 where: D t are deterministic terms ∆ Y t − j captures serial correlation Athanassios Stavrakoudis UOI-GRID 23/4/07

  4. ADF test Recent works and applications Traditional approach Octave implementation A new approach Concluding remarks Typical procedure of ADF test ∆ Y t = φ Y t − 1 + α 1 ∆ Y t − 1 + α 2 ∆ Y t − 2 + . . . + α p ∆ Y t − p + ǫ t 1 Start with a sufficient large number of lags and estimate with OLS the regression model. 2 If the t-statistics of the last lag is statistically significant stop here and accept this as a ”good” model. Otherwise, drop this lag from the model and re-estimate. 3 Repeat the step 2 until t-statistics of the last lag is statistically significant. 4 Record the t-statistics of the φ coefficient and compare it with critical values, in order to accept or reject the hypothesis of I (1). Athanassios Stavrakoudis UOI-GRID 23/4/07

  5. ADF test Recent works and applications Traditional approach Octave implementation A new approach Concluding remarks The problem Consider the estimation of the regression model: ∆ Y t = φ Y t − 1 + α 1 ∆ Y t − 1 + α 2 ∆ Y t − 2 + α 3 ∆ Y t − 3 + ǫ t With the following results (parantheses indicate t-statistic): � ∆ Y t = 5 . 0 Y t − 1 + 1 . 2∆ Y t − 1 + 0 . 5∆ Y t − 2 + 3 . 1∆ Y t − 3 ( − 4 . 85) ( − 2 . 10) ( − 0 . 10) ( − 2 . 40) The problem is the acceptance of the model despite of the presence of a coefficient with pure t-statistic. Athanassios Stavrakoudis UOI-GRID 23/4/07

  6. ADF test Recent works and applications Traditional approach Octave implementation A new approach Concluding remarks The new approach The approach is based on Dynamic OLS: 1 Consider an adequate large number of ∆ Y t lags, say ∆ Y t − 20 . 2 Estimate all possible combinations of the model, either with or without the presence of each lagged variable. 3 Save the model for further consideration if (and only if) all coefficients are statistically significant (t-statistics). 4 Keep the model with the biggest absolute value of the t-statistics corresponding to φ 5 Repeat steps 2-4 for all data points. Report the structural break at the point with the biggest absolute value of the t-statistics corresponding to φ . Athanassios Stavrakoudis UOI-GRID 23/4/07

  7. ADF test Recent works and applications Traditional approach Octave implementation A new approach Concluding remarks A small example For example, consider the following models, if p = 2: ∆ Y t = φ Y t − 1 + (1) ǫ t ∆ Y t = φ Y t − 1 + α 1 ∆ Y t − 1 + ǫ t (2) ∆ Y t = φ Y t − 1 + α 2 ∆ Y t − 2 + (3) ǫ t ∆ Y t = φ Y t − 1 + α 1 ∆ Y t − 1 + α 2 ∆ Y t − 2 + ǫ t (4) Athanassios Stavrakoudis UOI-GRID 23/4/07

  8. ADF test Recent works and applications Traditional approach Octave implementation A new approach Concluding remarks Demand for computer power The new approach demands a lot of resources! A typical sample of macroeconomic data has about 50-200 observations, so approximately 100 points must be examined for structural break. With p = 10, each point has 2 10 ≈ 10 3 , so for the whole sample ≈ 10 5 OLS runs must be performed. This can be done in minutes in a deskop PC (Pentium 4). With p = 20, each point has 2 20 ≈ 10 6 , so for the whole sample ≈ 10 8 OLS runs must be performed. This needs a week or two, in a deskop PC. Always have in mind that ADF test is only a small part of the “Results” in a paper. Just a small paragraph! It is not so good waiting for 10 days for this small paragraph! Athanassios Stavrakoudis UOI-GRID 23/4/07

  9. ADF test Recent works and applications Octave implementation Concluding remarks Sample data Real imports and exports of the USA economy Athanassios Stavrakoudis UOI-GRID 23/4/07

  10. ADF test Recent works and applications Octave implementation Concluding remarks Works under preparation Quartely data (1960:1-2006:2) of the USA economy were used. Tsoka Agathi, Dimitris Hatzinikolaou and Athanassios Stavrakoudis Further evidence on the sustainability of the U.S. current account deficit Manou Maria, Dimitris Hatzinikolaou and Athanassios Stavrakoudis Further evidence on the sustainability of the U.S. budget deficit Athanassios Stavrakoudis A new procedure for efficient lag selection of the ADF test Athanassios Stavrakoudis UOI-GRID 23/4/07

  11. ADF test Recent works and applications Octave implementation Concluding remarks Ecometric computations with Octave Octave is a Matlab clone distributed under the GPL lisence. Last years, as other GNU related software, gained a lot of attention among econometricians. It runs in all main platforms, and there is also a parallel version (LAM/MPI). Michael Creel (Barcelona, Spain) has build a KNOPPIX setup with parallel Octave. You can have a Linux based cluster within minutes (It took more than hour to me). http://pareto.uab.es/mcreel/ParallelKnoppix/ All the codes about ADF test presented here were implemented in Octave. Athanassios Stavrakoudis UOI-GRID 23/4/07

  12. ADF test Recent works and applications Octave implementation Concluding remarks Advantages of using Octave As a matrix language, it is deal for econometric problems, since most formulations are in linear algebra. It has a lot of similarities with Matlab and Gauss, two commercial matrix languages that econometricians use. It is shipped with source code: it is easy to write an extension. It runs in almost all platforms. Octave scripts can be executed in parallel mode. It comes for free. Athanassios Stavrakoudis UOI-GRID 23/4/07

  13. ADF test Recent works and applications Octave implementation Concluding remarks Sample code T = length(y); maxlag = 16; T1 = round(0.15*T); T2 = T - T1; constant = ones(T,1); trend = (1:T)’; while (t <= T2) dummy = [zeros(t,1); ones(T-t,1)]; shiftx = (dummy*ones(1,length(x(1,:)))).*x; x1 = [ constant dummy x shiftx ]; [tp1(t-T1+1), tp2(t-T1+1)] = adftest(y,x1, maxlag); ++t; endwhile Athanassios Stavrakoudis UOI-GRID 23/4/07

  14. ADF test Recent works and applications Octave implementation Concluding remarks Concluding remarks Nowdays, more and more econometric problem need big comuting power. This need grows faster than computer power grows. Linux cluster may provide a framework for fast econometric computations. Grid enviroments may also provide a solution, even better, if well configured and easily accessible by researchers. Athanassios Stavrakoudis UOI-GRID 23/4/07

  15. ADF test Recent works and applications Octave implementation Concluding remarks Acknowledgements I would like to thank you: Dr Theodore Simos and Dr Dimitrios Hatzinikolaou for helpfull discussions. Mrs Agathi Tsoka and Mrs Maria Manou, Msc students of Department of Economics (2005-6). Organization commitee for the kind invitation. All of you... Athanassios Stavrakoudis UOI-GRID 23/4/07

Recommend


More recommend