rolling product

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

rolling product

Postby javiersan » Thu Feb 10, 2011 7:51 am

Is there any function that allows to calculate the rolling product of the past n obervations? (in a similar way to @movsum or @movcor, something like @prod but with the rolling concept). I have monthly inflation rates and I want to calculate the index y/y value (i.e. the product of (1+i1)(1+i2)(1+i3)...(1+i12) -1).

Thanks,

Javier

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: rolling product

Postby trubador » Thu Feb 10, 2011 8:42 am

Something like the following should do the trick:

Code: Select all

series yoy = 100*(exp(@movsum(log(1+inf/100),12))-1)

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Re: rolling product

Postby javiersan » Thu Feb 10, 2011 8:51 am

very clever!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests