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

#include <qle/cashflows/yoyinflationcoupon.hpp>

+ Inheritance diagram for YoYInflationCoupon:
+ Collaboration diagram for YoYInflationCoupon:

Public Member Functions

 YoYInflationCoupon (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 Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date(), bool addInflationNotional=false)
 
Rate rate () const override
 

Visitability

bool addInflationNotional_
 
virtual void accept (AcyclicVisitor &) override
 

Detailed Description

Extend the QuantLib YoYInflationCoupon, now the payoff is based on growth only (default behaviour) (I_t / I_{t-1} - 1) or I_t / I_{t-1}

Definition at line 39 of file yoyinflationcoupon.hpp.

Constructor & Destructor Documentation

◆ YoYInflationCoupon()

YoYInflationCoupon ( 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 Date &  refPeriodStart = Date(),
const Date &  refPeriodEnd = Date(),
bool  addInflationNotional = false 
)

Definition at line 27 of file yoyinflationcoupon.cpp.

32 : QuantLib::YoYInflationCoupon(paymentDate, nominal, startDate, endDate, fixingDays, index, observationLag,
33 dayCounter, gearing, spread, refPeriodStart, refPeriodEnd),
34 addInflationNotional_(addInflationNotional) {}

Member Function Documentation

◆ rate()

Rate rate ( ) const
override

Definition at line 44 of file yoyinflationcoupon.cpp.

44 {
45 Real RateYoY = QuantLib::YoYInflationCoupon::rate();
47 RateYoY = gearing_ * ((RateYoY - spread_) / gearing_ + 1) + spread_;
48 }
49 return RateYoY;
50}
SimpleQuote & spread_

◆ accept()

void accept ( AcyclicVisitor &  v)
overridevirtual

Reimplemented in StrippedCappedFlooredYoYInflationCoupon.

Definition at line 36 of file yoyinflationcoupon.cpp.

36 {
37 Visitor<YoYInflationCoupon>* v1 = dynamic_cast<Visitor<YoYInflationCoupon>*>(&v);
38 if (v1 != 0)
39 v1->visit(*this);
40 else
41 QuantLib::YoYInflationCoupon::accept(v);
42}
+ Here is the caller graph for this function:

Member Data Documentation

◆ addInflationNotional_

bool addInflationNotional_
private

Definition at line 57 of file yoyinflationcoupon.hpp.