QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
inflationcapfloorengines.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2009 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
20/*! \file inflationcapfloorengines.hpp
21 \brief Inflation cap/floor engines
22 */
23
24#ifndef quantlib_pricers_inflation_capfloor_hpp
25#define quantlib_pricers_inflation_capfloor_hpp
26
29#include <ql/option.hpp>
30
31namespace QuantLib {
32
33 class Quote;
34 class YoYOptionletVolatilitySurface;
35 class YoYInflationIndex;
36
37 //! Base YoY inflation cap/floor engine
38 /*! This class doesn't know yet what sort of vol it is. The
39 inflation index must be linked to a yoy inflation term
40 structure.
41
42 \ingroup inflationcapfloorengines
43 */
45 public:
46 YoYInflationCapFloorEngine(ext::shared_ptr<YoYInflationIndex>,
49
50 ext::shared_ptr<YoYInflationIndex> index() const { return index_;}
53
55
56 void calculate() const override;
57
58 protected:
59 //! descendents only need to implement this
60 virtual Real optionletImpl(Option::Type type, Rate strike,
61 Rate forward, Real stdDev,
62 Real d) const = 0;
63
64 ext::shared_ptr<YoYInflationIndex> index_;
67 };
68
69
70
71 //! Black-formula inflation cap/floor engine (standalone, i.e. no coupon pricer)
74 public:
75 YoYInflationBlackCapFloorEngine(const ext::shared_ptr<YoYInflationIndex>&,
78 protected:
79 Real
80 optionletImpl(Option::Type, Real strike, Real forward, Real stdDev, Real d) const override;
81 };
82
83
84 //! Unit Displaced Black-formula inflation cap/floor engine (standalone, i.e. no coupon pricer)
87 public:
89 const ext::shared_ptr<YoYInflationIndex>&,
92 protected:
93 Real
94 optionletImpl(Option::Type, Real strike, Real forward, Real stdDev, Real d) const override;
95 };
96
97
98 //! Unit Displaced Black-formula inflation cap/floor engine (standalone, i.e. no coupon pricer)
101 public:
103 const ext::shared_ptr<YoYInflationIndex>&,
106 protected:
107 Real
108 optionletImpl(Option::Type, Real strike, Real forward, Real stdDev, Real d) const override;
109 };
110
111}
112
113#endif
Shared handle to an observable.
Definition: handle.hpp:41
Unit Displaced Black-formula inflation cap/floor engine (standalone, i.e. no coupon pricer)
Real optionletImpl(Option::Type, Real strike, Real forward, Real stdDev, Real d) const override
descendents only need to implement this
Black-formula inflation cap/floor engine (standalone, i.e. no coupon pricer)
Real optionletImpl(Option::Type, Real strike, Real forward, Real stdDev, Real d) const override
descendents only need to implement this
base class for cap/floor engines
Base YoY inflation cap/floor engine.
void setVolatility(const Handle< YoYOptionletVolatilitySurface > &vol)
ext::shared_ptr< YoYInflationIndex > index() const
ext::shared_ptr< YoYInflationIndex > index_
Handle< YieldTermStructure > nominalTermStructure_
virtual Real optionletImpl(Option::Type type, Rate strike, Rate forward, Real stdDev, Real d) const =0
descendents only need to implement this
Handle< YieldTermStructure > nominalTermStructure() const
Handle< YoYOptionletVolatilitySurface > volatility_
Handle< YoYOptionletVolatilitySurface > volatility() const
Unit Displaced Black-formula inflation cap/floor engine (standalone, i.e. no coupon pricer)
Real optionletImpl(Option::Type, Real strike, Real forward, Real stdDev, Real d) const override
descendents only need to implement this
Date d
QL_REAL Real
real number
Definition: types.hpp:50
Real Rate
interest rates
Definition: types.hpp:70
inflation cap and floor class, just year-on-year variety for now
Definition: any.hpp:35
Base option class.
yoy inflation volatility structures