Chapter 3 Stochastic volatility Markov-functional models
3.3.1 Numerical implementation
Let us develop a practical algorithm to implement a two-dimensional LIBOR MFM numerically. This algorithm is very general and does not rely on the Gaussian assumption of the driving process. Suppose we are given a two-dimensional diffusion process (y, q) and we take it as a driving Markov process. The specification of the driver for a stochastic volatility MFM will be discussed later in this section.
Grid Points
We now present the numerical implementation of the model on a grid. We construct grid points for the Markov process on the date structure Ti , i = 1, ..., n. we
construct m equidistant grid points −∞ < yi,1 < yi,2 < ... < yi,m < ∞ and
−∞ < qi,1 < qi,2 < ... < qi,m < ∞ for (yTi, qTi) at time Ti for i = 1, ..., n. The
grid points are chosen such that the intervals [yi,1, yi,m] and [qi,1, qi,m] cover most of
probability mass ofyTi and qTi respectively i.e.
Fn+1(yi,1 ≤yTi ≤yi,m)≥1−y
Fn+1(qi,1 ≤qTi ≤qi,m)≥1−q
where positive constantsy and q are small enough e.g. 0.001%.
Basis Function
Since MFMs are implemented on a grid, any smooth function of the state variable (yTi, qTi) is valued and discretized on the grid points. In order to approximate and
interpolate these functions we introduce the idea of basis function.
The one-dimensional basis function bi,j : R → R for i = 1, ..., n and j =
1, ..., mwith respect to the partition of [yi,1, yi,m] can be written in the form of
bi,j(y) := m−1 X j0=1 M X d=0
byi,j,j0,dydI{y∈[yi,j0,yi,j0+1)} satisfying
bi,j(yi,u) =δj,u
for some coefficientsbyi,j,j0,d∈R, whereδj,u is Kronecker delta function. The details
of a basis function construction and the calculation of its coefficients can be found in Appendix 3.B.
The two-dimensional basis functions w.r.t the partition of [yi,1, yi,m]×[qi,1, qi,m]
can be expressed as the product of the two corresponding one-dimensional basis functions
bi,j,k(y, q) :=bi,j(y)×bi,k(q)
= m−1 X j0k0=1 M X d,l=0
byi,j,j0,dbqi,k,k0,lydqlI{y∈[y
i,j0,yi,j0+1)}∩{q∈[qi,k0,qi,k0+1)} (3.19)
satisfying
for coefficients (byi,j,j0,d, b
q
i,k,k0,l)∈R2,i= 1, ..., nand j, k= 1, ..., m.
Notice that the basis functions above are just piecewise polynominal, and they are used to approximate a smooth function. In particular, any smooth function f : R → R defined on the interval [yi,1, yi,m] can be approximated by a piecewise
polynomial function ˜f in terms of basis functions:
˜ f(y) := m X j=1 f(yi,j)bi,j(y). (3.20)
Similarly, any two-dimensional smooth functiong:R2→ Rdefined on the interval
[yi,1, yi,m]×[qi,1, qi,m] can be approximated by a piecewise polynomial function ˜g in
terms of two-dimensional basis functions: ˜
g(y, q) :=
m
X
j,k=1
g(yi,j, qi,k)bi,j,k(y, q). (3.21)
Building Blocks
Now we define and evaluate three (conditional) expectations which will be taken as building blocks. We will show that MFMs can be implemented by using these building blocks. In practice we will store these building blocks for efficient imple- mentation. Let us first consider the following one step conditional moments:
Θij,k,d,l(yi−1,u, qi−1,v) (3.22)
:=EFn+1[ydT
iq
l
TiI{yTi∈[yi,j,yi,j+1)}∩{qTi∈[qi,k,qi,k+1)}|yTi−1 =yi−1,u, qTi−1 =qi−1,v] fori= 1, ..., n; j, k= 1, ..., m−1; d, l= 0, ..., M and u, v= 1, ..., m. Note that the information on the transition density function of the driving process is given to us via the above one step conditional moments. We will present the evaluation of the above one step conditional moments later in this section after we choose and discuss the driving process. For now we assume that the functions Θij,k,d,l : R2 → R are
given at each grid point. Suppose we have a specific driving process and pre-model in mind, which will be discussed later, and we define the following three (conditional) expectations:
∆ij,k(yi−1,u, qi−1,v) :=EFn+1[bi,j,k(yTi, qTi)|yTi−1 =yi−1,u, qTi−1 =qi−1,v], Ei,j,k :=EFn+1[bi,j,k(yT
i, qTi)],
Γij,k,u:=EFn+1[bi,j,k(yTi, qTi)I{y
fori= 1, ..., n;j, k= 1, ..., mand u= 1, ..., m. Note that the third building blocks Γ may differ for a different choice of driving process and pre-model and we will see this later.
Remark 4. The building blocks∆i
j,k(yi−1,u, qi−1,v)andΓij,k,u will be needed to deter-
mine the functional forms of ZCBs. We use the building blockEi,j,k in applications
such as pricing options.
Now we can show that the three (conditional) expectations can be evaluated via the function Θij,k,d,l.
Proposition 1. The three (conditional) expectations can be expressed as ∆ij,k(yi−1,u, qi−1,v) = m−1 X j0=1 M X d=0 byi,j,j0,d m−1 X k0=1 M X l=0
bqi,k,k0,lΘij0,k0,d,l(yi−1,u, qi−1,v)
Ei,j,k = m
X
u,v=1
∆ij,k(yi−1,u, qi−1,v)Ei−1,u,v
Γij,k,u = M X d=0 byi,j,u,d m−1 X k0=1 M X l=0 bqi,k,k0,l m X u0,v=1
Θiu,k0,d,l(yi−1,u0, qi−1,v)Ei−1,u0v
where by’s and bq’s are coefficients for basis functions (3.19).
Proof. See Appendix 3.C.
Having calculated the building blocks one can store and use them in the nu- merical implementation.
Practical Algorithm
We now present the numerical implementation of the stochastic volatility LIBOR MFM by developing a practical algorithm based on the building blocks. We deter- mine functional forms of ZCBs by backwards induction on time Ti. At time Tn+1 by definition we have
DTn+1Tn+1(yTn+1, qTn+1) = 1.
Assume that we have determined DTjTk(yTj, qTj) for j = i+ 1, ..., n+ 1 and k =
j, ..., n+ 1. At timeTi, by definition, the LIBORLiTi is given by
LiTi = 1−DTiTi+1 αiDTiTi+1
that the numeraire at timeTi can be expressed as DTiTn+1 = 1 b DTiTi+1(1 +αiL i Ti) , (3.23)
where the numeraire-rebased ZCBs is defined as
b
DTiTi+1:=
DTiTi+1 DTiTn+1 .
We can observe from equation (3.23) that once we have determined functional forms of DbTiTi+1(yTi, qTi) and LiT
i(yTi, qTi), the functional form of the numeraire
DTiTn+1(yTi, qTi) at timeTi is immediate.
We first find functional forms of DbTiTi+1(yTi, qTi). It follows from the mar- tingale property and equation (3.21) that
b DTiTi+1(yTi, qTi) =EFn+1[ 1 DTi+1Tn+1(yTi+1, qTi+1) |yTi, qTi] ≈EFn+1[ m X j,k=1 1 DTi+1Tn+1(yi+1,j, qi+1,k) bi+1,j,k(yTi+1, qTi+1)|yTi, qTi] = m X j,k=1 1 DTi+1Tn+1(yi+1,j, qi+1,k) ∆ij,k+1(yTi, qTi),
whereDTi+1Tn+1(yi+1,j, qi+1,k) has already been determined at timeTi+1.
Now we determine the functional form LiTi(yTi, qTi) by feeding in the input
prices of digital caplets corresponding to the ith LIBOR Li. We assume that the input prices V0i : [0,∞] → R of digital caplets at strikes K ≥ 0 are given for i= 1, ..., n. Recall that following the fundamental pricing formula inFn+1 we have
equation (3.6).
In order to find the functional forms of LIBORs we still need one more assumption:
(A.4): In the model, LiT
i is a monotonic increasing function of yTi.
Note that one can think of the variableyTi itself as a pre-model at time Ti
fori= 1, ..., n. For a different specification of the driving process, the form of the pre-model may differ. An explanation of this assumption will be given later after we specify the driving process (y, q).
Now we determine the functional form Li
fromj =m toj= 1, we evaluate
J0i(yi,j) =D0Tn+1EFn+1[DbTiTi+1(yTi, qTi)I{yTi>yi,j}] (3.24)
≈D0Tn+1EFn+1[
m
X
u,v=1 b
DTiTi+1(yi,u, qi,v)bi,u,v(yTi, qTi)I{yTi>yi,j}]
=D0Tn+1
m
X
u,v=1 b
DTiTi+1(yi,u, qi,v)EFn+1[bi,u,v(yTi, qTi)I{yTi>yi,j}]
=J0i(yi,j+1) +D0Tn+1 m X u,v=1 b DTiTi+1(yi,u, qi,v)Γ i u,v,j.
Compare equation (??) with (3.24), and it turns out that functionsJ0i and V0i are the same except for the indicator function. By assumption (A.4) for each valueyi,j
we can always find a unique strikeK such that
{yTi > yi,j}={L
i
Ti > K} (3.25)
holds. Thus for each value of Ji
0(yi,j), we can always find a unique strike K such
that
J0i(yi,j) =V0i(K),
where the functionK(yi,j) can be solved as
K(yi,j) = (V0i)
−1(Ji
0(yi,j)).
It follows from (3.25) that
LiTi(yi,j) =K(yi,j).
Note that Li
Ti is just a function of random variable yTi so that L
i
Ti(yTi, qTi) =
LiT
i(yTi).
We have found the functional form LiT
i(yTi), and therefore the functional
form DTiTn+1(yTi, qTi) is immediate from equation (3.23). Finally the functional
forms of ZCBsDTiTj(yTi, qTi),i < j < n+ 1, can be determined by the martingale
property: DTiTj(yTi, qTi) =DTiTn+1(yTi, qTi)EFn+1[ DTi+1Tj(yTi+1, qTi+1) DTi+1Tn+1(yTi+1, qTi+1) |yTi, qTi] ≈DTiTn+1(yTi, qTi) m X u,v=1 DTi+1Tj(yi+1,u, qi+1,v) DTi+1Tn+1(yi+1,u, qi+1,v) ∆iu,v+1(yTi, qTi).
In pricing applications we will need to take expectations of payoff functions. If the expectation of a smooth functionfiof the bivariate random variable (yTi, qTi)
is finite, we can approximate it as
EFn+1[fi(yTi, qTi)]≈E Fn+1[
m
X
u,v=1
fi(yi,u, qi,v)bi,u,v(yTi, qTi)]
=
m
X
u,v=1
fi(yi,u, qi,v)Ei,u,v.