|
From: Mohammad Shoja-t. <msh...@gm...> - 2022-03-10 17:39:45
|
erm... Looking into this a bit more closely, I actually think a PlainVanillaPayoff can be used, but I need a new pricer. My pricer should be very similar to ArithmeticAPOPathPricer but should calculate S*(1-C/Avg) and pass that to the payoff, strike is zero in this case. On Sat, Feb 26, 2022 at 5:11 AM Jonathan Sweemer <sw...@gm...> wrote: > Hi Mohammad, > > There's a test suite for pricing various kinds of averaging (Asian) > options under different engines that you can use as a reference. > > > https://github.com/lballabio/QuantLib/blob/master/test-suite/asianoptions.cpp > > Not sure whether the available payoff types can fully capture the > expression that you require. If not, then you may have to extend one of the > payoff types and pass it into the instrument constructor instead of what > you see in the test suite. > > Jonathan > > > On Sat, Feb 26, 2022 at 1:09 AM Mohammad Shoja-talab < > msh...@gm...> wrote: > >> Hi All, >> >> I'd like to price a payoff which looks like this: max( S - C * S/Avg(S), >> 0) >> Where S is the spot price, Avg(S) is average of spot price in specified >> (future) fixing dates and C is a constant. How best can I do that using >> quantlib? >> >> Thanks >> >> -- >> Mo Shoja >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > -- Mohammad Shojatalab |