Re: Question on Path Generation for Heston Processes

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Question-on-Path-Generation-for-Heston-Processes-tp7043p7046.html

On Mon, 2009-01-19 at 16:01 +0000, sri mal wrote:

> Would the following code work, if the process is Heston Process?
>  
>         rsg_type rsg =
>         PseudoRandom::make_sequence_generator(timeSteps, seconds);
>         PathGenerator<rsg_type> generator(process, length, timeSteps,
>         rsg, false);
>         for (int k=0; k< numOfPaths; k++){
>         sample_type sample = generator.next();
>  
> When I try to use this it generate an exception. I believe the reason
> is that the Process for PathGenerator is assumed to be
> StochasticProcess1D

Yes. You need to use MultiPathGenerator.

Luigi


--

I'd never join any club that would have the likes of me as a member.
-- Groucho Marx



------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users