Illegal length specification for @MOV
Posted: Tue Aug 11, 2015 8:00 am
Hi,
I have the following code:
!window = 1300
group g_ma
for !i=1 to group01_rates.count
%name=group01_rates.@seriesname(!i)
series {%name}_ma = @movav({%name}, !window+1)
g_ma.add {%name}_ma
next
As you can see I am just computing simple moving averages of the series in my group. The range has 4832 observations. When I have a window size of 720 it works, also works for 1000. It seems to randomly fail for some numbers, it fails for 1200 and 1300 for example but works for 1100. The error message is Illegal length specification for @MOVAV, @MOVSUM, or @LAG in "SERIES {%NAME}_MAV = @MOVAV(<seriesname>, 1300+1). I don't understand why it is failing when the number of observations is greater than my lag. Am i missing something terribly obvious?? Thanks!
I have the following code:
!window = 1300
group g_ma
for !i=1 to group01_rates.count
%name=group01_rates.@seriesname(!i)
series {%name}_ma = @movav({%name}, !window+1)
g_ma.add {%name}_ma
next
As you can see I am just computing simple moving averages of the series in my group. The range has 4832 observations. When I have a window size of 720 it works, also works for 1000. It seems to randomly fail for some numbers, it fails for 1200 and 1300 for example but works for 1100. The error message is Illegal length specification for @MOVAV, @MOVSUM, or @LAG in "SERIES {%NAME}_MAV = @MOVAV(<seriesname>, 1300+1). I don't understand why it is failing when the number of observations is greater than my lag. Am i missing something terribly obvious?? Thanks!