Posted by
Gísli Sigurbjörn Óttarsson KB banki on
URL: http://quantlib.414.s1.nabble.com/Path-generation-tp4816p4818.html
Thanks Luigi. I had missed this line in the MonteCarlo class.
The Russian Roulette feature may come in handy, but have your considered whether the incessant multiplication by 1.0 may carry with it a performance overhead?
Best regards
Gisli
-----Original Message-----
From: Luigi Ballabio [mailto:
[hidden email]]
Sent: 31. maí 2006 12:40
To: Gísli Sigurbjörn Óttarsson KB banki
Cc: quantlib-users
Subject: Re: [Quantlib-users] Path generation
On 05/30/2006 12:29:23 PM, Gísli Sigurbjörn Óttarsson KB banki wrote:
> I have been trying to understand path generation for Monte Carlo
> simulation. Specifically, I´ve been wondering about the purpose of
> weights. As far as I can tell, the random sequences that are used to
> construct the paths have weights, both on individual points and on the
> sequence as a whole.
>
> Where are these weights used and when are they != 1.0?
Gisli,
they are used when collecting statistics during the Monte Carlo run (if you look at the MonteCarloModel::addSamples method, you'll find
sampleAccumulator_.add(price, path.weight);
somewhere in there.)
As to when they are not 1.0, well, nowhere in the current code. The weight parameter is there in case someone wants to use tricks such as Russian Roulette (not putting the weight would have forbidden to use such techniques.) But no such method is implemented at this time.
Later,
Luigi
----------------------------------------
I hate quotations.
-- Ralph Waldo Emerson