20#include <ql/exercise.hpp>
21#include <ql/instruments/floatfloatswaption.hpp>
27 const ext::shared_ptr<Exercise>& exercise,
31 settlementType_(delivery), settlementMethod_(settlementMethod) {
41 swap_->alwaysForwardNotifications();
51 swap_->setupArguments(args);
55 QL_REQUIRE(
arguments !=
nullptr,
"wrong argument type");
65 QL_REQUIRE(
swap,
"underlying cms swap not set");
66 QL_REQUIRE(
exercise,
"exercise not set");
71 std::vector<ext::shared_ptr<BlackCalibrationHelper>>
73 const ext::shared_ptr<SwapIndex>& standardSwapBase,
74 const ext::shared_ptr<SwaptionVolatilityStructure>& swaptionVolatility,
77 ext::shared_ptr<BasketGeneratingEngine>
engine =
78 ext::dynamic_pointer_cast<BasketGeneratingEngine>(
engine_);
79 QL_REQUIRE(
engine,
"engine is not a basket generating engine");
82 engine_->getArguments()->validate();
84 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
void validate() const override
Arguments for cms swaption calculation
ext::shared_ptr< FloatFloatSwap > swap
Settlement::Method settlementMethod
Settlement::Type settlementType
void validate() const override
base class for cms swaption engines
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
returns whether the instrument might have value greater than zero.
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
FloatFloatSwaption(ext::shared_ptr< FloatFloatSwap > swap, const ext::shared_ptr< Exercise > &exercise, Settlement::Type delivery=Settlement::Physical, Settlement::Method settlementMethod=Settlement::PhysicalOTC)
ext::shared_ptr< FloatFloatSwap > swap_
Settlement::Method settlementMethod_
Settlement::Type settlementType_
ext::shared_ptr< PricingEngine > engine_
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.
void swap(Array &v, Array &w) noexcept
static void checkTypeAndMethodConsistency(Settlement::Type, Settlement::Method)
check consistency of settlement type and method