#include <qle/cashflows/yoyinflationcoupon.hpp>
|
| 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 |
|
Definition at line 60 of file yoyinflationcoupon.hpp.
◆ CappedFlooredYoYInflationCoupon() [1/2]
◆ 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),
75 if (isCapped_) {
76 cap_ = cap_ - 1;
77 }
78 if (isFloored_) {
79 floor_ = floor_ - 1;
80 }
81 }
82}
bool addInflationNotional_
◆ rate()
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}
◆ 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}
◆ addInflationNotional_
bool addInflationNotional_ |
|
private |