Hi,
I have a series of 10000 MC simulations of growth rates for 5 years 2013, 2014, 2015, 2016, 2017. I want to create a series of the cumulative growth rate over the 5 year period for each simulation (i.e a series of 2000 cumulative growth rates). Any idea of options to do this?
Thanks!
Cumulative Series of MC Simulations
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- EViews Developer
- Posts: 563
- Joined: Thu Apr 25, 2013 7:48 pm
Re: Cumulative Series of MC Simulations
Hello,
Could you elaborate on how your data is currently organized?
Could you elaborate on how your data is currently organized?
Re: Cumulative Series of MC Simulations
Hi Matt - thanks for getting back to me. Yes - the MC simulations are in a separate tab so there is 10000 series of say
1 - 2013 8.6
1- 2014. 6.1
1- 2015. 5.3
1- 2016. 4.7
1- 2017. 5.1
2- 2013. 4.9
2- 2014 .......
I basically want to get distribution of of the 5 year cumulative growth rates based on simulations.
Any ideas ?
1 - 2013 8.6
1- 2014. 6.1
1- 2015. 5.3
1- 2016. 4.7
1- 2017. 5.1
2- 2013. 4.9
2- 2014 .......
I basically want to get distribution of of the 5 year cumulative growth rates based on simulations.
Any ideas ?
-
- EViews Developer
- Posts: 563
- Joined: Thu Apr 25, 2013 7:48 pm
Re: Cumulative Series of MC Simulations
To begin, you can create a series that holds the cumulative growth for all years ("x" is your growth series):
Since you're only interested in the cumulative growth in the last year (every fifth observation), it's probably easiest to first copy that subset of the above series to a vector and then copy the vector into your new, smaller series on a different page.
Code: Select all
series cum_growth = @recode(@mod(@obsid, 5) = 1, x, 100 * ((1 + cum_growth(-1) / 100) * (1 + x / 100) - 1))
Since you're only interested in the cumulative growth in the last year (every fifth observation), it's probably easiest to first copy that subset of the above series to a vector and then copy the vector into your new, smaller series on a different page.
Re: Cumulative Series of MC Simulations
You’re a star Matt! Thanks so much for this. Much appreciated
Who is online
Users browsing this forum: No registered users and 26 guests