Posted by
Dimathematician on
URL: http://quantlib.414.s1.nabble.com/boostify-QL-tp13159p13162.html
Would you please elaborate your point?
Can I do it by taking back what I said :)? I was more referring to the
calendar classes, which I think work well in QuantLib
and might not be the focus of the boost library. The simple date classes
can be taken from boost I think. In particular, because
they already have linked dates and times, see the code below
ptime now = second_clock::local_time();
date today = now.date();
date tommorrow = today + days(1);
ptime tommorrow_start(tommorrow); //midnight
time_duration remaining = tommorrow_start - now;
Regarding boost stats: I've seen the accumulator library, but found it
very painful/cryptic to use. Eg. to calculate the covariance
you need to setup a cummulator set with
accumulator_set<double, stats<tag::covariance<double, tag::covariate1>>> acc;
Or for a quantile calculation:
accumulator_set<double, stats<tag::tail_quantile<right>>> acc0(tag::tail<right>::cache_size = c);
Ferdinando Ametrano schrieb:
> On Fri, Nov 27, 2009 at 12:29 PM, Dima <
[hidden email]> wrote:
>
>> I'm not sure whether we should switch to boost's date library.
>>
>
> Would you please elaborate your point ?
>
>
>> Also, I
>> haven't seen how signals could potentially
>> replace observer/observables.
>>
>
> I might be completely wrong here as I'm not familiar about boost
> signal/slot, anyway according to wikipedia it's one implementation of
> the observer pattern:
>
http://en.wikipedia.org/wiki/Observer_pattern>
>
>> As a first step, I'd really suggest
>> to replace the distribution functions with
>> the one in boost. This is I think easy to do and would be the first
>> boostification step.
>>
>
> and since I forgot in my first email, please let me add that also the
> boost stats classes might be an improvement.
> Maybe even a performance improvement in MC when you only need mean and
> variance and don't need the higher moments which are calculate in QL
> stat classes
>
> ciao -- Nando
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev