27 const ext::shared_ptr<EuropeanExercise>& maturity,
28 std::vector<Date> resetDates)
35 QL_REQUIRE(moreArgs !=
nullptr,
"wrong engine type");
40 OneAssetOption::arguments::validate();
42 ext::shared_ptr<PercentageStrikePayoff> moneyness =
43 ext::dynamic_pointer_cast<PercentageStrikePayoff>(
payoff);
47 "negative or zero moneyness given");
49 "negative accrued coupon");
51 "negative local cap");
53 "negative local floor");
55 "negative global cap");
57 "negative global floor");
59 "no reset dates given");
62 "reset date greater or equal to maturity");
64 "unsorted reset dates");
Arguments for cliquet option calculation
std::vector< Date > resetDates
void validate() const override
void setupArguments(PricingEngine::arguments *) const override
CliquetOption(const ext::shared_ptr< PercentageStrikePayoff > &, const ext::shared_ptr< EuropeanExercise > &maturity, std::vector< Date > resetDates)
std::vector< Date > resetDates_
virtual void setupArguments(PricingEngine::arguments *) const
template class providing a null value for a given type.
Base class for options on a single asset.
ext::shared_ptr< Payoff > payoff() const
ext::shared_ptr< Exercise > exercise() const
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Option exercise classes and payoff function.
std::size_t Size
size of a container
ext::shared_ptr< QuantLib::Payoff > payoff