Page 1 of 1

loop @movecor with series names

Posted: Fri Sep 17, 2010 7:32 am
by MSQ1
Hi,

I want to loop @movecor with series names but get get the values NA using the following code

%name1_1 = "A"
%name1_2 = "B"

for !loop1=1 to 2
%name1 = %name1_{!loop1}
series corr1 = @movcor(%name1,C,50)
next

It seems that @movecor does not understand that the name should be A and not "A" since it states the code to be
corr1 = @movcor("A",C,50) in the output and hence cannot calculate the correlations
Why?

Re: loop @movecor with series names

Posted: Fri Sep 17, 2010 8:26 am
by EViews Gareth

Code: Select all

series corr1 = @movcor({%name1},C,50)