QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
liborforwardmodel.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) 2005, 2006 Klaus Spanderen
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 liborforwardmodel.hpp
21 \brief libor forward model incl. exact cap pricing
22 Rebonato formula to approximate swaption prices.
23*/
24
25#ifndef quantlib_libor_forward_model_hpp
26#define quantlib_libor_forward_model_hpp
27
31#include <ql/models/model.hpp>
33
34namespace QuantLib {
35
36 //! %Libor forward model
37 /*! References:
38
39 Stefan Weber, 2005, Efficient Calibration for Libor Market Models,
40 (<http://workshop.mathfinance.de/2005/papers/weber/slides.pdf>)
41
42 Damiano Brigo, Fabio Mercurio, Massimo Morini, 2003,
43 Different Covariance Parameterizations of Libor Market Model and Joint
44 Caps/Swaptions Calibration,
45 (<http://www.business.uts.edu.au/qfrc/conferences/qmf2001/Brigo_D.pdf>
46
47 \test the correctness is tested using Monte-Carlo Simulation to
48 reproduce swaption npvs, model calibration and exact cap pricing
49 */
50
52 public:
54 const ext::shared_ptr<LiborForwardModelProcess> & process,
55 const ext::shared_ptr<LmVolatilityModel> & volaModel,
56 const ext::shared_ptr<LmCorrelationModel> & corrModel);
57
58 Rate S_0(Size alpha, Size beta) const;
59 // approx. swaption matrix using Rebonato's approx.
60 // fix and floating leg have the same frequency
61 virtual ext::shared_ptr<SwaptionVolatilityMatrix>
63
64 DiscountFactor discount(Time t) const override;
65 Real discountBond(Time now, Time maturity, Array factors) const override;
67 Real strike,
68 Time maturity,
69 Time bondMaturity) const override;
70
71 void setParams(const Array& params) override;
72
73 protected:
74 Array w_0(Size alpha, Size beta) const;
75
76 std::vector<Real> f_;
77 std::vector<Time> accrualPeriod_;
78
79 const ext::shared_ptr<LfmCovarianceProxy> covarProxy_;
80 const ext::shared_ptr<LiborForwardModelProcess> process_;
81
82 mutable ext::shared_ptr<SwaptionVolatilityMatrix> swaptionVola;
83 };
84
85}
86
87
88#endif
89
caplet variance curve
Affine model class.
Definition: model.hpp:45
1-D array used in linear algebra.
Definition: array.hpp:52
Calibrated model class.
Definition: model.hpp:86
Array params() const
Returns array of arguments on which calibration is done.
Definition: model.cpp:126
Real discountBond(Time now, Time maturity, Array factors) const override
const ext::shared_ptr< LfmCovarianceProxy > covarProxy_
void setParams(const Array &params) override
Rate S_0(Size alpha, Size beta) const
Array w_0(Size alpha, Size beta) const
std::vector< Time > accrualPeriod_
Real discountBondOption(Option::Type type, Real strike, Time maturity, Time bondMaturity) const override
DiscountFactor discount(Time t) const override
Implied discount curve.
virtual ext::shared_ptr< SwaptionVolatilityMatrix > getSwaptionVolatilityMatrix() const
const ext::shared_ptr< LiborForwardModelProcess > process_
ext::shared_ptr< SwaptionVolatilityMatrix > swaptionVola
const DefaultType & t
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
Real DiscountFactor
discount factor between dates
Definition: types.hpp:66
Real Rate
interest rates
Definition: types.hpp:70
std::size_t Size
size of a container
Definition: types.hpp:58
proxy for libor forward covariance parameterization
stochastic process of a libor forward model
Abstract interest rate model class.
Definition: any.hpp:35
Real beta
Definition: sabr.cpp:200
Real alpha
Definition: sabr.cpp:200
Swaption at-the-money volatility matrix.