On Tue, 2007-11-06 at 00:38 -0800, Yomi wrote:
> I have added a monte carlo engine to price a kind of autocall note.
> Roughly it has some call dates (bermudans) at which you redeem the note if
> the spot is above the strike.
>
> I have a trouble with both the grid generation and the computing time.
> Let's imagine I have a 1 year note, which may redeem at 3M, 6M, 9M and 1Y.
> I have 4 dates, so I put 4 time step in my MC engine.
> Most of the time, I will get an exception saying the grid is inadequate
> since my node do not fall on a call date.
You're probably generating the time grid with four equally-spaced steps.
Instead, you need to calculate a vector of node times beforehand and
pass it to the TimeGrid constructor.
Luigi
--
Dealing with failure is easy: work hard to improve. Success is also
easy to handle: you've solved the wrong problem. Work hard to improve.
-- Alan Perlis
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users