Boost logo

Boost :

From: Tom Brinkman (reportbase_at_[hidden])
Date: 2004-06-02 01:24:07


I've created a library for data series calculation and
analysis.

I've received permission to open-source the library
and I would like
to submit it for review to the boost if there is
sufficient interest.

Simple Example 1:
Calculate the 10-day simple-moving-average of the 15
exponential-moving-average.
(Demonstrates: boost::algorithm::compose).

std::vector<double> v1;
v1 += 3,4,4,6,7,8,4,7,8,3,2,3,2,5;

typedef boost::algorithm::compose<double,
boost::function<double (double)>,
        boost::function<double (double)> > COMPOSE;
        
std::vector<double> v;
std::transform(v1.begin(), v1.end(),
std::back_inserter(v),
        COMPOSE(moving_average(15),
exponential_moving_average(10)));
        

Simple Example 2 (contrived):
* Add 100 to the results from above.
* then divide by 100,
* then subtract by 100,
* then multiply by 100.

std::vector<double> v1;
v1 += 3,4,4,6,7,8,4,7,8,3,2,3,2,5;

typedef boost::algorithm::compose<double,
boost::function<double (double)>,
                boost::function<double (double),
boost::function<double (double),
                        boost::function<double (double)> > COMPOSE2;
                
std::vector<double> v2;
std::transform(v.begin(), v.end(),
std::back_inserter(v2),
        COMPOSE2(_1 += 100, _1 /= 100, _1 -= 100, _1 *=
100));
        

Here is a paritial list of functors currently provided
by the library. Many
additional functors have been written but are fairly
specific to our problem domain.

moving_average
triangle_moving_average
rate_of_change
momentum
vertical_horizontal_filter
volatility
weighted_moving_average
exponential_moving_average
variable_moving_average
accumulate_n
relative_strengh_index
cumulative_sum
max_numeric_limit
variance
standard_deviation
correlation
z_score

Please tell me if there is any interest in this
library. I will boostify it
and submit it for review if there is sufficient
interest.

Regards,
Tom Brinkman

        
                
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk