20#include <ql/cashflows/zeroinflationcashflow.hpp>
21#include <ql/indexes/inflationindex.hpp>
22#include <ql/termstructures/inflationtermstructure.hpp>
23#include <ql/time/calendars/nullcalendar.hpp>
28 const ext::shared_ptr<ZeroInflationIndex>& index,
30 const Date& startDate,
32 const Period& observationLag,
33 const Date& paymentDate,
36 startDate - observationLag, endDate - observationLag,
37 paymentDate, growthOnly),
38 zeroInflationIndex_(index), observationInterpolation_(observationInterpolation),
39 startDate_(startDate), endDate_(endDate), observationLag_(observationLag) {}
degenerate base class for the Acyclic Visitor pattern
Cash flow dependent on an index ratio.
virtual Date fixingDate() const
virtual Real notional() const
void accept(AcyclicVisitor &) override
virtual Date baseDate() const
virtual bool growthOnly() const
Visitor for a specific class
virtual void visit(T &)=0
ext::shared_ptr< ZeroInflationIndex > zeroInflationIndex_
Real amount() const override
returns the amount of the cash flow
void accept(AcyclicVisitor &) override
CPI::InterpolationType observationInterpolation_
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)
static Real laggedFixing(const ext::shared_ptr< ZeroInflationIndex > &index, const Date &date, const Period &observationLag, InterpolationType interpolationType)
interpolated inflation fixing
InterpolationType
when you observe an index, how do you interpolate between fixings?
@ AsIndex
same interpolation as index