You are on page 1of 3

Mathematical Modeling and Computation in Finance

With Exercises and Python and MATLAB Computer Codes

C.W. Oosterlee & L.A. Grzelak

Solutions to exercises from Chapter 1

https://QuantFinanceBook.com

Ex 1.1. The cumulative distribution function for the standard normal distribution is given by,
Z x
FN(0,1) (x) = f (z)dz,
−∞

2
z /2
e√
where f (z) = 2π
is an even function. Changing the integration variable, y = −z, gives us,
Z ∞
FN(0,1) (x) = f (y)dy.
−x

Hence
Z x Z ∞ 
FN(0,1) (x) + FN(0,1) (−x) = f (z)dz + f (z)dz
−∞ x
Z ∞
= f (z)dz = 1.
−∞

Ex. 1.3. We have,

E[Y ] = E[a + bX] = a + bµ,


Var[Y ] = E[(bX − bµ)2 ] = Var[bX] = (bσ)2 ,
Z ∞ Z ∞
1 (x−µ)2 1 (x−(µ+σ 2 ))2 2
E[eX ] = √ ex e− 2σ2 dx = √ e− 2σ 2 eµ+σ /2 dx
2π −∞ 2π −∞
2
= eµ+σ /2
.

Ex. 1.5. a. By linearity, we find,


n
1X
E[X̄] = E[Xk ] = µ.
n
k=1

b.
1 hXX i
2
Var[X̄] = E X i j −µ
X
n2 i j
 
1 X XX
= 2 E[Xi2 ] + E[Xi Xj ] − µ2 .
n i i j6=i

1
For each variable, E[Xi2 ] = µ2 + σ 2 , and since the random variables are independent,
it follows that E[Xi Xj ] = E[Xi ]E[Xj ]. Hence,
1 hXX i
Var[X̄] = 2 E Xi Xj − µ2
n i j
1
n(µ2 + σ 2 ) + n(n − 1)µ2 − µ2 = σ 2 /n.

= 2
n
c. We find,
N
X N
X
2
Xk2 − 2Xk X̄ + X̄ 2

(Xk − X̄) =
k=1 k=1
N
X
= Xk2 − 2N X̄ 2 + N X̄ 2
k=1
N
X
= Xk2 − N X̄ 2 .
k=1

d. Using the result of part c),


N
!
2 1 X 1
E[Xk2 ] 2
N (σ 2 + µ2 ) − N (σ 2 /N + µ2 ) = σ 2 .

E[vN ] = − N E[X̄ ] =
N −1 N −1
k=1

Ex. 1.7. By using Leibniz’ rule for zW (z), we obtain,

d(zW (z)) = dzW (z) + zdW (z).

Integrating both sides gives,


Z t Z t Z t
W (z)dz = d(zW (z)) − zdW (z).
0 0 0

The first integral on the right-hand side can be expressed as,


Z t Z t
d(zW (z)) = tW (t) = t dW (z).
0 0

Hence
Z t Z t
W (z)dz = (t − z)dW (z).
0 0

Ex. 1.9. a. The SDE must not contain a drift term. The differential process of the integral equation
is found to be,

dX(t) = d(g(t)W (t)) − g 0 (t)W (t)dt


= g 0 (t)W (t)dt − g(t)dW (t) − g 0 (t)W (t)dt
= −g(t)dW (t),

where the differentiation, denoted by d, is in the Itô sense. Hence, the process is a
martingale.

b. Express the term e2t W (t) in its integral form. as follows,

d(e2t W (t)) = 2e2t W (t)dt + e2t dW (t)


Z t=0
e2T W (T ) = (2e2t W (t)dt + e2t dW (t)),
t=T

2
where W (0) = 0 is used in the second equation. Taking expectations at both sides and
R t=0
using E[ t=T e2t dW (t)] = 0, because infinitesimal increments of Brownian motion are
governed by a normal distribution with zero mean, gives,

 t=0 2t
Z
E[e2T W (T )] = E

2e W (t)dt .
t=T

Ex. 1.11. Integrating the differential process dX(t), we get

X(T ) = µT + σW (T ) + x0 .

Substituting this into the integral, gives us,


Z T Z T
2
X(t)dt = µT /2 + x0 T + σW (t)dt.
0 0

We now use the identity derived in Exercise 1.7,


Z T Z T
X(t)dt = µT 2 /2 + x0 T + σ (T − t)dW (t).
0 0
RT
The integral 0
(T − t)dW (t) can be discretized, giving,
Z T N
X
(T − t)dW (t) = limN →∞ (T − t)∆Wi ,
0 i=0

where ∆Wi = Wi+1 − Wi , and each of these increments follows a normal distribution. The
sum of normal random variables is also a normal random variable. Its mean and variance
are given by,
Z T
X(t)dt = µT 2 /2 + x0 T.
 
E
0

" #
Z T Z T 2
2
− (µT 2 /2 + x0 T )2
 
Var X(t)dt = E µT /2 + x0 T + σ (T − t)dW (t)
0 0
hZ T i
= (µT 2 /2 + x0 T )2 + σ(µT 2 /2 + x0 T )E (T − t)dW (t)
0
" Z #
T 2
+E σ (T − t)dW (t) .
0

The second term in the second equation vanishes. Finally, with the Itô isometry on the final
integral, we find,
" Z #
T Z T
2 2 1
E σ (T − t)dW (t) =σ E[(T − t)2 ]dt = σ 2 T 3 .
0 0 3

Therefore,
Z T  
1 2 1 2 3
X(t)dt ∼ N x0 T + µT , σ T .
0 2 3

You might also like