1Short-rate modelling framework(3) QuantLib Short-rate modelling framework(3)
2
3
4
6 Short-rate modelling framework -
7
9 This framework (corresponding to the ql/ShortRateModels directory)
10 implements some single-factor and two-factor short rate models. The
11 models implemented in this library are widely used by practitionners.
12 For the moment, the ShortRateModels::Model class defines the short-rate
13 dynamics with stochastic equations of the type dx_i = (t,x_i) dt +
14 ma(t,x_i) dW_t ] where $ r = f(t,x) $. If the model is affine (i.e.
15 derived from the QuantLib::AffineModel class), analytical formulas for
16 discount bonds and discount bond options are given (useful for
17 calibration).
18
20 The Hull & White model.RS 4 dr_t = (heta(t) - lpha(t) r_t)dt + ma(t)
21 dW_t ] When $ lpha $ and $ ma $ are constants, this model has
22 analytical formulas for discount bonds and discount bond options.
23
25analytical tractability here.
26
28t{r_t} dW_t ] There are analytical formulas for discount bonds (and soon for
29discount bond options).
30
32 The class CalibrationHelper is a base class that facilitates the
33 instanciation of market instruments used for calibration. It has a
34 method marketValue() that gives the market price using a Black formula,
35 and a modelValue() method that gives the price according to a model
36
37 Derived classed are QuantLib::CapHelper and QuantLib::SwaptionHelper.
38
39 For the calibration itself, you must choose an optimization method that
40 will find constant parameters such that the value: V = t{_{i=1}^{n}
41 ac{(T_i - M_i)^2}{M_i}}, ] where $ T_i $ is the price given by the
42 model and $ M_i $ is the market price, is minimized. A few optimization
43 methods are available in the ql/Optimization directory.
44
47 Analytical pricers.RS 4
48
49
50If the model is affine, i.e. discount bond options formulas exist, caps are
51easily priced since they are a portfolio of discount bond options. Such a
52pricer is implemented in QuantLib::AnalyticalCapFloor. In the case of single-
53factor affine models, swaptions can be priced using the Jamshidian
54decomposition, implemented in QuantLib::JamshidianSwaption.
55
57
58
59(Doesn't work for the moment) For the moment, this is only available for
60single-factor affine models. If $ x = x(t, r) $ is the state variable and
61follows this stochastic process: dx_t = (t,x)dt + ma(t,x)dW_t ] any european-
62style instrument will follow the following PDE:
63
64ac{artial
65P}{artial
66t} + ac{artial
67P}{artial
68x} + ac{1}{2} ma^2 ac{artial^2
69P}{artial
70x^2} = r(t,x)P ].PP The adequate operator to feed a Finite Difference Model
71instance is defined in the QuantLib::OneFactorOperator class.
72
74
75
76Each model derived from the single-factor model class has the ability to
77return a trinomial tree. For yield-curve consistent models, the fitting
78parameter can be determined either analytically (when possible) or
79numerically. When a tree is built, it is then pretty straightforward to
80implement a pricer for any path-independant derivative. Just implement a class
81derived from NumericalDerivative (see QuantLib::NumericalSwaption for example)
82and roll it back until the present time... Just look at QuantLib::TreeCapFloor
83and QuantLib::TreeSwaption for working pricers.
84
85 Classes
86 class AffineModel
87 Affine model class.
88 class TermStructureConsistentModel
89 Term-structure consistent model class.
90 class ShortRateModel
91 Abstract short-rate model class.
92 class OneFactorModel
93 Single-factor short-rate model abstract class.
94 class OneFactorAffineModel
95 Single-factor affine base class.
96 class BlackKarasinski
97 Standard Black-Karasinski model class.
98 class CoxIngersollRoss
99 Cox-Ingersoll-Ross model class.
100 class ExtendedCoxIngersollRoss
101 Extended Cox-Ingersoll-Ross model class.
102 class HullWhite
103 Single-factor Hull-White (extended Vasicek) model class.
104 class Vasicek
105 Vasicek model class
106 class TwoFactorModel
107 Abstract base-class for two-factor models.
108 class G2
109 Two-additive-factor gaussian model class.
110
111
112
113Version 0.8.1 29 Oct 2007Short-rate modelling framework(3)