Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Help-on-Multi-Asset-Options-tp11751p11754.html
On Dec 22, 2007, at 7:28 PM, Andrea wrote:
> Thank you for your answer. I have started working on the
> MCBasketEngine.
> I will create a new Payoff implementing the methods I needs and we'll
> see if it is any good.
>
> I think a product should
>
> 1) tell the engine on which dates it needs the values of how many
> underlyings.
True. This can be done in the setupArguments() method of the product by
storing the relevant dates in the arguments structure contained in the
engine (if you're not yet familiar with how the Instrument and
PricingEngine class work together, look at the draft of chapter 2
available at
<
http://luigi.ballabio.googlepages.com/qlbook>
> 2) the mc engine should generate a matrix of that many underlyings on
> those dates (removing the extra timesteps simulated only for a
> discretization schemes) and pass it to the product.
Yes. For this, you can use the MultiPathGenerator class. Given the
dates and the dynamics of the underlyings, it will generate a MultiPath
instance containing the underlying values. However, you shouldn't pass
it to the product, but rather to an instance of a class derived from
PathPricer (which the product will instantiate.)
> 3) the product should then return how much it pays on some final date.
True, with 'product' replaced by 'path pricer'.
Let me know how it goes. In the meantime, have a merry Christmas.
Luigi
-------------------------------------------------------------------------
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-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev