31 const ext::shared_ptr<CapFloorTermVolSurface>& termVolSurface,
32 ext::shared_ptr<IborIndex> iborIndex,
35 const Real displacement)
36 : termVolSurface_(termVolSurface), iborIndex_(
std::move(iborIndex)),
37 discount_(
std::move(discount)), nStrikes_(termVolSurface->strikes().size()),
38 volatilityType_(type), displacement_(displacement) {
42 "non-null displacement is not allowed with Normal model");
57 "too short (" << maxCapFloorTenor <<
58 ") capfloor term vol termVolSurface");
60 while (nextCapFloorLength<=maxCapFloorTenor) {
63 nextCapFloorLength += indexTenor;
83 ") must be less than optionletStrikes size (" <<
88 const vector<Volatility>&
93 ") must be less than optionletVolatilities size (" <<
148 ext::shared_ptr<CapFloorTermVolSurface>
Shared handle to an observable.
virtual void calculate() const
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Calendar calendar() const override
std::vector< Rate > atmOptionletRate_
std::vector< std::vector< Volatility > > optionletVolatilities_
const std::vector< Date > & optionletFixingDates() const override
std::vector< Period > capFloorLengths_
ext::shared_ptr< CapFloorTermVolSurface > termVolSurface() const
Handle< YieldTermStructure > discount_
const std::vector< Rate > & optionletStrikes(Size i) const override
ext::shared_ptr< IborIndex > iborIndex_
std::vector< Date > optionletPaymentDates_
std::vector< Time > optionletAccrualPeriods_
const std::vector< Time > & optionletFixingTimes() const override
const std::vector< Date > & optionletPaymentDates() const
const std::vector< Volatility > & optionletVolatilities(Size i) const override
const std::vector< Rate > & atmOptionletRates() const override
std::vector< Period > optionletTenors_
VolatilityType volatilityType() const override
ext::shared_ptr< IborIndex > iborIndex() const
std::vector< Time > optionletTimes_
std::vector< Date > optionletDates_
Natural settlementDays() const override
DayCounter dayCounter() const override
const std::vector< Period > & optionletFixingTenors() const
const VolatilityType volatilityType_
BusinessDayConvention businessDayConvention() const override
std::vector< std::vector< Rate > > optionletStrikes_
Real displacement() const override
OptionletStripper(const ext::shared_ptr< CapFloorTermVolSurface > &, ext::shared_ptr< IborIndex > iborIndex_, Handle< YieldTermStructure > discount={}, VolatilityType type=ShiftedLognormal, Real displacement=0.0)
ext::shared_ptr< CapFloorTermVolSurface > termVolSurface_
const std::vector< Time > & optionletAccrualPeriods() const
Size optionletMaturities() const override
static Settings & instance()
access to the unique instance
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
std::size_t Size
size of a container
base class for Inter-Bank-Offered-Rate indexes
optionlet (caplet/floorlet) volatility stripper