28 const_cast<
Swaption &>(fromSwaption).exercise()),
30 *fromSwaption.underlying())),
31 settlementType_(fromSwaption.settlementType()),
32 settlementMethod_(fromSwaption.settlementMethod()) {
43 swap_->alwaysForwardNotifications();
47 const ext::shared_ptr<Exercise>& exercise,
51 settlementType_(delivery), settlementMethod_(settlementMethod) {
53 swap_->alwaysForwardNotifications();
64 swap_->setupArguments(args);
85 std::vector<ext::shared_ptr<BlackCalibrationHelper>>
87 const ext::shared_ptr<SwapIndex>& standardSwapBase,
88 const ext::shared_ptr<SwaptionVolatilityStructure>& swaptionVolatility,
91 ext::shared_ptr<BasketGeneratingEngine>
engine =
92 ext::dynamic_pointer_cast<BasketGeneratingEngine>(
engine_);
96 engine_->getArguments()->validate();
98 swaptionVolatility, basketType);
virtual bool hasOccurred(const Date &refDate=Date(), ext::optional< bool > includeRefDate=ext::nullopt) const
returns true if an event has already occurred before a date
ext::shared_ptr< PricingEngine > engine_
void validate() const override
Arguments for nonstandard swaption calculation
Settlement::Method settlementMethod
ext::shared_ptr< NonstandardSwap > swap
Settlement::Type settlementType
void validate() const override
base class for nonstandard swaption engines
ext::shared_ptr< NonstandardSwap > swap_
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
returns whether the instrument might have value greater than zero.
NonstandardSwaption(const Swaption &fromSwaption)
std::vector< ext::shared_ptr< BlackCalibrationHelper > > calibrationBasket(const ext::shared_ptr< SwapIndex > &standardSwapBase, const ext::shared_ptr< SwaptionVolatilityStructure > &swaptionVolatility, BasketGeneratingEngine::CalibrationBasketType basketType=BasketGeneratingEngine::MaturityStrikeByDeltaGamma) const
Settlement::Method settlementMethod_
Settlement::Type settlementType_
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
ext::shared_ptr< Exercise > exercise
ext::shared_ptr< Exercise > exercise_
Abstract base class for option payoffs.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Option exercise classes and payoff function.
void swap(Array &v, Array &w) noexcept
nonstandard swap option class
static void checkTypeAndMethodConsistency(Settlement::Type, Settlement::Method)
check consistency of settlement type and method