28 Date secondExpiryDate,
30 const ext::shared_ptr<StrikedTypePayoff>&
payoff,
31 const ext::shared_ptr<Exercise>& exercise)
34 secondExpiryDate_(secondExpiryDate),
35 secondStrike_(secondStrike) {}
41 QL_REQUIRE(moreArgs !=
nullptr,
"wrong argument type");
48 OneAssetOption::arguments::validate();
49 QL_REQUIRE(premium > 0,
"negative premium not allowed");
50 QL_REQUIRE(secondExpiryDate !=
Date() ,
"no extending date given");
51 QL_REQUIRE(secondExpiryDate >= exercise->lastDate(),
52 "extended date is earlier than or equal to first maturity date");
void validate() const override
void setupArguments(PricingEngine::arguments *) const override
HolderExtensibleOption(Option::Type type, Real premium, Date secondExpiryDate, Real secondStrike, const ext::shared_ptr< StrikedTypePayoff > &payoff, const ext::shared_ptr< Exercise > &exercise)
virtual void setupArguments(PricingEngine::arguments *) const
Base class for options on a single asset.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Option exercise classes and payoff function.
Holder-extensible option.
ext::shared_ptr< QuantLib::Payoff > payoff