extend a series with a moving average

For questions regarding programming in the EViews programming language.

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

eviewsuserforum
Posts: 19
Joined: Wed Apr 22, 2015 5:11 am

extend a series with a moving average

Postby eviewsuserforum » Fri Oct 09, 2015 4:37 am

Hello.

I have a workfile 2010m1 2015m12 (it is a monthly series, so).

It contains a series myser with values from 2010m1 to 2013m12.

I created a new series aveser as

Code: Select all

series aveser = @movav(myser, 12)
It returned values from 2010m1 to 2013m12 while I hoped it 'extends' up to the last date in the workfile that is 2015m12.

How can I do that, please`?

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

Re: extend a series with a moving average

Postby EViews Gareth » Fri Oct 09, 2015 8:19 am

I'm not sure I understand the calculation you're trying to perform.

But perhaps you want something like:

Code: Select all

smpl 2010 2013 series aveser = @movav(myser(-1), 12) smpl 2014 2015 series aveser = @movav(aveser(-1), 12)

eviewsuserforum
Posts: 19
Joined: Wed Apr 22, 2015 5:11 am

Re: extend a series with a moving average

Postby eviewsuserforum » Fri Oct 09, 2015 9:25 am

Thank you. It was damn easy


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests