QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
inflationcapfloorengines.hpp
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
24#ifndef quantlib_pricers_inflation_capfloor_hpp
25#define quantlib_pricers_inflation_capfloor_hpp
26
27#include <ql/instruments/inflationcapfloor.hpp>
28#include <ql/termstructures/volatility/inflation/yoyinflationoptionletvolatilitystructure.hpp>
29#include <ql/option.hpp>
30
31namespace QuantLib {
32
33 class Quote;
34 class YoYOptionletVolatilitySurface;
35 class YoYInflationIndex;
36
38
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:
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
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
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
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
QL_REAL Real
real number
Definition: types.hpp:50
Real Rate
interest rates
Definition: types.hpp:70
Definition: any.hpp:35