Re: Returning multiple values from a Monte-Carlo pricing engine

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Returning-multiple-values-from-a-Monte-Carlo-pricing-engine-tp9175p9176.html

On Wed, 2010-11-24 at 10:46 +0000, Simon Ibbotson wrote:
> Is there any existing way for returning multiple values from a
> MonteCarlo simulation? I can’t see a way for any of the existing
> pricing engines.

No, existing ones don't do that.


> As far as I can see, I’d have to:
>
> Define a different traits (mctraits.hpp) struct which used a
> PathPricer<path_type, VECTOR return type>.
>
> Use a GenericSequenceStatistics<GaussianStatistics> class (instead of
> a GenericRiskStatistics<GaussianStatistics> class).

True and true.


> Then either
>
> a)       Define arithmetic operations for the VECTOR return type or
>
> b)       Write parts of MonteCarloModel specialised (via class
> template) for the particular traits class.

No, I don't think you need to do that.  SequenceStatistics doesn't do
statistics on the passed vectors as such, it just maintains a set of 1-D
statistics.  This part should just work.

Let me know how it goes,
        Luigi


--

Better to have an approximate answer to the right question than a
precise answer to the wrong question.
-- John Tukey as quoted by John Chambers



------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev