26 ext::shared_ptr<PathPayoff>&
payoff,
27 std::vector<Size> timePositions,
31 forwardTermStructures_(
std::move(forwardTermStructures)), discounts_(
std::move(discounts)) {}
40 QL_REQUIRE(numberOfAssets > 0,
"there must be some paths");
46 for (
Size i = 0; i < numberOfTimes; ++i) {
48 for (
Size j = 0; j < numberOfAssets; ++j)
49 path[j][i] = multiPath[j][pos];
52 Array values(numberOfTimes, 0.0);
56 std::vector<Array> states;
64 return discountedPayoff;
1-D array used in linear algebra.
ext::shared_ptr< PathPayoff > payoff_
std::vector< Handle< YieldTermStructure > > forwardTermStructures_
std::vector< Size > timePositions_
Real operator()(const MultiPath &multiPath) const override
EuropeanPathMultiPathPricer(ext::shared_ptr< PathPayoff > &payoff, std::vector< Size > timePositions, std::vector< Handle< YieldTermStructure > > forwardTermStructures, Array discounts)
Shared handle to an observable.
Matrix used in linear algebra.
Correlated multiple asset paths.
template class providing a null value for a given type.
#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
Path-dependent European basket MC engine.
Real DotProduct(const Array &v1, const Array &v2)