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
Product Series
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Product Series
You need the cumulative product? Take logs, use the cumulative sum, then exponentiate the result.
Something like:
Something like:
Code: Select all
series prod = @exp(@cumsum(@log(r)))
Who is online
Users browsing this forum: No registered users and 2 guests
