QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HaganPricer Class Referenceabstract

CMS-coupon pricer. More...

#include <ql/cashflows/conundrumpricer.hpp>

+ Inheritance diagram for HaganPricer:
+ Collaboration diagram for HaganPricer:

Public Member Functions

Real swapletPrice () const override=0
 
Rate swapletRate () const override
 
Real capletPrice (Rate effectiveCap) const override
 
Rate capletRate (Rate effectiveCap) const override
 
Real floorletPrice (Rate effectiveFloor) const override
 
Rate floorletRate (Rate effectiveFloor) const override
 
Real meanReversion () const override
 
void setMeanReversion (const Handle< Quote > &meanReversion) override
 
- Public Member Functions inherited from CmsCouponPricer
 CmsCouponPricer (Handle< SwaptionVolatilityStructure > v=Handle< SwaptionVolatilityStructure >())
 
Handle< SwaptionVolatilityStructureswaptionVolatility () const
 
void setSwaptionVolatility (const Handle< SwaptionVolatilityStructure > &v=Handle< SwaptionVolatilityStructure >())
 
- Public Member Functions inherited from FloatingRateCouponPricer
 ~FloatingRateCouponPricer () override=default
 
void update () override
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from MeanRevertingPricer
virtual Real meanReversion () const =0
 
virtual void setMeanReversion (const Handle< Quote > &)=0
 
virtual ~MeanRevertingPricer ()=default
 

Protected Member Functions

 HaganPricer (const Handle< SwaptionVolatilityStructure > &swaptionVol, GFunctionFactory::YieldCurveModel modelOfYieldCurve, Handle< Quote > meanReversion)
 
void initialize (const FloatingRateCoupon &coupon) override
 
virtual Real optionletPrice (Option::Type optionType, Real strike) const =0
 

Protected Attributes

ext::shared_ptr< YieldTermStructurerateCurve_
 
GFunctionFactory::YieldCurveModel modelOfYieldCurve_
 
ext::shared_ptr< GFunctiongFunction_
 
const CmsCouponcoupon_
 
Date paymentDate_
 
Date fixingDate_
 
Rate swapRateValue_
 
DiscountFactor discount_
 
Real annuity_
 
Real gearing_
 
Spread spread_
 
Real spreadLegValue_
 
Rate cutoffForCaplet_ = 2
 
Rate cutoffForFloorlet_ = 0
 
Handle< QuotemeanReversion_
 
Period swapTenor_
 
ext::shared_ptr< VanillaOptionPricervanillaOptionPricer_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Detailed Description

CMS-coupon pricer.

Base class for the pricing of a CMS coupon via static replication as in Hagan's "Conundrums..." article

Definition at line 203 of file conundrumpricer.hpp.

Constructor & Destructor Documentation

◆ HaganPricer()

HaganPricer ( const Handle< SwaptionVolatilityStructure > &  swaptionVol,
GFunctionFactory::YieldCurveModel  modelOfYieldCurve,
Handle< Quote meanReversion 
)
protected

Definition at line 78 of file conundrumpricer.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ swapletPrice()

Real swapletPrice ( ) const
overridepure virtual

Implements FloatingRateCouponPricer.

Implemented in NumericHaganPricer, and AnalyticHaganPricer.

+ Here is the caller graph for this function:

◆ swapletRate()

Rate swapletRate ( ) const
overridevirtual

Implements FloatingRateCouponPricer.

Definition at line 154 of file conundrumpricer.cpp.

+ Here is the call graph for this function:

◆ capletPrice()

Real capletPrice ( Rate  effectiveCap) const
overridevirtual

Implements FloatingRateCouponPricer.

Definition at line 158 of file conundrumpricer.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ capletRate()

Rate capletRate ( Rate  effectiveCap) const
overridevirtual

Implements FloatingRateCouponPricer.

Definition at line 188 of file conundrumpricer.cpp.

+ Here is the call graph for this function:

◆ floorletPrice()

Real floorletPrice ( Rate  effectiveFloor) const
overridevirtual

Implements FloatingRateCouponPricer.

Definition at line 192 of file conundrumpricer.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ floorletRate()

Rate floorletRate ( Rate  effectiveFloor) const
overridevirtual

Implements FloatingRateCouponPricer.

Definition at line 223 of file conundrumpricer.cpp.

+ Here is the call graph for this function:

◆ meanReversion()

Real meanReversion ( ) const
overridevirtual

Implements MeanRevertingPricer.

Definition at line 152 of file conundrumpricer.cpp.

+ Here is the caller graph for this function:

◆ setMeanReversion()

void setMeanReversion ( const Handle< Quote > &  meanReversion)
overridevirtual

Implements MeanRevertingPricer.

Definition at line 214 of file conundrumpricer.hpp.

+ Here is the call graph for this function:

◆ initialize()

void initialize ( const FloatingRateCoupon coupon)
overrideprotectedvirtual

Implements FloatingRateCouponPricer.

Definition at line 86 of file conundrumpricer.cpp.

+ Here is the call graph for this function:

◆ optionletPrice()

virtual Real optionletPrice ( Option::Type  optionType,
Real  strike 
) const
protectedpure virtual

Implemented in NumericHaganPricer, and AnalyticHaganPricer.

+ Here is the caller graph for this function:

Member Data Documentation

◆ rateCurve_

ext::shared_ptr<YieldTermStructure> rateCurve_
protected

Definition at line 230 of file conundrumpricer.hpp.

◆ modelOfYieldCurve_

GFunctionFactory::YieldCurveModel modelOfYieldCurve_
protected

Definition at line 231 of file conundrumpricer.hpp.

◆ gFunction_

ext::shared_ptr<GFunction> gFunction_
protected

Definition at line 232 of file conundrumpricer.hpp.

◆ coupon_

const CmsCoupon* coupon_
protected

Definition at line 233 of file conundrumpricer.hpp.

◆ paymentDate_

Date paymentDate_
protected

Definition at line 234 of file conundrumpricer.hpp.

◆ fixingDate_

Date fixingDate_
protected

Definition at line 234 of file conundrumpricer.hpp.

◆ swapRateValue_

Rate swapRateValue_
protected

Definition at line 235 of file conundrumpricer.hpp.

◆ discount_

DiscountFactor discount_
protected

Definition at line 236 of file conundrumpricer.hpp.

◆ annuity_

Real annuity_
protected

Definition at line 237 of file conundrumpricer.hpp.

◆ gearing_

Real gearing_
protected

Definition at line 238 of file conundrumpricer.hpp.

◆ spread_

Spread spread_
protected

Definition at line 239 of file conundrumpricer.hpp.

◆ spreadLegValue_

Real spreadLegValue_
protected

Definition at line 240 of file conundrumpricer.hpp.

◆ cutoffForCaplet_

Rate cutoffForCaplet_ = 2
protected

Definition at line 241 of file conundrumpricer.hpp.

◆ cutoffForFloorlet_

Rate cutoffForFloorlet_ = 0
protected

Definition at line 241 of file conundrumpricer.hpp.

◆ meanReversion_

Handle<Quote> meanReversion_
protected

Definition at line 242 of file conundrumpricer.hpp.

◆ swapTenor_

Period swapTenor_
protected

Definition at line 243 of file conundrumpricer.hpp.

◆ vanillaOptionPricer_

ext::shared_ptr<VanillaOptionPricer> vanillaOptionPricer_
protected

Definition at line 244 of file conundrumpricer.hpp.