30 :
payoff_(type, strike), discount_(discount),
31 runningSum_(runningSum), pastFixings_(pastFixings) {
33 "strike less than zero not allowed");
50 Real averagePrice = sum/fixings;
PlainVanillaPayoff payoff_
ArithmeticAPOPathPricer(Option::Type type, Real strike, DiscountFactor discount, Real runningSum=0.0, Size pastFixings=0)
Real operator()(const Path &path) const override
single-factor random walk
const TimeGrid & timeGrid() const
time grid
const std::vector< Time > & mandatoryTimes() const
#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
Monte Carlo engine for discrete arithmetic average price Asian.
Monte Carlo engine for discrete geometric average price Asian.