[R-SIG-Finance] Solicitation of opinions on which Timeseries object(s) to utilize.

Brian G. Peterson brian at braverock.com
Sun Jan 20 18:52:21 CET 2008


Joe W. Byers wrote:
> I am soliciting your opinions on the different time series objects as to 
> which you prefer, or which you do not prefer.  I have been using 
> dataframes and date columns to handle my timeseries processes for awhile 
> now, and recently began experimenting with different timeseries 
> packages, mainly: zoo, ts, tseries, Rmetric's timeSequences, and 
> rseries.  There are two reasons for my change here
> 1.  Utilize the object oriented components of these packages,
> 2.  Standardization for handling the nuances of my time series data.
> 
> 
> Both of these are important, but the second one is specific to my 
> industry: Energy.  I work with assets where the transfer of physical 
> molecules occur over time (ratable) under constraints, not immediately 
> as with fixed income and equities.  I have assets that settle yearly, 
> qrtly, monthly, weekly, balance of the week, balance of the month, 
> daily, hourly, and as low as 5 minute intervals.  I have assets where 
> the underlying is spread over different regions or zones, and the 
> underlying is the asset, an average, an index, a lookback, and many 
> more.  All of these require careful manipulation of the timeseries with 
> great care for calendars to maintain integrity of the system where the 
> energy asset is located.
> 
> I could continue babbling on about my issues but will leave it here with 
> this introduction.  I would appreciate any and all comments.  Also, if 
> this topic should be on the r-users mailing list, I do apologize for my 
> indiscretion. I thought this would be better since the underlying data 
> is financial/business in nature.

I think that this is the right venue for this discussion.

I think that ts and tseries can be basically written off in favor of 
zoo, which is much better and fully backwards compatible because of 
robust as. methods and proper use of reclass()

I would *like* to say that the Rmetrics timeSeries class is the right 
one for your needs, because of its support for multiple financial 
centers.  If you have intraday-data from multiple locations around the 
world and need to line it all up, timeseries is currently the only class 
that will solve your problems.

That said, timeSeries has some serious interoperability issues with the 
rest of R.  These could be easily solved with some as. (most notably an 
as.zoo method that worked well) methods, but those haven't been publicized.

Jeff Ryan recently published an extension to zoo called xts.  I think it 
might address many of the issues you describe, as well as offering 
better compatibility between timeSeries and zoo.  It also has many 
features for manipulating the periods (days,weeks,moths,quarters) that 
should be highly useful for the application you describe.

Regards,

    - Brian



More information about the R-SIG-Finance mailing list