35 v_(
LsmBasisSystem::pathBasisSystem(polynomialOrder, polynomialType)) {
42 "insufficient polynomial type");
47 const ext::shared_ptr<StrikedTypePayoff> strikePayoff
48 = ext::dynamic_pointer_cast<StrikedTypePayoff>(
payoff_);
50 if (strikePayoff !=
nullptr) {
69 std::vector<ext::function<
Real(
Real)> >
std::vector< ext::function< Real(Real)> > basisSystem() const override
Real state(const Path &path, Size t) const override
Real payoff(Real state) const
Real operator()(const Path &path, Size t) const override
std::vector< ext::function< Real(Real)> > v_
AmericanPathPricer(ext::shared_ptr< Payoff > payoff, Size polynomialOrder, LsmBasisSystem::PolynomialType polynomialType)
const ext::shared_ptr< Payoff > payoff_
single-factor random walk
Classes and functions for error handling.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
const ext::shared_ptr< Payoff > payoff_
std::size_t Size
size of a container
ext::shared_ptr< QuantLib::Payoff > payoff
American Monte Carlo engine.
Payoffs for various options.