QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
zeroinflationcashflow.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2021 Ralf Konrad Eckel
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
24#ifndef quantlib_inflation_cash_flow_hpp
25#define quantlib_inflation_cash_flow_hpp
26
27#include <ql/cashflows/indexedcashflow.hpp>
28#include <ql/indexes/inflationindex.hpp>
29
30namespace QuantLib {
31
33
39 public:
44 const ext::shared_ptr<ZeroInflationIndex>& index,
46 const Date& startDate,
47 const Date& endDate,
48 const Period& observationLag,
49 const Date& paymentDate,
50 bool growthOnly = false);
51
53
54 ext::shared_ptr<ZeroInflationIndex> zeroInflationIndex() const {
56 }
59 }
61
63
64 Real amount() const override;
66
68 void accept(AcyclicVisitor&) override;
70
71 private:
72 ext::shared_ptr<ZeroInflationIndex> zeroInflationIndex_;
76 };
77
78}
79
80#endif
degenerate base class for the Acyclic Visitor pattern
Definition: visitor.hpp:33
Concrete date class.
Definition: date.hpp:125
Cash flow dependent on an index ratio.
virtual Real notional() const
virtual bool growthOnly() const
virtual ext::shared_ptr< Index > index() const
Cash flow dependent on a zero inflation index ratio.
ext::shared_ptr< ZeroInflationIndex > zeroInflationIndex_
CPI::InterpolationType observationInterpolation() const
Real amount() const override
returns the amount of the cash flow
void accept(AcyclicVisitor &) override
CPI::InterpolationType observationInterpolation_
ext::shared_ptr< ZeroInflationIndex > zeroInflationIndex() const
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35
InterpolationType
when you observe an index, how do you interpolate between fixings?