|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Cash flow paying the performance of a CPI (zero inflation) index. More...
#include <cpicoupon.hpp>
Inheritance diagram for CPICashFlow:
Collaboration diagram for CPICashFlow: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 |
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 ()=default | |
| 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 164 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 168 of file cpicoupon.cpp.
Here is the call graph for this function:
|
overridevirtual |
you may not have a valid date
Reimplemented from IndexedCashFlow.
Definition at line 159 of file cpicoupon.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Date observationDate | ( | ) | const |
Definition at line 182 of file cpicoupon.hpp.
| Period observationLag | ( | ) | const |
Definition at line 183 of file cpicoupon.hpp.
|
virtual |
do you want linear/constant/as-index interpolation of future data?
Definition at line 185 of file cpicoupon.hpp.
|
virtual |
Definition at line 188 of file cpicoupon.hpp.
| ext::shared_ptr< ZeroInflationIndex > cpiIndex | ( | ) | const |
Definition at line 288 of file cpicoupon.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Reimplemented from IndexedCashFlow.
Definition at line 175 of file cpicoupon.cpp.
Here is the call graph for this function:
|
protected |
Definition at line 195 of file cpicoupon.hpp.
|
protected |
Definition at line 196 of file cpicoupon.hpp.
|
protected |
Definition at line 197 of file cpicoupon.hpp.
|
protected |
Definition at line 198 of file cpicoupon.hpp.
|
protected |
Definition at line 199 of file cpicoupon.hpp.