Re: Path generation
Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Path-generation-tp4816p4820.html
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