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

base pricer for capped/floored CPI coupons N.B. vol-dependent parts are a TODO More...

#include <ql/cashflows/cpicouponpricer.hpp>

+ Inheritance diagram for CPICouponPricer:
+ Collaboration diagram for CPICouponPricer:

Public Member Functions

 CPICouponPricer (Handle< YieldTermStructure > nominalTermStructure=Handle< YieldTermStructure >())
 
 CPICouponPricer (Handle< CPIVolatilitySurface > capletVol, Handle< YieldTermStructure > nominalTermStructure=Handle< YieldTermStructure >())
 
QL_DEPRECATED_DISABLE_WARNING ~CPICouponPricer () override=default
 
virtual QL_DEPRECATED_ENABLE_WARNING Handle< CPIVolatilitySurfacecapletVolatility () const
 
virtual Handle< YieldTermStructurenominalTermStructure () const
 
virtual void setCapletVolatility (const Handle< CPIVolatilitySurface > &capletVol)
 
- Public Member Functions inherited from InflationCouponPricer
QL_DEPRECATED_DISABLE_WARNING InflationCouponPricer ()=default
 
 ~InflationCouponPricer () 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 ()
 

InflationCouponPricer interface

Handle< CPIVolatilitySurfacecapletVol_
 
Handle< YieldTermStructurenominalTermStructure_
 
const CPICouponcoupon_
 
Real gearing_
 
Spread spread_
 
Real discount_
 
Real swapletPrice () const override
 
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
 
void initialize (const InflationCoupon &) override
 
virtual Rate accruedRate (Date settlementDate) const
 
virtual Real optionletPrice (Option::Type optionType, Real effStrike) const
 
virtual Real optionletRate (Option::Type optionType, Real effStrike) const
 
virtual Real optionletPriceImp (Option::Type, Real strike, Real forward, Real stdDev) const
 
virtual Rate adjustedFixing (Rate fixing=Null< Rate >()) const
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Attributes inherited from InflationCouponPricer
QL_DEPRECATED Handle< YieldTermStructurerateCurve_
 
Date paymentDate_
 

Detailed Description

base pricer for capped/floored CPI coupons N.B. vol-dependent parts are a TODO

Note
this pricer can already do swaplets but to get volatility-dependent coupons you need to implement the descendents.

Definition at line 39 of file cpicouponpricer.hpp.

Constructor & Destructor Documentation

◆ CPICouponPricer() [1/2]

QL_DEPRECATED_DISABLE_WARNING CPICouponPricer ( Handle< YieldTermStructure nominalTermStructure = Handle<YieldTermStructure>())
explicit

Definition at line 28 of file cpicouponpricer.cpp.

+ Here is the call graph for this function:

◆ CPICouponPricer() [2/2]

CPICouponPricer ( Handle< CPIVolatilitySurface capletVol,
Handle< YieldTermStructure nominalTermStructure = Handle<YieldTermStructure>() 
)
explicit

Definition at line 33 of file cpicouponpricer.cpp.

+ Here is the call graph for this function:

◆ ~CPICouponPricer()

QL_DEPRECATED_DISABLE_WARNING ~CPICouponPricer ( )
overridedefault

Member Function Documentation

◆ capletVolatility()

virtual QL_DEPRECATED_ENABLE_WARNING Handle< CPIVolatilitySurface > capletVolatility ( ) const
virtual

Definition at line 50 of file cpicouponpricer.hpp.

+ Here is the caller graph for this function:

◆ nominalTermStructure()

virtual Handle< YieldTermStructure > nominalTermStructure ( ) const
virtual

Definition at line 54 of file cpicouponpricer.hpp.

◆ setCapletVolatility()

QL_DEPRECATED_ENABLE_WARNING void setCapletVolatility ( const Handle< CPIVolatilitySurface > &  capletVol)
virtual

Definition at line 42 of file cpicouponpricer.cpp.

+ Here is the call graph for this function:

◆ swapletPrice()

Real swapletPrice ( ) const
overridevirtual

Implements InflationCouponPricer.

Definition at line 146 of file cpicouponpricer.cpp.

+ Here is the call graph for this function:

◆ swapletRate()

Rate swapletRate ( ) const
overridevirtual

Implements InflationCouponPricer.

Definition at line 152 of file cpicouponpricer.cpp.

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

◆ capletPrice()

Real capletPrice ( Rate  effectiveCap) const
overridevirtual

Implements InflationCouponPricer.

Definition at line 55 of file cpicouponpricer.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 InflationCouponPricer.

Definition at line 65 of file cpicouponpricer.cpp.

+ Here is the call graph for this function:

◆ floorletPrice()

Real floorletPrice ( Rate  effectiveFloor) const
overridevirtual

Implements InflationCouponPricer.

Definition at line 50 of file cpicouponpricer.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 InflationCouponPricer.

Definition at line 61 of file cpicouponpricer.cpp.

+ Here is the call graph for this function:

◆ initialize()

void initialize ( const InflationCoupon coupon)
overridevirtual

Implements InflationCouponPricer.

Definition at line 124 of file cpicouponpricer.cpp.

+ Here is the call graph for this function:

◆ accruedRate()

Rate accruedRate ( Date  settlementDate) const
virtual

Definition at line 161 of file cpicouponpricer.cpp.

+ Here is the call graph for this function:

◆ optionletPrice()

Real optionletPrice ( Option::Type  optionType,
Real  effStrike 
) const
protectedvirtual

Definition at line 78 of file cpicouponpricer.cpp.

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

◆ optionletRate()

Real optionletRate ( Option::Type  optionType,
Real  effStrike 
) const
protectedvirtual

Definition at line 85 of file cpicouponpricer.cpp.

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

◆ optionletPriceImp()

Real optionletPriceImp ( Option::Type  ,
Real  strike,
Real  forward,
Real  stdDev 
) const
protectedvirtual

Derived classes usually only need to implement this.

The name of the method is misleading. This actually returns the rate of the optionlet (so not discounted and not accrued).

Definition at line 70 of file cpicouponpricer.cpp.

+ Here is the caller graph for this function:

◆ adjustedFixing()

Rate adjustedFixing ( Rate  fixing = Null<Rate>()) const
protectedvirtual
Deprecated:
Don't use this method. In derived classes, override accruedRate. Deprecated in version 1.31.

Definition at line 116 of file cpicouponpricer.cpp.

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

Member Data Documentation

◆ capletVol_

Handle<CPIVolatilitySurface> capletVol_
protected

Definition at line 98 of file cpicouponpricer.hpp.

◆ nominalTermStructure_

Handle<YieldTermStructure> nominalTermStructure_
protected

Definition at line 99 of file cpicouponpricer.hpp.

◆ coupon_

const CPICoupon* coupon_
protected

Definition at line 100 of file cpicouponpricer.hpp.

◆ gearing_

Real gearing_
protected

Definition at line 101 of file cpicouponpricer.hpp.

◆ spread_

Spread spread_
protected
Deprecated:
Don't use this data member. A spread doesn't make sense for this coupon. Deprecated in version 1.31.

Definition at line 106 of file cpicouponpricer.hpp.

◆ discount_

Real discount_
protected

Definition at line 107 of file cpicouponpricer.hpp.