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

#include <qle/cashflows/yoyinflationcoupon.hpp>

+ Inheritance diagram for CappedFlooredYoYInflationCoupon:
+ Collaboration diagram for CappedFlooredYoYInflationCoupon:

Public Member Functions

 CappedFlooredYoYInflationCoupon (const ext::shared_ptr< YoYInflationCoupon > &underlying, Rate cap=Null< Rate >(), Rate floor=Null< Rate >(), bool addInflationNotional=false)
 
 CappedFlooredYoYInflationCoupon (const Date &paymentDate, Real nominal, const Date &startDate, const Date &endDate, Natural fixingDays, const ext::shared_ptr< YoYInflationIndex > &index, const Period &observationLag, const DayCounter &dayCounter, Real gearing=1.0, Spread spread=0.0, const Rate cap=Null< Rate >(), const Rate floor=Null< Rate >(), const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date(), bool addInflationNotional=false)
 
Rate rate () const override
 

Visitability

bool addInflationNotional_
 
virtual void accept (AcyclicVisitor &) override
 

Detailed Description

Definition at line 60 of file yoyinflationcoupon.hpp.

Constructor & Destructor Documentation

◆ CappedFlooredYoYInflationCoupon() [1/2]

CappedFlooredYoYInflationCoupon ( const ext::shared_ptr< YoYInflationCoupon > &  underlying,
Rate  cap = Null< Rate >(),
Rate  floor = Null< Rate >(),
bool  addInflationNotional = false 
)

◆ CappedFlooredYoYInflationCoupon() [2/2]

CappedFlooredYoYInflationCoupon ( const Date &  paymentDate,
Real  nominal,
const Date &  startDate,
const Date &  endDate,
Natural  fixingDays,
const ext::shared_ptr< YoYInflationIndex > &  index,
const Period &  observationLag,
const DayCounter &  dayCounter,
Real  gearing = 1.0,
Spread  spread = 0.0,
const Rate  cap = Null<Rate>(),
const Rate  floor = Null<Rate>(),
const Date &  refPeriodStart = Date(),
const Date &  refPeriodEnd = Date(),
bool  addInflationNotional = false 
)

Definition at line 65 of file yoyinflationcoupon.cpp.

70 : QuantLib::CappedFlooredYoYInflationCoupon(paymentDate, nominal, startDate, endDate, fixingDays, index,
71 observationLag, dayCounter, gearing, spread, cap, floor, refPeriodStart,
72 refPeriodEnd),
73 addInflationNotional_(addInflationNotional) {
75 if (isCapped_) {
76 cap_ = cap_ - 1;
77 }
78 if (isFloored_) {
79 floor_ = floor_ - 1;
80 }
81 }
82}

Member Function Documentation

◆ rate()

Rate rate ( ) const
override

Definition at line 92 of file yoyinflationcoupon.cpp.

92 {
93 Real RateYoY = QuantLib::CappedFlooredYoYInflationCoupon::rate();
95 RateYoY = gearing_ * ((RateYoY - spread_) / gearing_ + 1) + spread_;
96 }
97 return RateYoY;
98}
SimpleQuote & spread_

◆ accept()

void accept ( AcyclicVisitor &  v)
overridevirtual

Definition at line 84 of file yoyinflationcoupon.cpp.

84 {
85 Visitor<CappedFlooredYoYInflationCoupon>* v1 = dynamic_cast<Visitor<CappedFlooredYoYInflationCoupon>*>(&v);
86 if (v1 != 0)
87 v1->visit(*this);
88 else
89 QuantLib::CappedFlooredYoYInflationCoupon::accept(v);
90}

Member Data Documentation

◆ addInflationNotional_

bool addInflationNotional_
private

Definition at line 79 of file yoyinflationcoupon.hpp.