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

efficient computation of adf test
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 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

slide-2
SLIDE 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

slide-3
SLIDE 3

ADF test Recent works and applications Octave implementation Concluding remarks Traditional approach A new approach

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 yt is I(1) against the null hypothesis that the it is I(0). In

  • rder to perform an Unit Root test, the following regression is

estimated: ∆Yt = βDt + φYt−1 −

p

  • j=1

αj∆Yt−j + ǫt where: Dt are deterministic terms ∆Yt−j captures serial correlation

Athanassios Stavrakoudis UOI-GRID 23/4/07

slide-4
SLIDE 4

ADF test Recent works and applications Octave implementation Concluding remarks Traditional approach A new approach

Typical procedure of ADF test

∆Yt = φYt−1 + α1∆Yt−1 + α2∆Yt−2 + . . . + αp∆Yt−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

slide-5
SLIDE 5

ADF test Recent works and applications Octave implementation Concluding remarks Traditional approach A new approach

The problem

Consider the estimation of the regression model: ∆Yt = φYt−1 + α1∆Yt−1 + α2∆Yt−2 + α3∆Yt−3 + ǫt With the following results (parantheses indicate t-statistic):

  • ∆Yt = 5.0Yt−1

(−4.85)

+ 1.2∆Yt−1

(−2.10)

+ 0.5∆Yt−2

(−0.10)

+ 3.1∆Yt−3

(−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

slide-6
SLIDE 6

ADF test Recent works and applications Octave implementation Concluding remarks Traditional approach A new approach

The new approach

The approach is based on Dynamic OLS:

1 Consider an adequate large number of ∆Yt lags, say ∆Yt−20. 2 Estimate all possible combinations of the model, either with

  • r 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

slide-7
SLIDE 7

ADF test Recent works and applications Octave implementation Concluding remarks Traditional approach A new approach

A small example

For example, consider the following models, if p = 2: ∆Yt = φYt−1+ ǫt (1) ∆Yt = φYt−1+ α1∆Yt−1+ ǫt (2) ∆Yt = φYt−1+ α2∆Yt−2+ ǫt (3) ∆Yt = φYt−1+ α1∆Yt−1+ α2∆Yt−2+ ǫt (4)

Athanassios Stavrakoudis UOI-GRID 23/4/07

slide-8
SLIDE 8

ADF test Recent works and applications Octave implementation Concluding remarks Traditional approach A new approach

Demand for computer power

The new approach demands a lot of resources! A typical sample of macroeconomic data has about 50-200

  • bservations, so approximately 100 points must be examined

for structural break. With p = 10, each point has 210 ≈ 103, so for the whole sample ≈ 105 OLS runs must be performed. This can be done in minutes in a deskop PC (Pentium 4). With p = 20, each point has 220 ≈ 106, so for the whole sample ≈ 108 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

slide-9
SLIDE 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

slide-10
SLIDE 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

slide-11
SLIDE 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

slide-12
SLIDE 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

slide-13
SLIDE 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

slide-14
SLIDE 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

slide-15
SLIDE 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