Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
CPICoupon Class Reference

#include <qle/cashflows/cpicoupon.hpp>

+ Inheritance diagram for CPICoupon:
+ Collaboration diagram for CPICoupon:

Public Member Functions

 CPICoupon (Real baseCPI, const Date &paymentDate, Real nominal, const Date &startDate, const Date &endDate, const ext::shared_ptr< ZeroInflationIndex > &index, const Period &observationLag, CPI::InterpolationType observationInterpolation, const DayCounter &dayCounter, Real fixedRate, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date(), const Date &exCouponDate=Date(), bool subtractInflationNominal=false)
 
 CPICoupon (Real baseCPI, const Date &baseDate, const Date &paymentDate, Real nominal, const Date &startDate, const Date &endDate, const ext::shared_ptr< ZeroInflationIndex > &index, const Period &observationLag, CPI::InterpolationType observationInterpolation, const DayCounter &dayCounter, Real fixedRate, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date(), const Date &exCouponDate=Date(), bool subtractInflationNominal=false)
 
virtual Rate rate () const override
 
bool subtractInflationNotional ()
 

Protected Attributes

bool subtractInflationNominal_
 

Detailed Description

Definition at line 35 of file cpicoupon.hpp.

Constructor & Destructor Documentation

◆ CPICoupon() [1/2]

CPICoupon ( Real  baseCPI,
const Date &  paymentDate,
Real  nominal,
const Date &  startDate,
const Date &  endDate,
const ext::shared_ptr< ZeroInflationIndex > &  index,
const Period &  observationLag,
CPI::InterpolationType  observationInterpolation,
const DayCounter &  dayCounter,
Real  fixedRate,
const Date &  refPeriodStart = Date(),
const Date &  refPeriodEnd = Date(),
const Date &  exCouponDate = Date(),
bool  subtractInflationNominal = false 
)

Definition at line 37 of file cpicoupon.hpp.

44 : QuantLib::CPICoupon(baseCPI, paymentDate, nominal, startDate, endDate, index, observationLag,
45 observationInterpolation, dayCounter, fixedRate, refPeriodStart,
46 refPeriodEnd, exCouponDate),
47 subtractInflationNominal_(subtractInflationNominal){};
bool subtractInflationNominal_
Definition: cpicoupon.hpp:67

◆ CPICoupon() [2/2]

CPICoupon ( Real  baseCPI,
const Date &  baseDate,
const Date &  paymentDate,
Real  nominal,
const Date &  startDate,
const Date &  endDate,
const ext::shared_ptr< ZeroInflationIndex > &  index,
const Period &  observationLag,
CPI::InterpolationType  observationInterpolation,
const DayCounter &  dayCounter,
Real  fixedRate,
const Date &  refPeriodStart = Date(),
const Date &  refPeriodEnd = Date(),
const Date &  exCouponDate = Date(),
bool  subtractInflationNominal = false 
)

Definition at line 49 of file cpicoupon.hpp.

57 : QuantLib::CPICoupon(baseCPI, baseDate, paymentDate, nominal, startDate, endDate, index,
58 observationLag,
59 observationInterpolation, dayCounter, fixedRate, refPeriodStart, refPeriodEnd,
60 exCouponDate),
61 subtractInflationNominal_(subtractInflationNominal){};

Member Function Documentation

◆ rate()

Rate rate ( ) const
overridevirtual

Reimplemented in CappedFlooredCPICoupon, and StrippedCappedFlooredCPICoupon.

Definition at line 34 of file cpicoupon.cpp.

34 {
35 Rate r = QuantLib::CPICoupon::rate() ;
37 Rate adjusted_r = r / fixedRate_;
38 r = (adjusted_r - 1) * fixedRate_;
39 }
40 return r;
41 }

◆ subtractInflationNotional()

bool subtractInflationNotional ( )

Definition at line 64 of file cpicoupon.hpp.

Member Data Documentation

◆ subtractInflationNominal_

bool subtractInflationNominal_
protected

Definition at line 67 of file cpicoupon.hpp.