Guillaume,
first of all, apologies for the delay.
On Tue, 2008-07-01 at 01:40 -0700, Yomi wrote:
> I have created different engiens based on the MC simulation framework.
> I am experiencing some convergence issues. If I increase the number of steps
> the Max Time Step by year, the price starts to diverge. An example would be
> the following graph:
>
>
http://www.nabble.com/file/p18211801/MC%2Bissues.jpg
>
> I have the following questions:
>
> 1. have you ever encountered such issues?
Not that I remember. Did you try doing the same with one of the engines
in the library? Do they have the same behavior?
> 2. How to use the error estimate? Whatever the RNG I put (Low
> Discrenpancies, Pseudo Random...) I can nto access the error which might be
> usefull.
Your engine should access it from the model and write it into the
results. In your engine's calculate() method, you probably have
something like:
this->results_.value = this->mcModel_->sampleAccumulator().mean();
after that, you'll have to add:
if (RNG::allowsErrorEstimate)
this->results_.errorEstimate =
this->mcModel_->sampleAccumulator().errorEstimate();
(see MCVanillaEngine::calculate() for an example.) Once you've done
that, you should be able to call the errorEstimate() method in your
instrument (note that you'll only have a result if you use the
PseudoRandom traits.) If this doesn't work, check that your
instrument's fetchResults() method (if it exists) calls the base
Instrument::fetchResults() method.
Luigi
--
standards, n.:
The principles we use to reject other people's code.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users