Product Series

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

VictorV
Posts: 14
Joined: Thu May 24, 2012 6:16 am

Product Series

Postby VictorV » Thu May 24, 2012 6:28 am

I'm having great difficulty building a series with interest rate r where I need the product from i=1 to t of ( 1+r_i ).
Using the comment @prod(x) gives just the total product of the whole series and not a new series where the entry at time t equals the product of the previous entries.
Could anyone help me out with this?
Thanks

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

Re: Product Series

Postby EViews Gareth » Thu May 24, 2012 7:50 am

You need the cumulative product? Take logs, use the cumulative sum, then exponentiate the result.

Something like:

Code: Select all

series prod = @exp(@cumsum(@log(r)))

VictorV
Posts: 14
Joined: Thu May 24, 2012 6:16 am

Re: Product Series

Postby VictorV » Fri May 25, 2012 12:15 am

Thanks!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests