Logo
Reference manual - version qle_version
Public Types | Public Member Functions | List of all members
CapFloorHelper Class Reference

#include <qle/termstructures/capfloorhelper.hpp>

+ Inheritance diagram for CapFloorHelper:

Public Types

enum  Type { Cap , Floor , Automatic }
 
enum  QuoteType { Premium , Volatility }
 Enum to indicate the type of the quote provided with the CapFloorHelper.
 

Public Member Functions

 CapFloorHelper (Type type, const QuantLib::Period &tenor, QuantLib::Rate strike, const QuantLib::Handle< QuantLib::Quote > &quote, const boost::shared_ptr< QuantLib::IborIndex > &iborIndex, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountingCurve, bool moving=true, const QuantLib::Date &effectiveDate=QuantLib::Date(), QuoteType quoteType=Premium, QuantLib::VolatilityType quoteVolatilityType=QuantLib::Normal, QuantLib::Real quoteDisplacement=0.0, bool endOfMonth=false, bool firstCapletExcluded=true)
 
Inspectors
boost::shared_ptr< QuantLib::CapFloor > capFloor () const
 Return the cap floor instrument underlying the helper.
 
BootstrapHelper interface
QuantLib::Real impliedQuote () const override
 Returns the capFloor_ instrument's premium.
 
void setTermStructure (QuantLib::OptionletVolatilityStructure *ovts) override
 Sets the helper's OptionletVolatilityStructure to ovts and sets up the pricing engine for capFloor_.
 

Visitability

void accept (QuantLib::AcyclicVisitor &) override
 

Detailed Description

Helper for bootstrapping optionlet volatilities from cap floor volatilities. The helper has a date schedule that is relative to the global evaluation date.

Member Enumeration Documentation

◆ Type

enum Type

Enum to indicate whether the instrument underlying the helper is a Cap, a Floor or should be chosen automatically. If Automatic is chosen and the quote type is volatility, the instrument's ATM rate is queried and if it is greater than the strike, the instrument is a Floor otherwise it is a Cap.

Constructor & Destructor Documentation

◆ CapFloorHelper()

CapFloorHelper ( Type  type,
const QuantLib::Period &  tenor,
QuantLib::Rate  strike,
const QuantLib::Handle< QuantLib::Quote > &  quote,
const boost::shared_ptr< QuantLib::IborIndex > &  iborIndex,
const QuantLib::Handle< QuantLib::YieldTermStructure > &  discountingCurve,
bool  moving = true,
const QuantLib::Date &  effectiveDate = QuantLib::Date(),
QuoteType  quoteType = Premium,
QuantLib::VolatilityType  quoteVolatilityType = QuantLib::Normal,
QuantLib::Real  quoteDisplacement = 0.0,
bool  endOfMonth = false,
bool  firstCapletExcluded = true 
)

Constructor

Parameters
typeThe CapFloorHelper type as described above
tenorThe underlying cap floor instrument's tenor
strikeThe underlying cap floor instrument's strike. Setting this to Null<Real>() indicates that the ATM strike for the given tenor should be used.
quoteThe quoted premium or implied volatility for the underlying cap floor instrument
iborIndexThe IborIndex underlying the cap floor instrument
discountingCurveThe curve used for discounting the cap floor instrument cashflows
movingIf this is true, the helper's schedule is relative to the global evaluation date and is updated if the global evaluation date is updated. If false, the helper has a fixed schedule relative to the effectiveDate that does not change with changes in the global evaluation date.
effectiveDateThe effective date of the underlying cap floor instrument. If this is the empty QuantLib::Date(), the effective date is determined from the global evaluation date.
quoteTypeThe quote type
quoteVolatilityTypeIf the quote type is Volatility, this indicates the volatility type of the quote
quoteDisplacementIf the quote type is Volatility and the volatility type is ShiftedLognormal, this provides the shift size associated with the quote.
endOfMonthWhether or not to use end of month adjustment when generating the cap floor schedule
firstCapletExcludedWhether or not to exclude the first caplet in the underlying cap floor instrument