QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
ZeroInflationCashFlow Class Reference

Cash flow dependent on a zero inflation index ratio. More...

#include <ql/cashflows/zeroinflationcashflow.hpp>

Inheritance diagram for ZeroInflationCashFlow:

Public Member Functions

 ZeroInflationCashFlow (Real notional, const ext::shared_ptr< ZeroInflationIndex > &index, CPI::InterpolationType observationInterpolation, const Date &startDate, const Date &endDate, const Period &observationLag, const Date &paymentDate, bool growthOnly=false)
ZeroInflationCashFlow interface
ext::shared_ptr< ZeroInflationIndexzeroInflationIndex () const
CPI::InterpolationType observationInterpolation () const
Real baseFixing () const override
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 baseDate () const
virtual Date fixingDate () const
virtual ext::shared_ptr< Indexindex () const
virtual bool growthOnly () const
Real amount () const override
 returns the amount of the cash flow
void performCalculations () const override
Public Member Functions inherited from CashFlow
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
virtual Date exCouponDate () const
 returns the date that the cash flow trades exCoupon
bool tradingExCoupon (const Date &refDate=Date()) const
 returns true if the cashflow is trading ex-coupon on the refDate
Public Member Functions inherited from Event
Public Member Functions inherited from Observable
 Observable (const Observable &)
Observableoperator= (const Observable &)
 Observable (Observable &&)=delete
Observableoperator= (Observable &&)=delete
void notifyObservers ()
Public Member Functions inherited from LazyObject
void update () override
bool isCalculated () const
void forwardFirstNotificationOnly ()
void alwaysForwardNotifications ()
void recalculate ()
void freeze ()
void unfreeze ()
Public Member Functions inherited from Observer
 Observer (const Observer &)
Observeroperator= (const 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 deepUpdate ()

Visitability

void accept (AcyclicVisitor &) override

Additional Inherited Members

Public Types inherited from Observer
typedef set_type::iterator iterator
virtual void calculate () const
Real amount_
bool calculated_ = false
bool frozen_ = false
bool alwaysForward_

Detailed Description

Cash flow dependent on a zero inflation index ratio.

The ratio is taken between fixings observed at the start date and the end date minus the observation lag; that is, if the start and end dates are, e.g., in June and the observation lag is three months, the ratio will be taken between March fixings.

Constructor & Destructor Documentation

◆ ZeroInflationCashFlow()

ZeroInflationCashFlow ( Real notional,
const ext::shared_ptr< ZeroInflationIndex > & index,
CPI::InterpolationType observationInterpolation,
const Date & startDate,
const Date & endDate,
const Period & observationLag,
const Date & paymentDate,
bool growthOnly = false )

The fixings dates for the index are startDate - observationLag and endDate - observationLag.

Member Function Documentation

◆ baseFixing()

Real baseFixing ( ) const
overridevirtual

Reimplemented from IndexedCashFlow.

◆ indexFixing()

Real indexFixing ( ) const
overridevirtual

Reimplemented from IndexedCashFlow.

◆ accept()

void accept ( AcyclicVisitor & )
overridevirtual

Reimplemented from IndexedCashFlow.