QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
inflationhelpers.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2007, 2009 Chris Kenyon
5 Copyright (C) 2007 StatPro Italia srl
6
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19 */
20
25#ifndef quantlib_inflation_helpers_hpp
26#define quantlib_inflation_helpers_hpp
27
28#include <ql/instruments/yearonyearinflationswap.hpp>
29#include <ql/instruments/zerocouponinflationswap.hpp>
30#include <ql/termstructures/bootstraphelper.hpp>
31#include <ql/termstructures/inflationtermstructure.hpp>
32
33namespace QuantLib {
34
36 class ZeroCouponInflationSwapHelper : public BootstrapHelper<ZeroInflationTermStructure> {
37 public:
39 const Handle<Quote>& quote,
40 const Period& swapObsLag, // lag on swap observation of index
41 const Date& maturity,
42 Calendar calendar, // index may have null calendar as valid on every day
43 BusinessDayConvention paymentConvention,
44 DayCounter dayCounter,
45 ext::shared_ptr<ZeroInflationIndex> zii,
46 CPI::InterpolationType observationInterpolation,
47 Handle<YieldTermStructure> nominalTermStructure);
48
50 Real impliedQuote() const override;
51
52 protected:
58 ext::shared_ptr<ZeroInflationIndex> zii_;
60 ext::shared_ptr<ZeroCouponInflationSwap> zciis_;
62 };
63
64
66 class YearOnYearInflationSwapHelper : public BootstrapHelper<YoYInflationTermStructure> {
67 public:
69 const Period& swapObsLag_,
70 const Date& maturity,
71 Calendar calendar,
72 BusinessDayConvention paymentConvention,
73 DayCounter dayCounter,
74 ext::shared_ptr<YoYInflationIndex> yii,
75 Handle<YieldTermStructure> nominalTermStructure);
76
78 Real impliedQuote() const override;
79
80 protected:
86 ext::shared_ptr<YoYInflationIndex> yii_;
87 ext::shared_ptr<YearOnYearInflationSwap> yyiis_;
89 };
90
91}
92
93
94#endif
Base helper class for bootstrapping.
calendar class
Definition: calendar.hpp:61
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
Shared handle to an observable.
Definition: handle.hpp:41
Year-on-year inflation-swap bootstrap helper.
void setTermStructure(YoYInflationTermStructure *) override
ext::shared_ptr< YearOnYearInflationSwap > yyiis_
ext::shared_ptr< YoYInflationIndex > yii_
Handle< YieldTermStructure > nominalTermStructure_
Base class for year-on-year inflation term structures.
Zero-coupon inflation-swap bootstrap helper.
Handle< YieldTermStructure > nominalTermStructure_
void setTermStructure(ZeroInflationTermStructure *) override
CPI::InterpolationType observationInterpolation_
ext::shared_ptr< ZeroInflationIndex > zii_
ext::shared_ptr< ZeroCouponInflationSwap > zciis_
Interface for zero inflation term structures.
BusinessDayConvention
Business Day conventions.
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?