Re: basket multi path generator

Posted by aincze on
URL: http://quantlib.414.s1.nabble.com/basket-multi-path-generator-tp6853p6855.html

Hi,

you could have an idea from the following piece of code, where you can define
two correlated stochastic processes.

hope it helps you,
André



// Creation of 2 stocastic processes (BlackScholes)
std::vector<boost::shared_ptr<StochasticProcess1D> > processes(noAssets);
processes[0] = boost::shared_ptr<StochasticProcess1D>(
new
BlackScholesProcess(underlyingH1,flatDividendTS1,flatTermStructure1,flatVolTS1));
processes[1] = boost::shared_ptr<StochasticProcess1D>(
new
BlackScholesProcess(underlyingH2,flatDividendTS2,flatTermStructure2,flatVolTS2));


boost::shared_ptr<StochasticProcess> process =
boost::shared_ptr<StochasticProcess>(new StochasticProcessArray(processes,
indexStatistics.correlation()));


****

> Hello everyone,
>
> I'm trying to code basket(2 stocks) path generator using MC.
> Is it alreay implemented in Quantlib?
> All I found is for 1-D or for no correlation.
>
> Regards,
> Geonhak. Lee
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users