ADF test for multiple timeseries

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

EktaS
Posts: 16
Joined: Fri Sep 09, 2011 4:45 am

ADF test for multiple timeseries

Postby EktaS » Mon Feb 24, 2014 2:01 am

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: ADF test for multiple timeseries

Postby EViews Gareth » Mon Feb 24, 2014 11:03 am

Hard to know what is causing the error without knowing what the error is.

EktaS
Posts: 16
Joined: Fri Sep 09, 2011 4:45 am

Re: ADF test for multiple timeseries

Postby EktaS » Wed Mar 05, 2014 1:18 pm

It is showing the error message:
(adf, const, dif=0) is not defined in "uroot(adf, const, dif=0) y1"

Please help.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: ADF test for multiple timeseries

Postby EViews Glenn » Wed Mar 05, 2014 3:01 pm

I can't replicate this. Are you sure you don't have a space between the uroot command and the options "("?

EktaS
Posts: 16
Joined: Fri Sep 09, 2011 4:45 am

Re: ADF test for multiple timeseries

Postby EktaS » Sat Mar 08, 2014 11:47 am

Thank you very much for the quick reply. The error was because of the space after uroot. i have corrected it.

angel75
Posts: 2
Joined: Thu Apr 09, 2015 8:14 am

freezing results in ADF test for multiple timeseries

Postby angel75 » Tue Apr 14, 2015 2:36 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: ADF test for multiple timeseries

Postby EViews Gareth » Tue Apr 14, 2015 5:56 am

Code: Select all

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

angel75
Posts: 2
Joined: Thu Apr 09, 2015 8:14 am

Re: ADF test for multiple timeseries

Postby angel75 » Tue Apr 14, 2015 6:20 am

Many thanks! Incidentally: no need to write "scalar" when filling table cells.
Many thanks again for the prompt replay.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests