I've got a series of numbers. Example 0.02, 0.03, 0.04, 0.05...
I need to be able to have a formula that does this:
((1+ 0.02) * (1 + 0.03) * (1 + 0.04) * (1+0.05)) - 1
The point is to get a return over the period.
The data is in a time series.
I'm using EViews 8
I need to be able to easily adjust the "window" over which the items are multiplied (sometimes I need the rolling 12 months, sometimes 36)...
I'm thinking that an @something function would work for this, but I can't figure it out.
Can someone please help me?
K
Simple Question Regarding Moving Product
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Simple Question Regarding Moving Product
Something like
should work. Note that the moving sum is backward, which you can adjust if necessary, by using leads.
Code: Select all
series z = @exp(@movsum(@log(1+x), 10)) - 1
Last edited by EViews Glenn on Wed May 20, 2015 2:17 pm, edited 1 time in total.
Re: Simple Question Regarding Moving Product
Works perfectly! Thank you for the response... Made my day!
Who is online
Users browsing this forum: No registered users and 2 guests
