Historical snapshots
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Historical snapshots
Hi all,
Does anyone know how to make a series of historical quarterly "snapshots"? What I mean by this is I would like to take a monthly series and create a quarterly series of "snapshots" which would be the quarterly growth rate assuming no more growth in the quarter. For example the snap shot after the second month of the quarter is thje quarterly growth rate if the third month of the quarter equals the second month of the quarter.
Any help would be appreciated.
Does anyone know how to make a series of historical quarterly "snapshots"? What I mean by this is I would like to take a monthly series and create a quarterly series of "snapshots" which would be the quarterly growth rate assuming no more growth in the quarter. For example the snap shot after the second month of the quarter is thje quarterly growth rate if the third month of the quarter equals the second month of the quarter.
Any help would be appreciated.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Historical snapshots
I don't understand. Perhaps you could provide a numerical example.
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Historical snapshots
Sure. Say the monthly evolution for gdp in Q1 is Jan:1 Feb:2 March:3. This means gdp is growing by 1 in each month. Now say the monthly evolution for gdp in Q2 is April:4 May:5 June:6. To calculate the growth rate we would take the average of the second quarter and divide by the average of the first minus 1. (4+5+6)/(1+2+3) -1
So a snapshot after getting May's data for example is the assumptiong that June gdp equals May gdp, in other words, June is also 5. In that case the snapshot for growth in Q2 would be (4+5+5)/(1+2+3) -1.
Does that make sense?
So a snapshot after getting May's data for example is the assumptiong that June gdp equals May gdp, in other words, June is also 5. In that case the snapshot for growth in Q2 would be (4+5+5)/(1+2+3) -1.
Does that make sense?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Historical snapshots
Still not 100% certain I understand what the resulting series is.
Is it a quarterly series or a monthly series? If it is quarterly, does it always assume that month 3 of the quarter is missing, and just fill it in with the value of month 2?
Is it a quarterly series or a monthly series? If it is quarterly, does it always assume that month 3 of the quarter is missing, and just fill it in with the value of month 2?
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Historical snapshots
I don't think it can be done by creating one new series because I want to have quarterly growth rates with missing monthly variables, but the missing month has to change.
The snapshot for Q2 would require replacing the third month of Q2 with the second month of Q2. This is true for every subsequent quarter. But the problem is that I need the third month to be included inthe previous quarter to calculate the growth rate.
Said another way I need Jan Feb March April May and then another May, but then next quarter I need Apr May June July August August
The snapshot for Q2 would require replacing the third month of Q2 with the second month of Q2. This is true for every subsequent quarter. But the problem is that I need the third month to be included inthe previous quarter to calculate the growth rate.
Said another way I need Jan Feb March April May and then another May, but then next quarter I need Apr May June July August August
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Historical snapshots
Something along these lines (a little overly-complex perhaps, but I think it works):
Code: Select all
create(page=mymonthly) m 1990 2010
series x = rnd
pagecreate(page=myquarterly) q 1990 2010
copy(c=f) mymonthly\x myquarterly\first
copy(c=l) mymonthly\x myquarterly\last
copy(c=s) mymonthly\x myquarterly\sum
series middle = sum-first-last
series snapshot = sum/(first(-1)+middle(-1)+middle(-1))-1
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Historical snapshots
I can't follow what this is doing.
I think the best way to do it would be to create a quarterly growth rate series from the monthly series. Can that be done? Just calculate (M4+M5+M5)/(M1=M2+M3) -1?
I think the best way to do it would be to create a quarterly growth rate series from the monthly series. Can that be done? Just calculate (M4+M5+M5)/(M1=M2+M3) -1?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Historical snapshots
Code: Select all
copy(c=f) mymonthly\x myquarterly\first
copy(c=l) mymonthly\x myquarterly\last
Code: Select all
copy(c=s) mymonthly\x myquarterly\sum
series middle = sum-first-last
Code: Select all
series snapshot = sum/(first(-1)+middle(-1)+middle(-1))-1
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Historical snapshots
I see. thanks for the explanation. The only issue is that now when I want a growth rate it will be calculating it without using the full previous quarter in the denominator. :?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Historical snapshots
Sorry, yes, I got my calculation wrong:
Code: Select all
series snapshot = (first+middle+middle)/sum(-1) -1
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Historical snapshots
Oh my goodness. This worked! Thanks a million!
Who is online
Users browsing this forum: No registered users and 2 guests
