File: fixedincome.docs

package info (click to toggle)
quantlib 1.41-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,480 kB
  • sloc: cpp: 400,885; makefile: 6,547; python: 214; sh: 150; lisp: 86
file content (103 lines) | stat: -rw-r--r-- 4,050 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

/*
 Copyright (C) 2000-2003 Sadruddin Rejeb

 This file is part of QuantLib, a free-software/open-source library
 for financial quantitative analysts and developers - http://quantlib.org/

 QuantLib is free software: you can redistribute it and/or modify it
 under the terms of the QuantLib license.  You should have received a
 copy of the license along with this program; if not, please email
 <quantlib-dev@lists.sf.net>. The license is also available online at
 <https://www.quantlib.org/license.shtml>.

 This program is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE.  See the license for more details.
*/

/*! \defgroup shortrate Short-rate modelling framework

    This framework (corresponding to the ql/models/shortrate directory)
    implements some single-factor and two-factor short rate models. The models 
    implemented in this library are widely used by practitioners. For the 
    moment, the ShortRateModel class defines the short-rate dynamics
    with stochastic equations of the type 
    \f[ 
        dx_i = \mu(t,x_i) dt + \sigma(t,x_i) dW_t 
    \f]
    where \f$ r = f(t,x) \f$. If the model is affine (i.e. derived from the
    QuantLib::AffineModel class), analytical formulas 
    for discount bonds and discount bond options are given (useful for 
    calibration). 

    \section singlefactormodels Single-factor models
    
    \par The Hull & White model
    \f[
        dr_t = (\theta(t) - \alpha(t) r_t)dt + \sigma(t) dW_t
    \f]
    When \f$ \alpha \f$ and \f$ \sigma \f$ are constants, this model
    has analytical formulas for discount bonds and discount bond options.

    \par The Black-Karasinski model
    \f[
        d\ln{r_t} = (\theta(t) - \alpha \ln{r_t})dt + \sigma dW_t
    \f]
    No analytical tractability here.

    \par The extended Cox-Ingersoll-Ross model
    \f[
        dr_t = (\theta(t) - k r_t)dt + \sigma \sqrt{r_t} dW_t
    \f]
    There are analytical formulas for discount bonds (and soon for discount 
    bond options).

    \section calibration Calibration

    The class CalibrationHelper is a base class that facilitates the 
    instantiation of market instruments used for calibration. It has
    a method marketValue() that gives the market price using a Black
    formula, and a modelValue() method that gives the price according to
    a model

    Derived classed are
    QuantLib::CapHelper and
    QuantLib::SwaptionHelper. 

    For the calibration itself, you must choose an optimization method that
    will find constant parameters such that the value:
    \f[
        V = \sqrt{\sum_{i=1}^{n} \frac{(T_i - M_i)^2}{M_i}},
    \f]
    where \f$ T_i \f$ is the price given by the model and \f$ M_i \f$ is the
    market price, is minimized. A few optimization methods are available in 
    the ql/Optimization directory.

    \section twofactormodels Two-factor models

    \section pricers Pricers

    \par Analytical pricers

    If the model is affine, i.e. discount bond options formulas exist, caps are
    easily priced since they are a portfolio of discount bond options. Such a
    pricer is implemented in QuantLib::AnalyticalCapFloor.
    In the case of single-factor affine models, swaptions can be priced using
    the Jamshidian decomposition, implemented in 
    QuantLib::JamshidianSwaption.

    \par Using Trees

    Each model derived from the single-factor model class has the ability to 
    return a trinomial tree. For yield-curve consistent models, the fitting
    parameter can be determined either analytically (when possible) or 
    numerically. When a tree is built, it is then pretty straightforward to 
    implement a pricer for any path-independent derivative. Just implement
    a class derived from NumericalDerivative (see 
    QuantLib::NumericalSwaption for example) and roll it back until 
    the present time...
    Just look at QuantLib::TreeCapFloor and 
    QuantLib::TreeSwaption for working pricers.

*/