On Mon, 2008-12-08 at 10:33 +0100, Eye Doc wrote:
>
> I would like to know how I can define a payoff function for a basket
> opion.
> I want to price a simple basket option (call / put) on the arithmetic
> mean of the components.
You'll have to use AverageBasketPayoff, instead of passing a
PlainVanillaPayoff to the option. Something like:
PlainVanillaPayoff payoffCall = new PlainVanillaPayoff(optionType,
strikePrice);
BasketPayoff payoffBask = new AverageBasketPayoff(payoffCall, N);
BasketOption baskOption = new BasketOption(payoffBask,
europeanExercise);
where N is the number of instruments in the basket.
Luigi
--
Everything that can be invented has been invented.
-- Charles Duell, Director of U.S. Patent Office, 1899
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users