#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. More... | |
Public Member Functions | |
CapFloorHelper (Type type, const QuantLib::Period &tenor, QuantLib::Rate strike, const QuantLib::Handle< QuantLib::Quote > "e, const QuantLib::ext::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 | |
QuantLib::ext::shared_ptr< QuantLib::CapFloor > | capFloor () const |
Return the cap floor instrument underlying the helper. More... | |
BootstrapHelper interface | |
QuantLib::Real | impliedQuote () const override |
Returns the capFloor_ instrument's premium. More... | |
void | setTermStructure (QuantLib::OptionletVolatilityStructure *ovts) override |
Sets the helper's OptionletVolatilityStructure to ovts and sets up the pricing engine for capFloor_ . More... | |
Visitability | |
Type | type_ |
QuantLib::Period | tenor_ |
QuantLib::Rate | strike_ |
QuantLib::ext::shared_ptr< QuantLib::IborIndex > | iborIndex_ |
QuantLib::Handle< QuantLib::YieldTermStructure > | discountHandle_ |
bool | moving_ |
QuantLib::Date | effectiveDate_ |
QuoteType | quoteType_ |
QuantLib::VolatilityType | quoteVolatilityType_ |
QuantLib::Real | quoteDisplacement_ |
bool | endOfMonth_ |
bool | firstCapletExcluded_ |
QuantLib::Handle< QuantLib::Quote > | rawQuote_ |
bool | initialised_ |
QuantLib::ext::shared_ptr< QuantLib::CapFloor > | capFloor_ |
The underlying instrument. More... | |
QuantLib::RelinkableHandle< QuantLib::OptionletVolatilityStructure > | ovtsHandle_ |
The OptionletVolatilityStructure Handle that we link to the capFloor_ instrument. More... | |
QuantLib::ext::shared_ptr< QuantLib::CapFloor > | capFloorCopy_ |
A copy of the underlying instrument that is used in the npv method. More... | |
void | accept (QuantLib::AcyclicVisitor &) override |
void | initializeDates () override |
RelativeDateBootstrapHelper interface. More... | |
QuantLib::Real | npv (QuantLib::Real quote) |
A method to calculate the cap floor premium from a flat cap floor volatility value. More... | |
Helper for bootstrapping optionlet volatilities from cap floor volatilities. The helper has a date schedule that is relative to the global evaluation date.
Definition at line 38 of file capfloorhelper.hpp.
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.
Enumerator | |
---|---|
Cap | |
Floor | |
Automatic |
Definition at line 45 of file capfloorhelper.hpp.
enum QuoteType |
Enum to indicate the type of the quote provided with the CapFloorHelper.
Enumerator | |
---|---|
Premium | |
Volatility |
Definition at line 48 of file capfloorhelper.hpp.
CapFloorHelper | ( | Type | type, |
const QuantLib::Period & | tenor, | ||
QuantLib::Rate | strike, | ||
const QuantLib::Handle< QuantLib::Quote > & | quote, | ||
const QuantLib::ext::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 |
Definition at line 39 of file capfloorhelper.cpp.
QuantLib::ext::shared_ptr< QuantLib::CapFloor > capFloor | ( | ) | const |
Return the cap floor instrument underlying the helper.
Definition at line 83 of file capfloorhelper.hpp.
|
override |
Returns the capFloor_
instrument's premium.
Definition at line 158 of file capfloorhelper.cpp.
|
override |
Sets the helper's OptionletVolatilityStructure to ovts
and sets up the pricing engine for capFloor_
.
Definition at line 105 of file capfloorhelper.cpp.
|
override |
Definition at line 164 of file capfloorhelper.cpp.
|
overrideprivate |
RelativeDateBootstrapHelper interface.
Definition at line 67 of file capfloorhelper.cpp.
|
private |
A method to calculate the cap floor premium from a flat cap floor volatility value.
Definition at line 171 of file capfloorhelper.cpp.
|
private |
Definition at line 105 of file capfloorhelper.hpp.
|
private |
Definition at line 106 of file capfloorhelper.hpp.
|
private |
Definition at line 107 of file capfloorhelper.hpp.
|
private |
Definition at line 108 of file capfloorhelper.hpp.
|
private |
Definition at line 109 of file capfloorhelper.hpp.
|
private |
Definition at line 110 of file capfloorhelper.hpp.
|
private |
Definition at line 111 of file capfloorhelper.hpp.
|
private |
Definition at line 112 of file capfloorhelper.hpp.
|
private |
Definition at line 113 of file capfloorhelper.hpp.
|
private |
Definition at line 114 of file capfloorhelper.hpp.
|
private |
Definition at line 115 of file capfloorhelper.hpp.
|
private |
Definition at line 116 of file capfloorhelper.hpp.
|
private |
Definition at line 117 of file capfloorhelper.hpp.
|
private |
Definition at line 118 of file capfloorhelper.hpp.
|
private |
The underlying instrument.
Definition at line 121 of file capfloorhelper.hpp.
|
private |
The OptionletVolatilityStructure Handle that we link to the capFloor_
instrument.
Definition at line 124 of file capfloorhelper.hpp.
|
private |
A copy of the underlying instrument that is used in the npv method.
Definition at line 127 of file capfloorhelper.hpp.