|
Boost : |
From: Jeff Garland (jeff_at_[hidden])
Date: 2006-12-11 21:14:37
Eric Niebler wrote:
> I'm pleased to announce the availability of a new library for computing
> with time series (http://en.wikipedia.org/wiki/Time_series). From the
> documentation:
>
>
>> The purpose of the Boost.Time_series library is to provide data structures, numerical
>> operators and algorithms to operate on time series. A time series is a series of data
>> points, sampled at regular intervals. The library provides numerous time series containers,
>> each with different time/space trade-offs, and a hierarchy of concepts which allow the time
>> series to be manipulated generically. The library also provides operators and algorithms which
>> use the generic interfaces to perform calculations on time series and accumulate various
>> statistics about them.
>>
>> Boost.Time_series does not yet contain all the algorithms one might want in order to perform
>> full time series analysis. However, the key contribution of Boost.Time_series is the framework
>> and the rich hierarchy of concepts with which such algorithms can be written to efficiently and
>> generically process series of data with widely divergent in-memory representations and performance
>> characteristics. Boost.Time_series provides several such series containers, as well as mechanisms
>> for defining additional series types and algorithms that fit within the framework. Some examples of
>> series types that are provided are: dense, sparse, piecewise constant, heaviside and others, as well
>> as adaptors for providing shifted, scaled and clipped series views.
>
>
> The documentation can be found here:
> http://boost-sandbox.sf.net/libs/time_series/doc/html/index.html
>
> The code is in time_series.zip, which can be downloaded here:
> http://boost-consulting.com/vault/index.php?directory=Math%20-%20Numerics
>
> Any suggestions for improvements are most welcome.
>
Hi Eric -
Looks very interesting. Feedback here is based on extremely cursory look at
the docs. And I'll say that I'm not a huge domain expert on the mathematics,
but I've run into some pretty simple time series in couple of apps over the years.
In particular, I'm sorta surprised there isn't a moving average algorithm as
that's time series algorithm with a really wide applicability. Classic
example -- calculate a 10 day rolling average of the closing price of some
stock. Or calculate a 20 minute rolling average of the trading prices or
quotes. And, so on...there are all sorts of other applications for rolling
averages.
So now for the *other* question. Am I correct in seeing that with the time
series facade that I might be able to plug in a different offset_type? Of
course, what I'm thinking is for the stock price rolling average example above
you might want to use gregorian::date or posix_time::ptime to represent point
of measurement of the stock price. I wasn't finding the requirements for the
offset_type...which is what I think would need to be replaced.
I also find the Discretization intervals interesting. Is that a standard way
of handling the breakdown for statistical purposes? The thing being that only
days and weeks are actually fixed lengths in the *messy world*...months,
quarters, etc are all different depending leap years and such.
Anyway, nice job as usual :-)
Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk