Dear Friends on the Forum,
I have monthly data of inflation rates from 1985M01 to 2008m12. I would like to convert it into quarterly inflation rate. Any help on coding it in RATS is very much appreciated.
Converting Monthly inflation rate to Quarterly Rate
-
turkhanali
- Posts: 15
- Joined: Fri Jul 17, 2009 1:47 am
Re: Converting Monthly inflation rate to Quarterly Rate
If taking the arithmetic average (or sum) of the monthly rates will suffice, then that will happen automatically if you read the monthly data into a quarterly "CALENDAR". That would be exactly correct if the rates were expressed in continuous compounding terms and will be approximately correct if the rates are all fairly small (less than about 5% per year).
Given that inflation rates are generally computed by annualizing a month to month change in a price index, you can compute the quarterly changes in the price index by something like:
monthly is a series of randomly drawn "inflation" rates expressed in percentage on an annual basis. factor transforms them into gross month to month factors, and quarter aggregates those and transforms into quarterly rates in percentages on an annualized basis.
If you want to compress that into a quarterly data set, you can do:
and then export/copy/save to RATS file, the series quarterly.
Given that inflation rates are generally computed by annualizing a month to month change in a price index, you can compute the quarterly changes in the price index by something like:
Code: Select all
cal(m) 1990:1
set monthly 1990:1 2010:4 = 1200.0*(.003+%ran(.002))
*
set factor = 1+monthly/1200.0
set quarter = ((factor*factor{1}*factor{2})-1)*400.0If you want to compress that into a quarterly data set, you can do:
Code: Select all
sample(smpl=%clock(%period(t),3)==3) quarter / quarterly
cal(q) 1990:1