#include <qle/termstructures/capfloorhelper.hpp>
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 > "e, 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 |
Helper for bootstrapping optionlet volatilities from cap floor volatilities. The helper has a date schedule that is relative to the global evaluation date.
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.
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
type | The CapFloorHelper type as described above |
tenor | The underlying cap floor instrument's tenor |
strike | The underlying cap floor instrument's strike. Setting this to Null<Real>() indicates that the ATM strike for the given tenor should be used. |
quote | The quoted premium or implied volatility for the underlying cap floor instrument |
iborIndex | The IborIndex underlying the cap floor instrument |
discountingCurve | The curve used for discounting the cap floor instrument cashflows |
moving | If 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. |
effectiveDate | The 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. |
quoteType | The quote type |
quoteVolatilityType | If the quote type is Volatility , this indicates the volatility type of the quote |
quoteDisplacement | If the quote type is Volatility and the volatility type is ShiftedLognormal , this provides the shift size associated with the quote. |
endOfMonth | Whether or not to use end of month adjustment when generating the cap floor schedule |
firstCapletExcluded | Whether or not to exclude the first caplet in the underlying cap floor instrument |