28 std::vector<Size> fixingIndices,
31 :
payoff_(type, strike), discount_(discount), fixingIndices_(
std::move(fixingIndices)),
32 runningProduct_(runningProduct), pastFixings_(pastFixings) {
34 "strike less than zero not allowed");
38 const Path& path = multiPath[0];
42 Real averagePrice = 1.0;
49 Real price = path[fixingIndice];
50 if (product < maxValue/price) {
53 averagePrice *= std::pow(product, 1.0/fixings);
58 averagePrice *= std::pow(product, 1.0/fixings);
PlainVanillaPayoff payoff_
GeometricAPOHestonPathPricer(Option::Type type, Real strike, DiscountFactor discount, std::vector< Size > fixingIndices, Real runningProduct=1.0, Size pastFixings=0)
std::vector< Size > fixingIndices_
Real operator()(const MultiPath &multiPath) const override
Correlated multiple asset paths.
single-factor random walk
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
const ext::shared_ptr< Payoff > payoff_
Real DiscountFactor
discount factor between dates
std::size_t Size
size of a container
Heston MC engine for discrete geometric average price Asian.