QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
YoYInflationCouponPricer Class Reference

base pricer for capped/floored YoY inflation coupons More...

#include <inflationcouponpricer.hpp>

+ Inheritance diagram for YoYInflationCouponPricer:
+ Collaboration diagram for YoYInflationCouponPricer:

Public Member Functions

 YoYInflationCouponPricer ()=default
 
 YoYInflationCouponPricer (Handle< YieldTermStructure > nominalTermStructure)
 
 YoYInflationCouponPricer (Handle< YoYOptionletVolatilitySurface > capletVol, Handle< YieldTermStructure > nominalTermStructure)
 
virtual Handle< YoYOptionletVolatilitySurfacecapletVolatility () const
 
virtual Handle< YieldTermStructurenominalTermStructure () const
 
virtual void setCapletVolatility (const Handle< YoYOptionletVolatilitySurface > &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< YoYOptionletVolatilitySurfacecapletVol_
 data More...
 
Handle< YieldTermStructurenominalTermStructure_
 
const YoYInflationCouponcoupon_
 
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 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
Date paymentDate_
 

Detailed Description

base pricer for capped/floored YoY inflation coupons

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

Definition at line 88 of file inflationcouponpricer.hpp.

Constructor & Destructor Documentation

◆ YoYInflationCouponPricer() [1/3]

◆ YoYInflationCouponPricer() [2/3]

YoYInflationCouponPricer ( Handle< YieldTermStructure nominalTermStructure)
explicit

Definition at line 37 of file inflationcouponpricer.cpp.

+ Here is the call graph for this function:

◆ YoYInflationCouponPricer() [3/3]

Definition at line 43 of file inflationcouponpricer.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ capletVolatility()

virtual Handle< YoYOptionletVolatilitySurface > capletVolatility ( ) const
virtual

Definition at line 97 of file inflationcouponpricer.hpp.

+ Here is the caller graph for this function:

◆ nominalTermStructure()

virtual Handle< YieldTermStructure > nominalTermStructure ( ) const
virtual

Definition at line 101 of file inflationcouponpricer.hpp.

◆ setCapletVolatility()

void setCapletVolatility ( const Handle< YoYOptionletVolatilitySurface > &  capletVol)
virtual

Definition at line 52 of file inflationcouponpricer.cpp.

+ Here is the call graph for this function:

◆ swapletPrice()

Real swapletPrice ( ) const
overridevirtual

Implements InflationCouponPricer.

Definition at line 157 of file inflationcouponpricer.cpp.

+ Here is the call graph for this function:

◆ swapletRate()

Rate swapletRate ( ) const
overridevirtual

Implements InflationCouponPricer.

Definition at line 163 of file inflationcouponpricer.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 65 of file inflationcouponpricer.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 75 of file inflationcouponpricer.cpp.

+ Here is the call graph for this function:

◆ floorletPrice()

Real floorletPrice ( Rate  effectiveFloor) const
overridevirtual

Implements InflationCouponPricer.

Definition at line 60 of file inflationcouponpricer.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 71 of file inflationcouponpricer.cpp.

+ Here is the call graph for this function:

◆ initialize()

void initialize ( const InflationCoupon coupon)
overridevirtual

Implements InflationCouponPricer.

Definition at line 136 of file inflationcouponpricer.cpp.

+ Here is the call graph for this function:

◆ optionletPrice()

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

Definition at line 89 of file inflationcouponpricer.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 96 of file inflationcouponpricer.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).

Reimplemented in BlackYoYInflationCouponPricer, UnitDisplacedBlackYoYInflationCouponPricer, and BachelierYoYInflationCouponPricer.

Definition at line 80 of file inflationcouponpricer.cpp.

+ Here is the caller graph for this function:

◆ adjustedFixing()

Rate adjustedFixing ( Rate  fixing = Null<Rate>()) const
protectedvirtual

Definition at line 126 of file inflationcouponpricer.cpp.

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

Member Data Documentation

◆ capletVol_

Handle<YoYOptionletVolatilitySurface> capletVol_
protected

data

Definition at line 136 of file inflationcouponpricer.hpp.

◆ nominalTermStructure_

Handle<YieldTermStructure> nominalTermStructure_
protected

Definition at line 137 of file inflationcouponpricer.hpp.

◆ coupon_

const YoYInflationCoupon* coupon_
protected

Definition at line 138 of file inflationcouponpricer.hpp.

◆ gearing_

Real gearing_
protected

Definition at line 139 of file inflationcouponpricer.hpp.

◆ spread_

Spread spread_
protected

Definition at line 140 of file inflationcouponpricer.hpp.

◆ discount_

Real discount_
protected

Definition at line 141 of file inflationcouponpricer.hpp.