[R-SIG-Finance] Time series temporal disaggregation (or: going from low frequency to higher frequency)
Brian G. Peterson
brian at braverock.com
Fri Oct 30 12:39:38 CET 2009
Axel Leroix wrote:
> Hi,
> This is a newbie question.
> I would to be able to convert annual time series of flow data into quarterly data. I wonder if there is any existing R-function which permits to do it? In what package ?
>
> I the archive, i found that some poeple speak about "tempDis" package for performing time series temporal disaggregation, but when I try to download it I can not found it in the list of proposed packages.
>
> Thank you in advance for your help.
>
Well, as discussed multiple times on this list, going from annual (or
any lower frequency) data to quarterly (or any higher frequency) data is
questionable at best. Think data snooping or look-ahead bias in your
modeling.
Going the other direction, from say daily (or any higher frequency) to
monthly (or any lower frequency) , is easily accomplished with to.period
for price/value data or Return.cumulative for returns data.
If you really do want to go in the black-magic direction of going from
annual to quarterly, first make sure that the "annual" data was not
first reported as monthly data or quarterly data (this is true for
almost all macroeconomic series) and then go back to the source data at
a higher frequency.
If even this is not possible, and you insist on the highly dubious
practice of taking an annual number and turning it into four quarterly
numbers, see the various na handling methods provided by the zoo
package, most likely na.approx or na.spline.
Regards,
- Brian
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock
More information about the R-SIG-Finance
mailing list