QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Cash flow paying the performance of a CPI (zero inflation) index. More...
#include <cpicoupon.hpp>
Public Member Functions | |
CPICashFlow (Real notional, const ext::shared_ptr< ZeroInflationIndex > &index, const Date &baseDate, Real baseFixing, const Date &observationDate, const Period &observationLag, CPI::InterpolationType interpolation, const Date &paymentDate, bool growthOnly=false) | |
Real | baseFixing () const override |
value used on base date More... | |
Date | baseDate () const override |
you may not have a valid date More... | |
Date | observationDate () const |
Period | observationLag () const |
virtual CPI::InterpolationType | interpolation () const |
do you want linear/constant/as-index interpolation of future data? More... | |
virtual Frequency | frequency () const |
ext::shared_ptr< ZeroInflationIndex > | cpiIndex () const |
Real | indexFixing () const override |
Real | amount () const override |
returns the amount of the cash flow More... | |
Public Member Functions inherited from IndexedCashFlow | |
IndexedCashFlow (Real notional, ext::shared_ptr< Index > index, const Date &baseDate, const Date &fixingDate, const Date &paymentDate, bool growthOnly=false) | |
Date | date () const override |
virtual Real | notional () const |
virtual Date | fixingDate () const |
virtual ext::shared_ptr< Index > | index () const |
virtual bool | growthOnly () const |
Real | amount () const override |
returns the amount of the cash flow More... | |
void | accept (AcyclicVisitor &) override |
void | performCalculations () const override |
Public Member Functions inherited from CashFlow | |
~CashFlow () override=default | |
bool | hasOccurred (const Date &refDate=Date(), ext::optional< bool > includeRefDate=ext::nullopt) const override |
returns true if an event has already occurred before a date More... | |
virtual Date | exCouponDate () const |
returns the date that the cash flow trades exCoupon More... | |
bool | tradingExCoupon (const Date &refDate=Date()) const |
returns true if the cashflow is trading ex-coupon on the refDate More... | |
Public Member Functions inherited from Event | |
~Event () override=default | |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Public Member Functions inherited from LazyObject | |
LazyObject () | |
~LazyObject () override=default | |
void | update () override |
bool | isCalculated () const |
void | forwardFirstNotificationOnly () |
void | alwaysForwardNotifications () |
void | recalculate () |
void | freeze () |
void | unfreeze () |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~Observer () |
std::pair< iterator, bool > | registerWith (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 () |
Protected Attributes | |
Real | baseFixing_ |
Date | observationDate_ |
Period | observationLag_ |
CPI::InterpolationType | interpolation_ |
Frequency | frequency_ |
Protected Attributes inherited from IndexedCashFlow | |
Real | amount_ |
Protected Attributes inherited from LazyObject | |
bool | calculated_ = false |
bool | frozen_ = false |
bool | alwaysForward_ |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Protected Member Functions inherited from LazyObject | |
virtual void | calculate () const |
Cash flow paying the performance of a CPI (zero inflation) index.
It is NOT a coupon, i.e. no accruals.
Definition at line 230 of file cpicoupon.hpp.
CPICashFlow | ( | Real | notional, |
const ext::shared_ptr< ZeroInflationIndex > & | index, | ||
const Date & | baseDate, | ||
Real | baseFixing, | ||
const Date & | observationDate, | ||
const Period & | observationLag, | ||
CPI::InterpolationType | interpolation, | ||
const Date & | paymentDate, | ||
bool | growthOnly = false |
||
) |
|
overridevirtual |
value used on base date
This does not have to agree with index on that date.
Reimplemented from IndexedCashFlow.
Definition at line 228 of file cpicoupon.cpp.
|
overridevirtual |
you may not have a valid date
Reimplemented from IndexedCashFlow.
Definition at line 219 of file cpicoupon.cpp.
Date observationDate | ( | ) | const |
Definition at line 248 of file cpicoupon.hpp.
Period observationLag | ( | ) | const |
Definition at line 249 of file cpicoupon.hpp.
|
virtual |
do you want linear/constant/as-index interpolation of future data?
Definition at line 251 of file cpicoupon.hpp.
|
virtual |
Definition at line 254 of file cpicoupon.hpp.
ext::shared_ptr< ZeroInflationIndex > cpiIndex | ( | ) | const |
Definition at line 375 of file cpicoupon.hpp.
|
overridevirtual |
Reimplemented from IndexedCashFlow.
Definition at line 232 of file cpicoupon.cpp.
|
overridevirtual |
returns the amount of the cash flow
Implements CashFlow.
Definition at line 242 of file cpicoupon.cpp.
|
protected |
Definition at line 263 of file cpicoupon.hpp.
|
protected |
Definition at line 264 of file cpicoupon.hpp.
|
protected |
Definition at line 265 of file cpicoupon.hpp.
|
protected |
Definition at line 266 of file cpicoupon.hpp.
|
protected |
Definition at line 267 of file cpicoupon.hpp.