QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
swaptionpseudojacobian.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4
5 Copyright (C) 2008 Mark Joshi
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
21
22#ifndef quantlib_swaption_pseudo_jacobian_hpp
23#define quantlib_swaption_pseudo_jacobian_hpp
24
25
26#include <ql/models/marketmodels/marketmodel.hpp>
27
36namespace QuantLib
37{
39 {
40
41 public:
42 SwaptionPseudoDerivative(const ext::shared_ptr<MarketModel>& inputModel,
43 Size startIndex,
44 Size endIndex);
45
46 const Matrix& varianceDerivative(Size i) const;
47 const Matrix& volatilityDerivative(Size i) const;
48
49 Real impliedVolatility() const;
50 Real variance() const;
51 Real expiry() const;
52
53
54
55 private:
56 ext::shared_ptr<MarketModel> inputModel_;
57 std::vector<Matrix> varianceDerivatives_;
58 std::vector<Matrix> volatilityDerivatives_;
59
63
64
65 };
66
79 {
80
81 public:
82 CapPseudoDerivative(const ext::shared_ptr<MarketModel>& inputModel,
83 Real strike,
84 Size startIndex,
85 Size endIndex,
86 Real firstDF);
87
88 const Matrix& volatilityDerivative(Size i) const;
89 const Matrix& priceDerivative(Size i) const;
90
91 Real impliedVolatility() const;
92
93
94
95 private:
96 ext::shared_ptr<MarketModel> inputModel_;
97
98 std::vector<Matrix> volatilityDerivatives_;
99
100 std::vector<Matrix> priceDerivatives_;
101
105
106
107
108 };
109
110}
111
112#endif
ext::shared_ptr< MarketModel > inputModel_
const Matrix & priceDerivative(Size i) const
const Matrix & volatilityDerivative(Size i) const
std::vector< Matrix > volatilityDerivatives_
Matrix used in linear algebra.
Definition: matrix.hpp:41
ext::shared_ptr< MarketModel > inputModel_
const Matrix & varianceDerivative(Size i) const
const Matrix & volatilityDerivative(Size i) const
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35