QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
swapforwardmappings.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2006 Ferdinando Ametrano
5 Copyright (C) 2006, 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
25#ifndef quantlib_swap_forward_mappings_hpp
26#define quantlib_swap_forward_mappings_hpp
27
28#include <ql/math/matrix.hpp>
29
30namespace QuantLib {
31
32 class CurveState;
33 class MarketModel;
34
36 public:
37
39 static Real annuity(const CurveState& cs,
40 Size startIndex,
41 Size endIndex,
42 Size numeraireIndex);
43
45 static Real swapDerivative(const CurveState& cs,
46 Size startIndex,
47 Size endIndex,
48 Size forwardIndex);
49
53
56 static Matrix coterminalSwapZedMatrix(const CurveState& cs, Spread displacement);
57
61
64 static Matrix coinitialSwapZedMatrix(const CurveState& cs, Spread displacement);
65
66
70 Size spanningForwards);
71
74 static Matrix cmSwapZedMatrix(const CurveState& cs, Size spanningForwards, Spread displacement);
75
82 static Real
83 swaptionImpliedVolatility(const MarketModel& volStructure,
84 Size startIndex,
85 Size endIndex);
86
87 };
88
89}
90
91#endif
Curve state for market-model simulations
Definition: curvestate.hpp:41
base class for market models
Definition: marketmodel.hpp:39
Matrix used in linear algebra.
Definition: matrix.hpp:41
static Matrix coinitialSwapZedMatrix(const CurveState &cs, Spread displacement)
static Matrix coterminalSwapZedMatrix(const CurveState &cs, Spread displacement)
static Matrix cmSwapZedMatrix(const CurveState &cs, Size spanningForwards, Spread displacement)
static Real swaptionImpliedVolatility(const MarketModel &volStructure, Size startIndex, Size endIndex)
static Real swapDerivative(const CurveState &cs, Size startIndex, Size endIndex, Size forwardIndex)
compute derivative of swap-rate to underlying forward rate
static Matrix coinitialSwapForwardJacobian(const CurveState &cs)
static Real annuity(const CurveState &cs, Size startIndex, Size endIndex, Size numeraireIndex)
compute annuity of arbitrary swap-rate
static Matrix cmSwapForwardJacobian(const CurveState &cs, Size spanningForwards)
static Matrix coterminalSwapForwardJacobian(const CurveState &cs)
QL_REAL Real
real number
Definition: types.hpp:50
Real Spread
spreads on interest rates
Definition: types.hpp:74
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35