|
From: Jonathan S. <sw...@gm...> - 2022-02-26 05:11:50
|
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 > |