31 const ext::shared_ptr<Exercise>& exerciseCall,
32 ext::shared_ptr<Exercise> exercisePut)
35 choosingDate_(choosingDate),
36 strikeCall_(strikeCall),
37 strikePut_(strikePut),
38 exerciseCall_(exerciseCall),
39 exercisePut_(
std::move(exercisePut)) {}
44 QL_REQUIRE(moreArgs !=
nullptr,
"wrong argument type");
53 OneAssetOption::arguments::validate();
55 QL_REQUIRE(choosingDate < exerciseCall->lastDate(),
56 "choosing date later than or equal to Call maturity date");
57 QL_REQUIRE(choosingDate < exercisePut->lastDate(),
58 "choosing date later than or equal to Put maturity date");
Extra arguments for complex chooser option.
void validate() const override
void setupArguments(PricingEngine::arguments *) const override
ext::shared_ptr< Exercise > exercisePut_
ComplexChooserOption(Date choosingDate, Real strikeCall, Real strikePut, const ext::shared_ptr< Exercise > &exerciseCall, ext::shared_ptr< Exercise > exercisePut)
ext::shared_ptr< Exercise > exerciseCall_
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.
Payoffs for various options.