Page 1 of 1

ADF test for multiple timeseries

Posted: Mon Feb 24, 2014 2:01 am
by EktaS
Dear Concerned

I have monthly stock returns series of 652 firms for 12 years and i need to check stationarity of all these stock return series individually. I run the following program to perform ADF test for each of the series using LOOP

For !i= 1 to 652
uroot(adf, const, dif=0) y{!i}
next

But when i run this program, it shows error. Please help me out to resolve it.

Re: ADF test for multiple timeseries

Posted: Mon Feb 24, 2014 11:03 am
by EViews Gareth
Hard to know what is causing the error without knowing what the error is.

Re: ADF test for multiple timeseries

Posted: Wed Mar 05, 2014 1:18 pm
by EktaS
It is showing the error message:
(adf, const, dif=0) is not defined in "uroot(adf, const, dif=0) y1"

Please help.

Re: ADF test for multiple timeseries

Posted: Wed Mar 05, 2014 3:01 pm
by EViews Glenn
I can't replicate this. Are you sure you don't have a space between the uroot command and the options "("?

Re: ADF test for multiple timeseries

Posted: Sat Mar 08, 2014 11:47 am
by EktaS
Thank you very much for the quick reply. The error was because of the space after uroot. i have corrected it.

freezing results in ADF test for multiple timeseries

Posted: Tue Apr 14, 2015 2:36 am
by angel75
Hi,

I am new to this forum (and to Eviews programming! I do that in other software), but I need it now so I hope that you can help me. Let me explain.

I have few series on which I need to run ADF test (on levels using automatic lag selection), then I need to store t- and p-values by using frozen tables; but unfortunately I get an error like "Illegal lag or index specification for UROOT(...) in "FREEZE(TAB, MODE=OVERWRITE) UROOT...". I tried to specify lags, info criteria, and maxlag without success.

I hope that you can help me! Thanks in advance. The code is attached, any comments are very welcome!

Code: Select all

group g mg ms mb m1 table urtests smpl @all 'loop through every series in the group for !i=1 to g.@count 'grab the current series name %name = g.@seriesname(!i) 'utests for all group members frozen in a tab freeze(tab, mode=overwrite) uroot(adf, trend, dif=0) {%name} 'save t-values and corresponding p-values in the corresponding frozen table, scalar t_value = @val(tab(7,4)) scalar p_value = @val(tab(7,5)) urtests(1+!i,1)=%name urtests(1+!i,2)=scalar t_value urtests(1+!i,3)= scalar p_value next

Re: ADF test for multiple timeseries

Posted: Tue Apr 14, 2015 5:56 am
by EViews Gareth

Code: Select all

freeze(tab, mode=overwrite) {%name}.uroot(adf, trend, dif=0)

Re: ADF test for multiple timeseries

Posted: Tue Apr 14, 2015 6:20 am
by angel75
Many thanks! Incidentally: no need to write "scalar" when filling table cells.
Many thanks again for the prompt replay.