Option Call date statistics

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Option Call date statistics

Lapin
Hi,

I am trying to add a statistic regarding the call dates during a MC simulation.
since it is a model dependent stat, I intend to add in my engine class.

What is not clear is how to add samples (in fact 1 or 0) in the Stats at the PathPricer level and should the Stats be a member of the pathPricer or the engine class?

Does anyone has a good idea of it?

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Option Call date statistics

Luigi Ballabio
On Fri, 2008-02-15 at 02:30 -0800, Yomi wrote:
> I am trying to add a statistic regarding the call dates during a MC
> simulation.
> since it is a model dependent stat, I intend to add in my engine class.
>
> What is not clear is how to add samples (in fact 1 or 0) in the Stats at the
> PathPricer level and should the Stats be a member of the pathPricer or the
> engine class?

Bonjour Guillaume,
        apologies for the delay. I'm not sure that I understand your question
fully. If you want to choose whether to add or not the result of the
PathPricer based on the 0/1 value, I'm afraid there's no easy way (short
of writing your own MonteCarloModel class.)

On the other hand, if what you mean is "I want to collect statistics on
whether or not a call was exercised", it can be done. Instead of
inheriting your path-pricer class from PathPricer<Path>, you can use
PathPricer<Path,std::vector<double> >. The path pricer should then
return a vector of 2 elements, the first being the derivative value and
the second being 0 or 1. Also, you'll have to instantiate your model
with SequenceStatistics as the statistics class. At the end,
stats.mean() will return a vector of two elements; the first will be the
average value, and the second the average of all your 0 and 1.

Luigi


--

The shortest way to do many things is to do only one thing at once.
-- Samuel Smiles



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users