26 : discount_(discount), roof_(roof), fraction_(fraction) {}
33 Real averagePerformance = 0.0;
34 for (
Size i = 1; i < numSteps; i++) {
35 for (
Size j = 0; j < numAssets; j++) {
37 multiPath[j].front() *
38 (multiPath[j][i]/multiPath[j][i-1] - 1.0);
41 averagePerformance /= numAssets;
44 * std::max<Real>(0.0, std::min(
roof_, averagePerformance));
Correlated multiple asset paths.
PagodaMultiPathPricer(Real roof, Real fraction, DiscountFactor discount)
Real operator()(const MultiPath &multiPath) const override
Real DiscountFactor
discount factor between dates
std::size_t Size
size of a container
Monte Carlo engine for pagoda options.