Re: sequence statistics

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/sequence-statistics-tp12025p12026.html

On Wed, 2008-07-16 at 13:15 +1000, Mark joshi wrote:
> I was testing the pathwise vegas class today and was a bit surprised
> by the slowness and memory usage.
> I eventually tracked the problem down to the SequenceStatistics class;
> storing all the values for 32768 paths
> was having a severe effect. By eliminating SequenceStatistics, I made
> the problem go away.

Yes, SequenceStatistics does carry some excess baggage.

> I do wonder if this is why some of the other market model stuff is
> running slow. Do we have alternative classes
> for gathering statistics of arrays?

To alleviate the memory problem, you could try
GenericSequenceStatistics<IncrementalStatistics> instead---and you might
want to use a typedef on that :)

Also, if you want to get some more speed, and if you don't need to call
the covariance() method on the collected array statistics, you can clone
GenericSequenceStatistics and get rid of the bit that updates the
quadraticSum_ matrix.


> And should we make it possible to choose which statistics measure to
> use in the market models code?

In principle, we should. But I've no idea at this time if it's worth the
effort.

Luigi


--

All generalizations are false, including this one.
-- Mark Twain



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev