26 const ext::shared_ptr<Exercise>& motherExercise,
27 ext::shared_ptr<StrikedTypePayoff> daughterPayoff,
28 ext::shared_ptr<Exercise> daughterExercise)
29 :
OneAssetOption(motherPayoff, motherExercise), daughterPayoff_(
std::move(daughterPayoff)),
30 daughterExercise_(
std::move(daughterExercise)) {}
36 QL_REQUIRE(moreArgs !=
nullptr,
"wrong argument type");
42 OneAssetOption::arguments::validate();
44 "no payoff given for underlying option");
46 "no exercise given for underlying option");
48 "maturity of compound option exceeds "
49 "maturity of underlying option");
ext::shared_ptr< Exercise > daughterExercise
ext::shared_ptr< StrikedTypePayoff > daughterPayoff
void validate() const override
void setupArguments(PricingEngine::arguments *) const override
ext::shared_ptr< Exercise > daughterExercise_
ext::shared_ptr< StrikedTypePayoff > daughterPayoff_
CompoundOption(const ext::shared_ptr< StrikedTypePayoff > &motherPayoff, const ext::shared_ptr< Exercise > &motherExercise, ext::shared_ptr< StrikedTypePayoff > daughterPayoff, ext::shared_ptr< Exercise > daughterExercise)
virtual void setupArguments(PricingEngine::arguments *) const
Base class for options on a single asset.
ext::shared_ptr< Exercise > exercise() const
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Compound option on a single asset.