QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
cpicouponpricer.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2009, 2011 Chris Kenyon
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_cpicouponpricer_hpp
25#define quantlib_cpicouponpricer_hpp
26
27#include <ql/cashflow.hpp>
28#include <ql/option.hpp>
29#include <ql/cashflows/inflationcouponpricer.hpp>
30#include <ql/cashflows/cpicoupon.hpp>
31#include <ql/termstructures/volatility/inflation/cpivolatilitystructure.hpp>
32
33namespace QuantLib {
34
36
40 public:
42
45
46 QL_DEPRECATED_DISABLE_WARNING
47 ~CPICouponPricer() override = default;
48 QL_DEPRECATED_ENABLE_WARNING
49
51 return capletVol_;
52 }
53
56 }
57
58 virtual void setCapletVolatility(
59 const Handle<CPIVolatilitySurface>& capletVol);
60
61
63
64 Real swapletPrice() const override;
65 Rate swapletRate() const override;
66 Real capletPrice(Rate effectiveCap) const override;
67 Rate capletRate(Rate effectiveCap) const override;
68 Real floorletPrice(Rate effectiveFloor) const override;
69 Rate floorletRate(Rate effectiveFloor) const override;
70 void initialize(const InflationCoupon&) override;
72
73 virtual Rate accruedRate(Date settlementDate) const;
74
75 protected:
76 virtual Real optionletPrice(Option::Type optionType,
77 Real effStrike) const;
78
79 virtual Real optionletRate(Option::Type optionType,
80 Real effStrike) const;
81
89 Real forward, Real stdDev) const;
90
94 [[deprecated("Do not use this method. In derived classes, override accruedRate.")]]
95 virtual Rate adjustedFixing(Rate fixing = Null<Rate>()) const;
96
97 // data
105 [[deprecated("Do not use this data member. A spread doesn't make sense for these coupons.")]]
108 };
109
110}
111
112#endif
Coupon paying the performance of a CPI (zero inflation) index
Definition: cpicoupon.hpp:55
base pricer for capped/floored CPI coupons N.B. vol-dependent parts are a TODO
void initialize(const InflationCoupon &) override
QL_DEPRECATED_DISABLE_WARNING ~CPICouponPricer() override=default
Handle< CPIVolatilitySurface > capletVol_
Real capletPrice(Rate effectiveCap) const override
Rate floorletRate(Rate effectiveFloor) const override
virtual Rate adjustedFixing(Rate fixing=Null< Rate >()) const
virtual QL_DEPRECATED_ENABLE_WARNING Handle< CPIVolatilitySurface > capletVolatility() const
virtual void setCapletVolatility(const Handle< CPIVolatilitySurface > &capletVol)
Handle< YieldTermStructure > nominalTermStructure_
virtual Real optionletPrice(Option::Type optionType, Real effStrike) const
virtual Handle< YieldTermStructure > nominalTermStructure() const
virtual Rate accruedRate(Date settlementDate) const
virtual Real optionletRate(Option::Type optionType, Real effStrike) const
virtual Real optionletPriceImp(Option::Type, Real strike, Real forward, Real stdDev) const
Rate swapletRate() const override
Real floorletPrice(Rate effectiveFloor) const override
Real swapletPrice() const override
Rate capletRate(Rate effectiveCap) const override
Concrete date class.
Definition: date.hpp:125
Shared handle to an observable.
Definition: handle.hpp:41
Base inflation-coupon class.
Base inflation-coupon pricer.
template class providing a null value for a given type.
Definition: null.hpp:76
QL_REAL Real
real number
Definition: types.hpp:50
Real Spread
spreads on interest rates
Definition: types.hpp:74
Real Rate
interest rates
Definition: types.hpp:70
Definition: any.hpp:35