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

CMS-coupon pricer. More...

#include <ql/cashflows/conundrumpricer.hpp>

+ Inheritance diagram for NumericHaganPricer:
+ Collaboration diagram for NumericHaganPricer:

Classes

class  ConundrumIntegrand
 
class  Function
 

Public Member Functions

 NumericHaganPricer (const Handle< SwaptionVolatilityStructure > &swaptionVol, GFunctionFactory::YieldCurveModel modelOfYieldCurve, const Handle< Quote > &meanReversion, Rate lowerLimit=0.0, Rate upperLimit=1.0, Real precision=1.0e-6, Real hardUpperLimit=QL_MAX_REAL)
 
Real upperLimit () const
 
Real lowerLimit () const
 
Real stdDeviations () const
 
Real integrate (Real a, Real b, const ConundrumIntegrand &Integrand) const
 
Real optionletPrice (Option::Type optionType, Rate strike) const override
 
Real swapletPrice () const override
 
Real resetUpperLimit (Real stdDeviationsForUpperLimit) const
 
Real resetLowerLimit (Real stdDeviationsForLowerLimit) const
 
Real refineIntegration (Real integralValue, const ConundrumIntegrand &integrand) const
 
- Public Member Functions inherited from HaganPricer
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
 

Public Attributes

Real lowerLimit_
 
Real stdDeviationsForLowerLimit_
 
Real upperLimit_
 
Real stdDeviationsForUpperLimit_
 
const Real requiredStdDeviations_ = 8
 
const Real precision_
 
const Real refiningIntegrationTolerance_ = .0001
 
const Real hardUpperLimit_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Member Functions inherited from HaganPricer
 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 inherited from HaganPricer
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_
 

Detailed Description

CMS-coupon pricer.

Prices a cms coupon via static replication as in Hagan's "Conundrums..." article via numerical integration based on prices of vanilla swaptions

Definition at line 253 of file conundrumpricer.hpp.

Constructor & Destructor Documentation

◆ NumericHaganPricer()

NumericHaganPricer ( const Handle< SwaptionVolatilityStructure > &  swaptionVol,
GFunctionFactory::YieldCurveModel  modelOfYieldCurve,
const Handle< Quote > &  meanReversion,
Rate  lowerLimit = 0.0,
Rate  upperLimit = 1.0,
Real  precision = 1.0e-6,
Real  hardUpperLimit = QL_MAX_REAL 
)

Definition at line 270 of file conundrumpricer.cpp.

Member Function Documentation

◆ upperLimit()

Real upperLimit ( ) const

Definition at line 264 of file conundrumpricer.hpp.

◆ lowerLimit()

Real lowerLimit ( ) const

Definition at line 265 of file conundrumpricer.hpp.

+ Here is the caller graph for this function:

◆ stdDeviations()

Real stdDeviations ( ) const

Definition at line 266 of file conundrumpricer.hpp.

◆ integrate()

Real integrate ( Real  a,
Real  b,
const ConundrumIntegrand Integrand 
) const

Definition at line 281 of file conundrumpricer.cpp.

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

◆ optionletPrice()

Real optionletPrice ( Option::Type  optionType,
Rate  strike 
) const
overridevirtual

Implements HaganPricer.

Definition at line 346 of file conundrumpricer.cpp.

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

◆ swapletPrice()

Real swapletPrice ( ) const
overridevirtual

Implements HaganPricer.

Definition at line 380 of file conundrumpricer.cpp.

+ Here is the call graph for this function:

◆ resetUpperLimit()

Real resetUpperLimit ( Real  stdDeviationsForUpperLimit) const

Definition at line 411 of file conundrumpricer.cpp.

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

◆ resetLowerLimit()

Real resetLowerLimit ( Real  stdDeviationsForLowerLimit) const

Definition at line 425 of file conundrumpricer.cpp.

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

◆ refineIntegration()

Real refineIntegration ( Real  integralValue,
const ConundrumIntegrand integrand 
) const

Definition at line 397 of file conundrumpricer.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ lowerLimit_

Real lowerLimit_
mutable

Definition at line 327 of file conundrumpricer.hpp.

◆ stdDeviationsForLowerLimit_

Real stdDeviationsForLowerLimit_

Definition at line 327 of file conundrumpricer.hpp.

◆ upperLimit_

Real upperLimit_

Definition at line 327 of file conundrumpricer.hpp.

◆ stdDeviationsForUpperLimit_

Real stdDeviationsForUpperLimit_

Definition at line 327 of file conundrumpricer.hpp.

◆ requiredStdDeviations_

const Real requiredStdDeviations_ = 8

Definition at line 328 of file conundrumpricer.hpp.

◆ precision_

const Real precision_

Definition at line 328 of file conundrumpricer.hpp.

◆ refiningIntegrationTolerance_

const Real refiningIntegrationTolerance_ = .0001

Definition at line 329 of file conundrumpricer.hpp.

◆ hardUpperLimit_

const Real hardUpperLimit_

Definition at line 330 of file conundrumpricer.hpp.