Upload
others
View
9
Download
0
Embed Size (px)
Citation preview
Solutions to Examples on
Stochastic Differential Equations
December 4, 2012
2
Q 1. LetW1(t) andW2(t) be two Wiener processes with correlated increments ∆W1 and ∆W2 such
that E [∆W1∆W2] = ρ∆t. Prove that E [W1(t)W2(t)] = ρ t. What is the value of E [W1(t)W2(s)]?
Answer
Let 0 = t0 < t1 < t2 < · · · < tn = t be a dissection of the interval [0, t], then
W(1)t =
n∑k=1
∆W(1)k , W
(2)t =
n∑k=1
∆W(2)k .
where W(1)k and W
(2)k are zero mean Gaussian deviates satisfying E[W (1)
k W(2)k ] = ρ(tk − tk−1). Thus
E[W (1)t W
(2)t ] = E
[( n∑k=1
∆W(1)k
)( n∑j=1
∆W(2)j
)]=
n∑j,k=1
E[∆W
(1)k ∆W
(2)j
]
However, ∆W(1)k and ∆W
(2)j are independent Gaussian deviates if k = j and so E
[∆W
(1)k ∆W
(2)j
]=
ρ(tk − tk−1)δ(k − j). Thus
E[W (1)t W
(2)t ] =
n∑k=1
ρ(tk − tk−1) = ρ(tn − t0) = ρ t .
Q 2. Let W (t) be a Wiener process and let λ be a positive constant. Show that λ−1W (λ2t) and
tW (1/t) are each Wiener processes.
Answer
This question concerns the properties of a random variable under changes of variable. We need to
show that each random variable is Gaussian distributed with mean value zero and variance t.
(a) Here t is a parameter and W (λ2t) is a Gaussian random variable with mean value zero and
variance λ2t. Let Y = λ−1W (λ2t) then
fY = fWdW
dY= λ fW = λ
1√2πλ2t
exp(− W 2
2λ2t
)=
1√2πt
exp(− λ2Y 2
2λ2t
)=
1√2πt
exp(− Y 2
2t
).
Thus Y is a Gaussian deviate with mean value zero and variance t.
(b) Here t is again a parameter and W (1/t) is a Gaussian random variable with mean value zero
and variance 1/t. Let Y = tW (1/t) then
fY = fWdW
dY=
1
tfW =
1
t
1√2π(1/t)
exp(− W 2
2(1/t)
)=
1√2πt
exp(− (Y/t)2
2λ2(1/t)
)=
1√2πt
exp(− Y 2
2t
).
Thus Y is a Gaussian deviate with mean value zero and variance t.
3
Q 3. Suppose that (ε1 , ε2) is a pair of uncorrelated N (0, 1) deviates.
(a) By recognising that ξx = σx ε1 has mean value zero and variance σ2x, construct a second deviate
ξy with mean value zero such that the Gaussian deviate X = [ ξx , ξy ]T has mean value zero
and correlation tensor
Ω =
σ2x ρ σxσy
ρ σxσy σ2y
where σx > 0, σy > 0 and | ρ | < 1.
(b) Another possible way to approach this problem is to recognise that every correlation tensor is
similar to a diagonal matrix with positive entries. Let
α =σ2x − σ2y
2, β =
1
2
√(σ2x + σ2y)
2 − 4(1− ρ2)σ2xσ2y =
√α2 − ρ2σ2xσ
2y .
Show that
Q =1√2β
√β + α −
√β − α√
β − α√β + α
is an orthogonal matrix which diagonalises Ω, and hence show how this idea may be used to
find X = [ ξx , ξy ]T with the correlation tensor Ω.
(c) Suppose that (ε1, . . . , εn) is a vector of n uncorrelated Gaussian deviates drawn from the dis-
tribution N (0, 1). Use the previous idea to construct an n-dimensional random column vector
X with correlation structure Ω where Ω is a positive definite n× n array.
Answer
(a) Let X = [ ξx , ξy ]T then ξx has variance σ2x and so we may write ξx = σx ε1 without any loss in
generality. The task is now to find ξy. The idea is to write ξy = α ε1+β ε2. It now follows that
E [ ξx ξy ] = E [σx ε1 (α ε1 + β ε2) ] = ασx
E [ ξy ξy ] = α2 + β2
Therefore, choose ασx = ρ σxσy and α2 + β2 = σ2y . Thus α = ρ σy and β2 = σ2y(1 − ρ2). One
possible vector deviate is
X =[σx ε1 , ρ σy ε1 +
√1− ρ2 σy ε2
]T.
4
(b) To check that Q is an orthogonal matrix, it is enough to observe that the two columns of Q are
orthogonal to each other, and that each column of Q is a unit vector. Thus
QTΩQ =1
2β
√β + α
√β − α
−√β − α
√β + α
σ2x ρ σxσy
ρ σxσy σ2y
√β + α −
√β − α√
β − α√β + α
Without substituting for α and β, the computation of QTΩQ simplifies to
1
2β
(β + α)σ2x + (β − α)σ2y + 2ρσxσy√β2 − α2 (σ2y − σ2x)
√β2 − α2 + 2αρσxσy
(σ2y − σ2x)√β2 − α2 + 2αρσxσy (β + α)σ2y + (β − α)σ2x − 2ρσxσy
√β2 − α2
.
We need to demonstrate that this is a diagonal matrix. Consider therefore
(σ2y − σ2x)√β2 − α2 + 2αρσxσy = −2α
√β2 − α2 + 2αρσxσy
= 2α(ρ σxσy −√β2 − α2) .
It follows directly from the definition of β that this entry is zero. Consequently, QTΩQ is a
diagonal matrix. By noting that, first that σ2x−σ2y = 2α and, second that ρ σxσy =√β2 − α2,
the array QTΩQ now becomes
1
2β
β(σ2x + σ2y) + 2α2 + 2ρσxσy√β2 − α2 0
0 β(σ2y + σ2x)− 2α2 − 2ρσxσy√β2 − α2
=
1
2β
β(σ2x + σ2y) + 2β2 0
0 β(σ2y + σ2x)− 2β2
=
1
2
σ2x + σ2y + 2β 0
0 σ2y + σ2x − 2β
It is again obvious from the definition of β that σ2y+σ
2x ≥ 2β and so the entries of this diagonal
matrix are non-negative. Let
Y =1√2
[ √σ2x + σ2y + 2β ε1 ,
√σ2x + σ2y − 2β ε2
]Twhere ε1 ∼ N(0, 1) and ε2 ∼ N(0, 1), then the random variable X = QY has mean value zero
and covariance tensor QTΩQ.
(c) Since Ω is a symmetric positive definite n × n array, it is possible to find an n × n orthog-
onal matrix Q such that Ω = QDQT in which D is a diagonal matrix whose entries are the
eigenvalues of Ω in some order. Since Ω is positive definite, then each entry of D is positive.
Let Y = [√λ1 ε1, · · · ,
√λn εn ]
T where λk > 0 is the k-th diagonal entry of D. Consider the
properties of X = QY . Clearly
E [X ] = E [QY ] = QE [Y ] = 0 ,
E [XXT ] = E [QY Y TQT ] = QE [Y Y T ]QT = QDQT = Ω .
5
Thus X has the required properties.
Q 4. Let X be normally distributed with mean zero and unit standard deviation, then Y = X2 is
said to be χ2 distributed with one degree of freedom.
(a) Show that Y is Gamma distribution with λ = ρ = 1/2.
(b) What is now the distribution of Z = aX2 if a > 0 and X ∼ N(0, σ2).
(b) If X1, · · · , Xn are n independent Gaussian distributed random variables with mean zero and
unit standard deviation, what is the distribution of Y = XTX where X is the n dimensional
column vector with k-th entry Xk.
Answer
(a) Since Y = X2 then clearly Y ≥ 0 and so every non-zero value of Y arises from either X or −X.
Therefore, the density of Y is
fY (y) = 2fX(x)dX
dY=
2√2π
e−x2/2 1
2y−1/2 =
1√2π
y−1/2 e−y/2 .
Evidently the distribution function for Y is the special case of the Gamma distribution in which
λ = ρ = 1/2.
(b) Since Z = aX2 with a > 0 then clearly Z ≥ 0 and so once again every non-zero value of Z
arises from either X or −X. The density of Z is now
fZ(z) = 2fX(x)dX
dZ=
2√2π σ
e−x2/2σ2 1
2√az−1/2 =
1√2π
√a σ
z−1/2 e−z/2aσ2.
The distribution function for Z is now the Gamma distribution with ρ = 1/2 and λ = (2aσ2)−1.
(c) If X1, · · · , Xn are each normally distributed with mean zero and unit standard deviation, then
Y = X21 +X2
2 + · · ·+X2n is likewise Gamma distributed with parameters λ = 1/2 and ρ = n/2.
This result follows from the previous example. In this case we say that Y is χ2 distributed with
n degrees of freedom.
The chi-squared distribution with n degrees of freedom plays an important role in statistical
hypothesis testing in which deviates are assigned to “bins”.
Q 5. Calculate the bounded variation (when it exists) for the functions
(a) f(x) = |x| x ∈ [−1, 2] (b) g(x) = log x x ∈ (0, 1]
(c) h(x) = 2x3 + 3x2 − 12x+ 5 x ∈ [−3, 2] (d) k(x) = 2 sin 2x x ∈ [π/12, 5π/4]
(e) n(x) = H(x)−H(x− 1) x ∈ R (f) m(x) = (sin 3x)/x x ∈ [−π/3, π/3] .
6
Answer
The simplest approach here is to draw each function.
(a) The bounded variation of f(x) = |x| for x ∈ [−1, 2] is 1 + 2 = 3.
(b) The function g(x) = log x→ −∞ as x→ 0+.
(c) Here we need to find the stationary values of h(x) = 2x3+3x2−12x+5 for x ∈ [−3, 2]. Clearly
dh/dx = 6x2 + 6x − 12 = 6(x2 + x − 2) = 6(x + 2)(x − 1) and so h(x) has turning values at
x = −2 and x = 1. Thus h(−3) = 4, h(−2) = 25, h(1) = −2 and h(2) = 9 and so the bounded
variation is
|4− 25|+ |25− (−2)|+ |(−2)− 9| = 59 .
(d) We need to draw the function in our mind. The points of interest are h(π/12) = 2 sin(π/6) = 1,
h(π/4) = 2 sin(π/2) = 2, h(3π/4) = 2 sin(3π/2) = −2 and h(5π/4) = 2 sin(5π/2) = 2. Thus
the variation is 1 + 4 + 4 = 9.
(e) The Heaviside function or step function H(x) jumps from zero to 1 as x passes through x = 0
while the step function H(x − 1) jumps from zero to 1 as x passes through x = 1. Thus n(x)
is the top hat function and its variation is 2.
(f) The function m(x) = (sin 3x)/x is zero at the end points of the interval [−π/3, π/3]. It takes
the value 3 as x→ 0 and therefore the variation is 6.
Q 6. Use the definition of the Riemann integral to demonstrate that
(a)
∫ 1
0x dx =
1
2, (b)
∫ 1
0x2 dx =
1
3.
You will find useful the formulae∑n
k=1 k = n(n+ 1)/2 and∑n
k=1 k2 = n(n+ 1)(2n+ 1)/6.
Answer
Choose a uniform dissection of [0, 1] in which the interval is divided into n sub-intervals of length
1/n by the points xk = k/n where 0 ≤ k ≤ n.
(a) In the first example we shall pedantic and take a different value of the function in each subin-
terval of the dissection in order to illustrate in this simple case that the value of the integral is
independent of the choice of dissection point. In the following partial sum λk ∈ [0, 1] so that
the partial sum is
Sn =1
n
n∑k=1
f(ξk) =1
n
n∑k=1
xk−1λk + (1− λk)xk =1
n
n∑k=1
(k − 1)
nλk +
k
n(1− λk) .
7
By simple algebra Sn becomes
Sn = − 1
n2
n∑k=1
λk +1
n2n(n+ 1)
2= − 1
n2
n∑k=1
λk +1
2
(1 +
1
n
).
Clearly 0 ≤∑n
k=1 λk ≤ n and therefore
1
2
(1− 1
n
)≤ Sn ≤ 1
2
(1 +
3
n
)→ lim
n→∞Sn =
1
2.
(b) Here we take the left hand endpoint of each interval to deduce that∫ 1
0x2 dx = lim
n→∞
1
n
n∑k=1
k2
n2= lim
n→∞
1
n3
n∑k=1
k2 = limn→∞
1
n3n(n+ 1)(2n+ 1)
6=
1
3.
Q 7. The functions f , g and h are defined on [0, 1] by the formulae
(a) f(x) =
x sin(π/x) x > 0
0 x = 0
(b) g(x) =
x2 sin(π/x) x > 0
0 x = 0
(c) h(x) =
(x/ log x) sin(π/x) x > 0
0 x = 0, 1
Determine which functions have bounded variation on the interval [0, 1].
Answer
Either provide a proof that f is a function of bounded variation over [0, 1] or provide a dissection Dn
over which it is clear that f is not a function of bounded variation as n→ ∞.
(a) Let Dn be the dissection of [0, 1] with nodes x0 = 0, xk = 2/(2n− 2k + 1) when 1 ≤ k ≤ n− 1
and xn = 1. Clearly f(x0) = f(xn) = 0 while
f(xk) =2
2n− 2k + 1sin((n− k)π + π/2) =
2(−1)n−k
2n− 2k + 1.
The variation of f over Dn is therefore
V(f) =k=n∑k=0
∣∣∣ 2(−1)n−k
2n− 2k + 1
∣∣∣ = k=n∑k=0
2
2n− 2k + 1=
k=n∑k=0
2
2k + 1.
This series diverges, and so f is not of bounded variation over [0, 1].
8
(b) The stationary values of g occur where
dg
dx= 2x sin(π/x)− π cos(π/x) = 0 → tan(π/x) = π/(2x) .
The solution to this equation is x1 = π/θ1, x2 = π/θ2, · · · where tan(θk) = θk/2. Let D be the
dissection based on the points 1 = x0 > x1 > x2 > · · · > 0, then g either decreases or increases
between the nodes of D. Consequently, the variation of g over D is
V(g) =∞∑k=1
π2
θ2k| sin θk | ≤
∞∑k=1
π2
θ2k(1)
It is easy to demonstrate that θ1 > π/4, θ2 > 5π/4 and in general that θk > kπ − 3π/4.
Therefore π/θk < 4/(4k − 3). Finally, it follows from (1) that
V(g) ≤∞∑k=1
π2
θ2k≤
∞∑k=1
16
(4k − 3)2<∞ .
This series converges, and so g is of bounded variation over [0, 1].
(c) Let Dn be the dissection of [0, 1] with nodes x0 = 0, xk = 2/(2n− 2k + 1) when 1 ≤ k ≤ n− 1
and xn = 1. Clearly h(x0) = h(xn) = 0 while
h(xk) =2
(2n− 2k + 1) log(2/(2n− 2k + 1))sin((n− k)π + π/2)
=2(−1)n−k
(2n− 2k + 1) log(2/(2n− 2k + 1))
The variation of h over Dn therefore satisfies
V(h) ≥k=n−1∑k=1
∣∣∣ 2(−1)n−k
(2n− 2k + 1) log(2/(2n− 2k + 1))
∣∣∣=
k=n−1∑k=1
2
(2n− 2k + 1) log(n− k + 1/2)
=
k=n−1∑k=1
2
(2k + 1) log(k + 1/2)
This series can be condensed. The condensed series will diverge, and so h is not a function of
bounded variation over [0, 1].
Q 8. Prove that ∫ b
a(dWt)
2G(t) =
∫ b
aG(t) dt
9
Answer
Let Dn denote the dissection a = t0 < t1 < · · · < tn = b of the finite interval [a, b] and let
Φ =
∫ b
a(dWt)
2G(t) =
∫ b
aG(t) dt .
The value of Φ is based on the mean square limiting value of the partial sum
Sn =
n∑k=1
G(tk−1) (Wk −Wk−1)2
Since (Wk −Wk−1) =√tk − tk−1 εk where εk ∼ N(0, 1) then
limn→∞
E [Sn ] = limn→∞
E[ n∑k=1
G(tk−1) (tk − tk−1) ε2k
]= lim
n→∞
n∑k=1
G(tk−1) (tk − tk−1) E [ ε2k ]
= limn→∞
n∑k=1
G(tk−1) (tk − tk−1)
=
∫ b
aG(t) dt .
To demonstrate mean square convergence one needs to show that
limn→∞
E[ ( n∑
k=1
G(tk−1) , (tk − tk−1) (ε2k − 1)
)2 ]= 0 .
The calculation proceeds as follows.
limn→∞
E[ ( n∑
k=1
G(tk−1) , (tk − tk−1) (ε2k − 1)
)2 ]= lim
n→∞E[ n∑k=1
n∑j=1
G(tk−1) (tk − tk−1) (ε2k − 1)G(tj−1) (tj − tj−1) (ε
2j − 1)
]= lim
n→∞
n∑k=1
n∑j=1
G(tk−1)G(tj−1) (tk − tk−1)(tj − tj−1)E [ (ε2k − 1) (ε2j − 1) ] .
(2)
The value of this expected value is zero whenever j = k. Thus expression (2) simplifies to
limn→∞
E[ ( n∑
k=1
G(tk−1) , (tk − tk−1) (ε2k − 1)
)2 ]= lim
n→∞
n∑k=1
G2(tk−1) (tk − tk−1)2 E [ ε4k − 2ε2k + 1 ]
= 2 limn→∞
n∑k=1
G2(tk−1) (tk − tk−1)2 = 0 .
(3)
10
Q 9. Prove that ∫ b
aWn dWt =
1
n+ 1
[W (b)n+1 −W (a)n+1
]− n
2
∫ b
aWn−1 dt .
Answer
First apply the identity∫ b
af(t,Wt) o dWt =
∫ b
af(t,Wt) dWt +
1
2
∫ b
a
∂f(t ,Wt)
∂Wdt .
with f(t,Wt) =Wnt to obtain∫ b
aWnt o dWt =
∫ b
aWnt dWt +
n
2
∫ b
aWn−1t dt .
Now apply the identity∫ b
a
∂g(t,Wt)
∂Wto dWt = g(b,W (b) )− g(a,W (a) )−
∫ b
a
∂g
∂tdt .
with g(t,Wt) =Wnt to obtain∫ b
aWnt o dWt =
1
n+ 1
[Wn+1(b)−Wn+1(a)
].
The final result is therefore∫ b
aWnt dWt =
1
n+ 1
[Wn+1(b)−Wn+1(a)
]− n
2
∫ b
aWn−1t dt .
Q 10. The connection between the Stratonovich and Ito integrals relied on the claim that
limn→∞
E[ n∑k=1
∂f(tk−1Wk−1)
∂W
((Wk−1/2 −Wk−1)(Wk −Wk−1)−
tk − tk−1
2
) ]2= 0
provided E [ |∂f(t,W )/∂W |2 ] is integrable over the interval [a, b]. Verify this unsubstantiated claim.
Answer
The calculation begins with the consideration of
ψn =[ n∑k=1
∂f(tk−1Wk−1)
∂W
((Wk−1/2 −Wk−1)(Wk −Wk−1)−
tk − tk−1
2
)]2.
This function is expanded out to give the double summation
ψ =
n∑j,k=1
[∂f(tk−1Wk−1)
∂W
((Wk−1/2 −Wk−1)(Wk −Wk−1)−
tk − tk−1
2
) ][∂f(tj−1Wj−1)
∂W
((Wj−1/2 −Wj−1)(Wj −Wj−1)−
tj − tj−1
2
) ]
11
which is now divided into the case j = k and the case j = k to get
ψ =n∑k=1
[∂f(tk−1Wk−1)
∂W
]2[(Wk−1/2 −Wk−1)(Wk −Wk−1)−
tk − tk−1
2
]2+ 2
n∑1≤j<k≤n
∂f(tj−1Wj−1)
∂W
((Wj−1/2 −Wj−1)(Wj −Wj−1)−
tj − tj−1
2
)∂f(tk−1Wk−1)
∂W
(Wk−1/2 −Wk−1)(Wk −Wk−1)−
tk − tk−1
2
)When j = k then (Wj−1/2 −Wj−1)(Wj −Wj−1)− (tj − tj−1)/2 and Wk−1/2 −Wk−1)(Wk −Wk−1)−(tk − tk−1)/2 are independent random deviates with mean value zero. Therefore the expectation of
the double sum is zero. To appreciate why this is the case consider the expectation being taken
term-by-term starting at k = n and working downwards. Define εk−1 =Wk−1/2 −Wk−1 then[(Wk−1/2 −Wk−1)(Wk −Wk−1)−
tk − tk−1
2
]2=
[− εk−1εk−1/2 + ε2k−1/2 −
tk − tk−1
2
]2= ε2k−1ε
2k−1/2 + ε4k−1/2 +
(tk − tk−1)2
4− (tk − tk−1)(−εk−1εk−1/2 + ε2k−1/2)− 2ε3k−1/2εk−1
Now E[(Wk−1/2 −Wk−1)(Wk −Wk−1)− (tk − tk−1)/2 ]2 = 3(tk − tk−1)
2/4 and therefore
E[ψn] ≤3max |tk − tk−1|
4
n∑k=1
[∂f(tk−1Wk−1)
∂W
]2(tk − tk−1) → 0
as n→ ∞.
Q 11. Compute the value of
Φ =
∫ b
aWt dWt
where the definition of the integral is based on the choice ξk = (1− λ)tk−1 + λtk and λ ∈ [0, 1].
Answer
Let Dn denote the dissection a = t0 < t1 < · · · < tn = b of the finite interval [a, b] and let
Φ =
∫ b
aWt dWt
where the limiting procedure is based on the choice ξk = (1− λ)tk−1 + λtk with λ ∈ [0, 1]. The task
is to find Φ such that
limn→∞
E[ (
Φ−n∑k=1
W (ξk) (Wk −Wk−1))2 ]
(4)
The algebraic manipulations
2Wk+λ−1Wk = W 2k+λ−1 +W 2
k − (Wk+λ−1 −Wk)2
2Wk+λ−1Wk−1 = W 2k+λ−1 +W 2
k−1 − (Wk+λ−1 −Wk−1)2
12
are required to proceed further. Start by subtracting the first expression from the second, and then
sum from k = 1 to k = n to obtain
2
n∑k=1
Wk+λ−1 (Wk −Wk−1 ) =
n∑k=1
W 2k − (Wk+λ−1 −Wk)
2 −W 2k−1 + (Wk+λ−1 −Wk−1)
2
= W 2(b)−W 2(a) +n∑k=1
(Wk+λ−1 −Wk−1)2 − (Wk+λ−1 −Wk)
2
= W 2(b)−W 2(a) +n∑k=1
(ξk − tk−1) ε2k − (tk − ξk) η
2k
where εk and ηk are uncorrelated N (0, 1) deviates. The expected value of the summation on the right
hand side of this expression is (2λ− 1)(b− a) and therefore the contention is that
Φ =1
2
[W 2(b)−W 2(a) + (2λ− 1)(b− a)
].
To prove this assertion, we substitute this expression for Φ in equation (4). We need to show that
1
2limn→∞
E[ (
(2λ− 1)(b− a)− λ
n∑k=1
ε2k(tk − tk−1) + (1− λ)
n∑k=1
η2k (tk − tk−1))2 ]
= 0
The calculation proceeds as follows:-
limn→∞
E[ (
(2λ− 1)(b− a)− λ
n∑k=1
ε2k(tk − tk−1) + (1− λ)
n∑k=1
η2k (tk − tk−1))2 ]
= limn→∞
E[ (
λn∑k=1
(ε2k − 1)(tk − tk−1)− (1− λ)n∑k=1
(η2k − 1) (tk − tk−1))2 ]
= limn→∞
E[λ2
n∑k=1
n∑j=1
(ε2k − 1)(ε2j − 1)(tk − tk−1)(tj − tj−1)
− 2λ(1− λ)
n∑k=1
n∑j=1
(η2k − 1)(ε2j − 1)(tk − tk−1)(tj − tj−1)
+ (1− λ)2n∑k=1
n∑j=1
(η2k − 1)(η2j − 1)(tk − tk−1)(tj − tj−1)]
In the usual way, if k = j then (ξ2j − 1) and (ξ2k − 1) are uncorrelated, otherwise they are correlated.
Thus the previous argument continues with
limn→∞
E[ (
(2λ− 1)(b− a)− λ
n∑k=1
ε2k(tk − tk−1) + (1− λ)
n∑k=1
η2k (tk − tk−1))2 ]
= limn→∞
E[λ2
n∑k=1
(ε2k − 1)2(tk − tk−1)2 + (1− λ)2
n∑k=1
(η2k − 1)2(tk − tk−1)2]
As has been seen previously, E [ (ε2k − 1)2 ] = E [ ε4k − 2ε2k + 1 ] = 2 with an identical argument for
13
E [ (η2k − 1)2 ]. Consequently,
limn→∞
E[ (
(2λ− 1)(b− a)− λn∑k=1
ε2k(tk − tk−1) + (1− λ)n∑k=1
η2k (tk − tk−1))2 ]
= 2[λ2 + (1− λ)2] limn→∞
n∑k=1
(tk − tk−1)2 = 0 .
Hence it has been proved that∫ b
aWt dWt =
1
2
[W 2(b)−W 2(a) + (2λ− 1)(b− a)
]with the choice ξk = (1− λ)tk−1 + λtk and λ ∈ [0, 1].
Q 12. Solve the stochastic differential equation
dxt = a(t) dt+ b(t) dWt , x0 = X0
where X0 is constant. Show that the solution xt is a Gaussian deviate and find its mean and variance.
Answer
The formal solution to this problem is
x(t) = X0 +
∫ t
0a(s) ds+
∫ t
0b(s) dWs
where the second integral is to be interpreted as an Ito integral. The fact that x(t) is a Gaussian
deviate stems from the fact that the stochastic part of x is simply a weighted combination of Gaussian
deviates, and is therefore a Gaussian deviate. The mean is
µ(t) = X0 +
∫ t
0a(s) ds
and the variance is
E [ (x− µ)2 ] = E[ ∫ t
0b(s) dWs
∫ t
0b(s) dWs
]=
∫ t
0b2(s) ds .
Q 13. The stochastic integrals I01 and I10 defined by
I10 =
∫ b
a
∫ s
0dWu ds , I01 =
∫ b
a
∫ s
0du dWs .
occur frequently in the numerical solution of stochastic differential equations. Show that
I10 + I01 = (b− a)(Wb −Wa) .
Answer
14
The double integrals for I10 and I01 may be converted to the single integrals
I10 =
∫ b
a
∫ s
adWu ds =
∫ b
a(Ws −Wa) ds ,
I01 =
∫ b
a
∫ s
adu dWs =
∫ b
a(s− a) dWs .
It is clear that I10 is a Riemann integral and I01 is a Riemann-Stieltjes integral. Both integrals may
be computed using the standard rules of integral calculus. Thus
I01 =
∫ b
a(s− a) dWs
=[(s− a)(Ws −Wa)
] ba−
∫ b
a(Ws −Wa) ds
= (b− a)(Wb −Wa)− I10 .
Thus I01 + I10 = (b− a)(Wb −Wa).
Q 14. The stochastic integrals I111 defined by
I111 =
∫ t
a
∫ s
a
∫ u
adWw dWu dWs
occurs frequently in the numerical solution of stochastic differential equations. Show that
I111 =(Wb −Wa)
6
[(Wb −Wa)
2 − 3(b− a)].
Answer
The evaluation of I111 proceeds in a number of steps, the first of which is the conversion of the triple
integral to the double integral
I111 =
∫ b
a
∫ s
a
∫ u
adWw dWu dWs =
∫ b
a
∫ s
a(Wu −Wa) dWu dWs .
where Ws =W (s) etc. The double integral may now be further integrated to yield
I111 =1
2
∫ b
a[ (Ws −Wa)
2 − (s− a) ] dWs
=[ 16(Ws −Wa)
3] ba− 1
2
∫ b
a(Ws −Wa) ds−
1
2
∫ b
a(s− a) dWs
=1
6(Wb −Wa)
3 − 1
2( I10 + I01 )
where I10 and I01 are defined in the previous problem which asserts that
I10 + I01 = (b− a)(Wb −Wa) .
15
The final conclusion is therefore that
I111 =(Wb −Wa)
6
[(Wb −Wa)
2 − 3(b− a)].
Q 15. Show that the value of the Riemann integral
I10 =
∫ b
a
∫ s
0dWu ds
may be simulated as a Gaussian deviate with mean value zero, variance (b− a)3/3 and such that its
correlation with (Wb −Wa) is (b− a)2/2.
Answer
It has already been shown that
ξ = I10 =
∫ b
a
∫ s
adWu ds =
∫ b
a(Ws −Wa) ds .
First, it is clear that ξ is a Gaussian process since it is simply the sum of Gaussian processes. The
mean value of ξ is zero and its variance is
E [ ξ2 ] = E[ ∫ b
a(Ws −Wa) ds
∫ b
a(Wu −Wa) du
]= E
[ ∫ b
a
∫ b
a(Ws −Wa) (Wu −Wa) ds du
]=
∫ b
a
∫ b
aE[(Ws −Wa) (Wu −Wa)
]ds du
=
∫ b
a
∫ b
amin (s− a, u− a) ds du
= 2
∫ b
a
∫ u
a(s− a) ds du
=
∫ b
a(u− a)2 du =
(b− a)3
3.
The correlation between (Wb −Wa) and ξ is given by
E[(Wb −Wa)
∫ b
a(Ws −Wa) ds
]=
∫ b
aE[(Wb −Wa) (Ws −Wa)
]ds
=
∫ b
a(s− a) ds =
(b− a)2
2.
In conclusion, ξ = I10 is simulated as a Gaussian deviate with mean value zero, variance (b − a)3/3
and such that it has correlation (b− a)2/2 with (Wb −Wa).
Q 16. Solve the degenerate Ornstein-Uhlenbeck stochastic initial value problem
dx = −αx+ σ dW , x(0) = x0
16
in which α and σ are positive constants and x0 is a random variable. Deduce that
E [X ] = E [x0 ] e−α t , V [X ] = V [x0 ] e
−2αt +σ2
2α[ 1− e−2αt) ] .
Answer
The solution may be obtained by applying Ito’s lemma to the function F = x eαt. Ito’s lemma for
this SDE is
dF =[Ft(t, x)− αxFx(t, x)
]dt+ σ Fx(t, x) dWt
and in this case yields
dF = σ eαt dWt .
Thus the solution is
x(t) = x0 e−αt + σ
∫ t
0e−α(s−t) dWs
The mean solution is
E [x(t) ] = E[x0 e
−αt + σ
∫ t
0e−α(s−t) dWs
]= E [x0 ] e
−αt .
Consequently,
x(t)− E [x(t) ] = (x0 − E [x0 ]) e−αt + σ
∫ t
0e−α(s−t) dWs
Assuming that x0 is uncorrelated with the Wiener process, it follows that
V [x(t) ] = V [x0 ] e−2αt + σ2 E
[ ∫ t
0e−α(s−t) dWs
∫ t
0e−α(u−t) dWu
]= V [x0 ] e
−2αt + σ2∫ t
0
∫ t
0e−α(s−t) e−α(u−t)E [ dWs dWu ]
= V [x0 ] e−2αt + σ2
∫ t
0e−2α(s−t) ds
= V [x0 ] e−2αt +
σ2
2α[ 1− e−2αt) ] .
Q 17. It is given that the instantaneous rate of interest satisfies the equation
dr = µ(t, r) dt+√g(t, r) dW . (5)
Let B(t, R) be the value of a zero-coupon bond at time t paying one dollar at maturity T . Show that
B(t, R) is the solution of the stochastic differential equation
∂B
∂t+ µ(t, r)
∂B
∂r+g(t, r)
2
∂2B
∂r2= rB (6)
with terminal condition B(T, r) = 1.
17
(a) The CIR equation takes the form of equation (8) with µ(t, r) = α(θ− r) and g(t, r) = σ2r. It is
given that the anzatz B(t, r) = exp[β0(T − r) + β1(T − t)r] satisfies equation (6) provided the
coefficient functions β0(T − t) and β1(T − t) satisfy a pair of ordinary differential equations.
Determine these equations with their boundary conditions.
(b) Solve these ordinary differential equations and deduce the value of B(t, R) where R is the spot
rate of interest.
Answer
Ito’s lemma for B(t, r) gives
dB =∂B
∂tdt+
∂B
∂rdr +
g(t, r)
2
∂2B
∂r2dt → E[dB] =
(∂B∂t
+ µ(t, r)∂B
∂r+g(t, r)
2
∂2B
∂r2
)dt
But E[dB] = rB dt and therefore B(t, r) satisfies the partial differential equation
∂B
∂t+ µ(t, r)
∂B
∂r+g(t, r)
2
∂2B
∂r2= rB .
Q 18. It is given that the solution of the initial value problem
dx = −αx+ σ x dW , x(0) = x0
in which α and σ are positive constants is
x(t) = x(0) exp[− (α+ σ2/2)t+ σW (t)
]Show that
E [X ] = x0 e−α t , V [X ] = e−2α t(eσ
2 t − 1)x20 .
Answer
The expected value of X is
E [X ] = E[x(0) exp[−(α+ σ2/2)t+ σW (t) ]
]= x(0) e−(α+σ2/2)t E [ e−σW (t) ]
The task is now to compute
E [ e−σW (t) ] =1√2π t
∫ ∞
−∞e−σW e−W
2/2t dW
=1√2π t
eσ2t/2
∫ ∞
−∞e−(W+σ t)2/2t dW = eσ
2t/2 .
Consequently it follows that
E [X ] = x(0) e−(α+σ2/2)t eσ2t/2 = x(0) e−α t .
18
The variance of X is
V [X ] = E[ (
x(0) exp[−(α+ σ2/2)t+ σW (t) ]− x(0) e−(α t)2 ]
= x2(0) e−2α t E[ (
exp[−σ2t/2 + σW (t) ]− 1)2 ]
= x2(0) e−2α t−σ2t E[ (
eσW (t) − eσ2t/2
)2 ]= x2(0) e−2α t−σ2t E [ e2σW (t) − 2eσW (t) eσ
2t/2 + eσ2t ]
= x2(0) e−2α t−σ2t[ e2σ2 t − 2eσ
2t + eσ2t ]
= x2(0) e−2α t [ eσ2 t − 1 ] .
Q 19. Benjamin Gompertz (1840) proposed a well-known law of mortality that had the important
property that financial products based on male and female mortality could be priced from a single
mortality table with an age decrement in the case of females. Cell populations are also well-know to
obey Gompertzian kinetics in which N(t), the population of cells at time t, evolves according to the
ordinary differential equationdN
dt= αN log
(MN
),
where M and α are constants in which M represents the maximum resource-limited population of
cells. Write down the stochastic form of this equation and deduce that ψ = logN satisfies an OU
process. Further deduce that mean reversion takes place about a cell population that is smaller than
M , and find this population.
Answer
The stochastic form of this SDE is
dN = αN log(MN
)dt+ σN dW ,
Ito’s lemma applied to ψ = logN gives
dψ =dN
N− σ2N2
2N2dt = α log
(MN
)dt+ σ dW − σ2
2dt =
(α logM − αψ − σ2
2
)dt+ σ dW .
Thus ψ satisfies an OU equation with mean state ψ = logM − σ2/2α which in turn translates into
the population N = Me−σ2/2α. The standard solution of the OU equation may be used to write
down the general solution for ψ and consequently the general solution for N(t). The result of this
calculation is that
N(t) = exp[(1− e−αt)ψ + e−αtψ0 + σ
∫ t
0e−α(t−s) dWs
]= exp
[(1− e−αt) log (Me−σ
2/2α) + e−αt logN0 + σ
∫ t
0e−α(t−s) dWs
]= (N0)
e−αt
(Me−σ2/2α) (1−e
−αt) exp[σ
∫ t
0e−α(t−s) dWs
]= Me−σ
2/2α(N0
M
) e−αt
exp[σ2 e−αt
2α+ σ
∫ t
0e−α(t−s) dWs
].
19
Q 20. It is given that the instantaneous rate of interest, r(t), is driven by a two-factor model in
which r(t) = r1(t) + r2(t) where r1(t) and r2(t) satisfy the equations
dr1 = α1(θ1 − r1) dt+ σ1√r1 dW1 ,
dr2 = α2(θ2 − r2) dt+ σ2√r2 dW2 ,
(7)
where dW1 and dW2 are independent increments in the Wiener processesW1 andW2. Let B(t, R1, R2)
be the value of a zero-coupon bond at time t paying one dollar at maturity T . Construct the partial
differential equation satisfied by B(t, R1, R2) and state the terminal condition.
Answer
Ito’s lemma for B(t, r1, r2) gives
dB =∂B
∂tdt+
∂B
∂r1dr1 +
∂B
∂r2dr2 +
1
2
(σ21r1
∂2B
∂r21dt+ σ22r2
∂2B
∂r22dt)
→ E[dB] =(∂B∂t
+ α1(θ1 − r1)∂B
∂r1+ α2(θ2 − r2)
∂B
∂r2+σ21r12
∂2B
∂r21+σ22r22
∂2B
∂r22
)dt
But E[dB] = (r1 + r2)B dt and therefore B(t, r1, r2) satisfies the partial differential equation
∂B
∂t+ α1(θ1 − r1)
∂B
∂r1+ α2(θ2 − r2)
∂B
∂r2+σ21r12
∂2B
∂r21+σ22r22
∂2B
∂r22= (r1 + r2)B .
Q 21. Solve the stochastic differential equation
dxt = a(t) dt+ b(t) dWt , x0 = X0
where X0 is constant. Show that the solution xt is a Gaussian deviate and find its mean and variance.
Answer
The formal solution to this problem is
x(t) = X0 +
∫ t
0a(s) ds+
∫ t
0b(s) dWs
where the second integral is to be interpreted as an Ito integral. The fact that x(t) is a Gaussian
deviate stems from the fact that the stochastic part of x is simply a weighted combination of Gaussian
deviates, and is therefore a Gaussian deviate. The mean is
µ(t) = X0 +
∫ t
0a(s) ds
and the variance is
E [ (x− µ)2 ] = E[ ∫ t
0b(s) dWs
∫ t
0b(s) dWs
]=
∫ t
0b2(s) ds .
20
Q 22. Solve the stochastic differential equation
dxt = − xt dt
1 + t+dWt
1 + t, x0 = 0 .
Answer
The Ito lemma for the SDE
dxt = − xt dt
1 + t+dWt
1 + t
is
dF =[Ft(t, x)−
xt Fx(t, x)
1 + t+
Fxx2(1 + t)2
]dt+
Fx(t, x)
1 + tdWt
The idea is to choose F (t, x) so that the coefficients of dt and dWt are functions of t alone. Clearly
Fx(t, x) = p(t)x + q(t) is the most general expression for F for which the coefficient of dWt is a
function of t alone. with this choice, the coefficient of dt becomes
Ft(t, x)−xt Fx(t, x)
1 + t+
Fxx2(1 + t)2
=dp
dtx+
dq
dt− p(t)xt
1 + t.
Choose p(t) = 1 + t and q(t) = 0 to obtain the result
d( (1 + t)x ) = dWt → (1 + t)x =Wt + x0 .
The final solution is therefore x(t) =W (t)/(1 + t).
Q 23. Solve the stochastic differential equation
dxt = −xt dt2
+√1− x2t dWt , x0 = a ∈ [−1, 1] .
Answer
The Ito lemma for the SDE
dxt = −xt dt2
+√
1− x2t dWt
is
dF =[Ft(t, x)−
xt Fx(t, x)
2+
(1− x2t )Fxx2
]dt+
√1− x2t Fx(t, x)
1 + tdWt
Choose F (t, x) so that the coefficients of dt and dWt are functions of t alone. This requires that
Fx =p(t)√1− x2
→ F = p(t) sin−1 x+ q(t) .
With this choice, the coefficient of dt becomes
Ft(t, x)−xt Fx(t, x)
2+
(1− x2t )Fxx2
=dp
dt
1√1− x2
+dq
dt− x p(t)
2√1− x2
+p(t)x
2√
1− x2t
=dp
dt
1√1− x2
+dq
dt.
21
Choose p(t) = 1 and q(t) = 0 to obtain the result
d( sin−1 x ) = dWt → sin−1 x =Wt + sin−1 a .
The final solution is therefore
x(t) = sin(W (t) + sin−1 a) =√
1− a2 sinW (t) + a cosW (t) .
Q 24. Solve the stochastic differential equation
dxt = dt+ 2√xt dWt , x(0) = x0 .
Answer
The Ito lemma for this SDE is
dF = [Ft(t, x) + Fx(t, x) + 2xFxx ] dt+ 2√xFx(t, x) dWt
The idea is to choose F (t, x) so that the coefficients of dt and dWt are functions of t. If 2√xFx(t, x) =
p(t) then F (t, x) = p(t)√x+ q(t). The coefficient of dt is
Ft(t, x) + Fx(t, x) + 2xFxx =√xdp
dt+dq
dt+p(t)
2√x− 2x
p(t)
4x√x=
√xdp
dt+dq
dt.
Choose p(t) = 1 and q(t) = 0. Thus F =√x and the Ito’s lemma gives
dF = dWt , →√x =
√x0 +Wt
The solution to the SDE is therefore xt = (Wt +√x0 )
2.
Q 25. Solve the stochastic differential equation
dx = [ a(t) + b(t)x ] dt+ [ c(t) + d(t)x ] dWt
by making the change of variable y(t) = x(t)ϕ(t) where ϕ(t) is to be chosen appropriately.
Answer
dy =[x dϕ+ (a+ bx)ϕ
]dt+ [ c(t) + d(t)x ]ϕdWt
Choose ϕ to be the solution of the equation
dϕ = −ϕ [ b(t) dt+ d(t) dWt ]
so that y satisfies
dy = ϕ [ a(t) dt+ c(t) dWt ] → y(t) = y(0) +
∫ t
0ϕ(s) a(s) ds+
∫ t
0ϕ(s) c(s) dWs .
22
The determine ϕ, we make the substitution z = log ϕ to obtain
dz =[ 1
ϕ(−ϕ b(t))− 1
2ϕ2(d2ϕ2)
]dt+
1
ϕ(−d(t)ϕ) dWt
= −[b(t) +
d(t)2
2
]dt− d(t) dWt .
Q 26. In an Ornstein-Uhlenbeck process, x(t), the state of a system at time t, satisfies the stochastic
differential equation
dx = −α(x−X) dt+ σ dWt
where α and σ are positive constants and X is the equilibrium state of the system in the absence of
system noise. Solve this SDE. Use the solution to explain why x(t) is a Gaussian process, and deduce
its mean and variance.
Answer
For any function y = y(x, t), Ito’s lemma gives
dy =[ ∂y∂t
− α(x−X)∂y
∂x+σ2
2
∂2y
∂x2
]dt+ σ
∂y
∂xdWt .
Take y = (x−X)eαt then
dy =[α(x−X) eαt − α(x−X) eαt
]dt+ σ eαt dWt = σ eαt dWt .
Integration of this Ito equation yields
(x−X)eαt = (x(0)−X) + σ
∫ t
0eαs dWs → x = X + (x(0)−X)e−αt + σ
∫ t
0e−α(t−s) dWs .
We observe that if x(0) is constant or is itself a Gaussian deviate then x(t) is simply a sum of Gaussian
deviates and so is a Gaussian deviate. The mean value of x(t) is
µ(t) = E[X + (x(0)−X)e−αt + σ
∫ t
0e−α(t−s) dWs
]= X + (x(0)−X)e−αt .
The variance of x(t) is now computed from
E[(x− µ)2
]= E
[ ((x(0)− x(0))e−αt + σ
∫ t
0e−α(t−s) dWs
)2 ]= E
[(x(0)− x(0))2 e−2αt + 2(x(0)− x(0)) e−αt σ
∫ t
0e−α(t−s) dWs
+ σ2∫ t
0e−α(t−s) dWs
∫ t
0e−α(t−u) dWu
]= σ20 e
−2αt + σ2∫ t
0e−2α(t−s) ds .
23
Q 27. Let x = (x1, . . . , xn) be the solution of the system of Ito stochastic differential equations
dxk = ak dt+ bk α dWα
where the repeated greek index indicates summation from α = 1 to α = m. Show that x =
(x1, . . . , xn) is the solution of the Stratonovich system
dxk =[ak −
1
2bj αbk α,j
]dt+ bk α dWα .
Let ϕ = ϕ(t,x) be a suitably differentiable function of t and x. Show that ϕ is the solution of the
stochastic differential equation
dϕ =[ ∂ϕ∂t
+ ak∂ϕ
∂xk
]dt+
∂ϕ
∂xkbk α dWα
where
ak = ak −1
2bk α,j bj α .
Answer
The SDE dxi = ai dt+ bi α dWα has formal solution
xi(t) = xi(0) +
∫ t
t0
ai(s,xs) ds+
∫ t
t0
b i α (s,xs) dWαs .
The task is to relate the Ito integral in this solution to the corresponding Stratonovich integral. Each
Wiener process behaves separately.∫ t
t0
b i α (s,xs) dWαs = lim
n→∞
n∑k=1
bi α(tk−1/2,xk−1/2) (Wαk −Wα
k−1 )
= limn→∞
n∑k=1
bi α(tk−1,xk−1) (Wαk −Wα
k−1 )
+ limn→∞
n∑k=1
∂bi α(tk−1,xk−1)
∂t(tk−1/2 − tk−1) (W
αk −Wα
k−1 )
+ limn→∞
n∑k=1
∂bi α(tk−1,xk−1)
∂x(j)(x
(j)k−1/2 − x
(j)k−1) (W
αk −Wα
k−1 ) + · · ·
=
∫ t
t0
b i α (s,xs) dWαs
+ limn→∞
n∑k=1
∂bi α(tk−1,xk−1)
∂x(j)(x
(j)k−1/2 − x
(j)k−1) (W
αk −Wα
k−1 )
It follows directly from the stochastic differential equation that
x(j)k−1/2 − x
(j)k−1 = aj(tk−1,xk−1) (tk−1/2 − tk−1) + bj β(tk−1,xk−1)(W
βk−1/2 −W β
k−1 ) + · · ·
24
and therefore the value of the second contribution to the Stratonovich integral is
limn→∞
n∑k=1
∂bi α(tk−1,xk−1)
∂x(j)bj β(tk−1,xk−1)(W
βk−1/2 −W β
k−1 ) (Wαk −Wα
k−1 )
= limn→∞
1
2
n∑k=1
b i α ,j (tk−1,xk−1) b j β(tk−1,xk−1) δα ,β ds
=1
2
∫ t
t0
b i α ,j (t,x) b j α(t,x) ds .
In conclusion,∫ t
t0
b i α (s,xs) dWαs =
∫ t
t0
b i α (s,xs) dWαs +
1
2
∫ t
t0
b i α ,j (t,x) b j α(t,x) ds
where repetition of α implies summation over the independent Wiener processes. The formal solution
of the SDE with the Ito integral replaced by the Stratonovich integral is therefore
xi(t) = xi(0) +
∫ t
t0
(ai(s,xs)−
1
2b i α,j (s,xs) bj α(s,xs)
)ds+
∫ t
t0
b i α (s,xs) dWαs .
Thus the Stratonovich form of the SDE is obtained from the Ito form by replacing the drift component
ai by the modified drift ai = ai − b i α,j bj α/2.
Let ϕ = ϕ(t,x) then
dϕ =∂ϕ
∂tdt+ ϕ,j dx
(j) +1
2ϕij dx
(i) dx(j) + · · ·
=∂ϕ
∂tdt+ ϕ,j (aj dt+ bj α dWα ) +
1
2ϕij bi α dWα bj β dWβ + · · ·
=∂ϕ
∂tdt+ ϕ,j (aj dt+ bj α dWα ) +
1
2ϕij bi α bj α dt .
Now write
bj α dWα = bj α dWα −+1
2bj α ,k bk α dt
to obtain
dϕ =(∂ϕ∂t
+ ϕ,j aj −1
2ϕ,j bj α ,k bk α +
1
2ϕij bi α bj α
)dt+ ϕ,j bj α dWα
=(∂ϕ∂t
+ ϕ,j aj +1
2ϕij bi α bj α
)dt+ ϕ,j bj α dWα .
Q 28. The displacement x(t) of the harmonic oscillator of angular frequency ω satisfies x = −ω2x.
Let z = x+ iωx. Show that the equation for the oscillator may be rewritten
dz
dt= iωz .
The frequency of the oscillator randomised by the addition of white noise of standard deviation σ
to give random frequency ω + σξ(t) where ξ ∼ N(0, 1). Determine now the stochastic differential
equation satisfied by z.
25
Solve this SDE under the assumption that it should be interpreted as a Stratonovich equation, and
use the solution to construct expressions for
(a) E [ z(t) ] (b) E [ z(t) z(s) ] (c) E [ z(t) z(s) ] .
Answer
Let z = x+ iωx then
dz
dt=d2x
dt2+ i ω
dx
dt= −ω2 x(t) + i ω
dx
dt= i ω
( dxdt
+ i ω x(t))= i ω z(t) .
Let ω be replaced by ω ++σξ(t) in the equation z = iωz to obtain
dz = i(ω + σξ(t))z dt → dz = iωz dt+ iσz dWt .
We interpret this as a Stratonovich SDE and not an ITO SDE. With this interpretation, the SDE
has solution
z(t) = z(0) exp[ iωt+ iσW (t) ] .
(a)
z(t) = E[z(0) exp[ iωt+ iσW (t) ]
]= E [ z(0) ] eiωt E [ eiωW (t) ]
However, E [ eαW (t) ] = eα2t/2 and so apply this result yields the final answer
z(t) = E [ z(0) ] eiωt e−σ2t/2 = E [ z(0) ] e(iω−σ
2/2)t .
(b)
E [ z(t) z(s) ] = E[z(0) e iωt+iσW (t) z(0) e iωs+iσW (s)
]= E [ z2(0) ] e iω(t+s) E [ eiσ(W (s)+W (t)) ] .
The difficulty here lies in the fact that W (t) and W (s) are correlated. Suppose t < s, then
W (t) and W (s)−W (t) are independent deviates. Thus
E [ eiσ(W (s)+W (t)) ] = E [ e2iσW (t)+iσ(W (s)−W (t)) ]
= E [ e2iσW (t) ] E [ eiσ(W (s)−W (t)) ]
= e−2σ2t e−σ2(s−t)/2
= e−σ2(s+t)/2−σ2t .
More generally, E [ eiσ(W (s)+W (t)) ] = e−σ2(s+t)/2−σ2min (t,s). The final result is therefore
E [ z(t) z(s) ] = E [ z2(0) ] e (iω−σ2/2)(t+s)−σ2min (t,s) .
26
(c)
E [ z(t) z(s) ] = E[z(0) e iωt+iσW (t) z(0) e−iωs−iσW (s)
]= E [ z(0) z(0) ] e iω(t−s) E [ eiσ(W (t)−W (s)) ]
SinceW (t)−W (s) is a Gaussian deviate with variance |t−s|, then it follows from the observation
E [ eαW (t) ] = eα2t/2 that
E [ z(t) z(s) ] = E [ z(0) z(0) ] e iω(t−s)−σ2|t−s|/2 .
Q 29. It has been established in a previous example that the price B(t, R) of a zero-coupon bond
at time t and spot rate R paying one dollar at maturity T satisfies the Bond Equation
∂B
∂t+ µ(t, r)
∂B
∂r+g(t, r)
2
∂2B
∂r2= rB
with terminal condition B(T, r) = 1 when the instantaneous rate of interest evolves in accordance
with the stochastic differential equation dr = µ(t, r) dt+√g(t, r) dW .
The popular square-root process proposed by Cox, Ingersol and Ross, commonly called the CIR
process, corresponds to the choices µ(t, r) = α(θ − r) and g(t, r) = σ2r. It is given that the anzatz
B(t, r) = exp[β0(T − r) + β1(T − t)r] is a solution of the Bond Equation in this case provided the
coefficient functions β0(T−t) and β1(T−t) satisfy a pair of ordinary differential equations. Determine
these equations with their boundary conditions.
Solve these ordinary differential equations and deduce the value of B(t, R) where R is the spot rate
of interest.
Answer
Let B(t, r) = exp[β0(T − r) + β1(T − t)r] and define τ = T − t then
∂B
∂t= −
(dβ0dτ
+ rdβ1dτ
)B(t, r) ,
∂B
∂r= β1B(t, r) ,
∂2B
∂r2= β21 B(t, r) .
Substituting these calculations into the bond equation gives
−r dβ1dτ
− αrβ1 +σ2r
2β21 = r
which in turn leads to the equations
dβ0dτ
= αθβ1
dβ1dτ
=σ2
2β21 − αβ1 − 1
with initial conditions β0(0) = β1(0) = 0.
The solution of these equations is a mechanical exercise in which β1 is computed first followed by β0.
27
Q 30. In a previous exercise it has been shown that the price B(t, R1, R2) of a zero-coupon bond
at time t paying one dollar at maturity T satisfies the partial differential equation
∂B
∂t+ α1(θ1 − r1)
∂B
∂r1+ α2(θ2 − r2)
∂B
∂r2+σ21r12
∂2B
∂r21+σ22r22
∂2B
∂r22= (r1 + r2)B ,
when the instantaneous rate of interest, r(t), is driven by a two-factor model in which r(t) = r1(t) +
r2(t) in which r1(t) and r2(t) evolve stochastically in accordance with the equations
dr1 = α1(θ1 − r1) dt+ σ1√r1 dW1 ,
dr2 = α2(θ2 − r2) dt+ σ2√r2 dW2 ,
(8)
where dW1 and dW2 are independent increments in the Wiener processes W1 and W2.
Given that the required solution has generic solution B(t, r1, r2) = exp[β0(T − r) + β1(T − t)r1 +
β2(T − t)r2], construct the ordinary differential equations satisfied by the coefficient functions β0, β1
and β2. What are the appropriate initial conditions for these equations?
Answer
Let B(t, r) = exp[β0(T − r) + β1(T − t)r1 + β2(T − t)r2] and define τ = T − t then
∂B
∂t= −
(dβ0dτ
+ r1dβ1dτ
+ r2dβ2dτ
)B(t, r1, r2)
∂B
∂r1= β1B(t, r1, r2) ,
∂B
∂r2= β2B(t, r1, r2) ,
∂2B
∂r21= β21 B(t, r1, r2) ,
∂2B
∂r22= β22 B(t, r1, r2) .
Substituting these calculations into the bond equation gives
−(dβ0dτ
+ r1dβ1dτ
+ r2dβ2dτ
)+ α1(θ1 − r1)β1 + α2(θ2 − r2)β2 +
σ21r12
β21 +σ22r22
β22 = (r1 + r2) .
which in turn leads to the equations
dβ0dτ
= α1θ1β1 + α2θ2β2 ,
dβ1dτ
=σ212β21 − α1β1 − 1 ,
dβ2dτ
=σ222β22 − α2β2 − 1 ,
with initial conditions β0(0) = β1(0) = β2(0) = 0.
Q 31. The position x(t) of a particle executing a uniform random walk is the solution of the
stochastic differential equation
dxt = µdt+ σ dWt , x(0) = X ,
28
where µ and σ are constants. Find the density of x at time t > 0.
Answer - Intuitive approach
The SDE can be integrated immediately to get
xt = X +
∫ t
0µ(s) ds+ σWt , x(0) = X .
Consequently xt−X−µt is a Gaussian random deviate with mean value zero and variance σ2t. Thus
f(x, t) =1
σ√2πt
exp[− (x−X − µt)2
2σ2t
].
Answer - PDE approach
If x satisfies the SDE dxt = µdt + σ dWt then the density f(x, t) of x at time t satisfies the partial
differential equation∂f
∂t=σ2
2
∂2f
∂x2− µ
∂f
∂x.
The task is to solve this equation with initial condition f(x, 0) = δ(x−X). In absence of intuition,
take either the Fourier transform of f with respect to x or the Laplace transform of f with respect
to t. For example, let
f(t;ω) =
∫ ∞
−∞f(x, t) eiω x dx
then
df
dt=
σ2
2
∫ ∞
−∞
∂2f
∂x2eiω x dx− µ
∫ ∞
−∞
∂f
∂xeiω x dx
=(−ω2σ2
2+ µ i ω
)f
with initial condition f(0;ω) = eiω X . Clearly the solution of this first order ODE is
f(t;ω) = exp(−ω2σ2 t
2+ (X + µ t) i ω
).
However, this is the characteristic function of the Gaussian distribution with meanX+µ t and variance
σ2 t. Thus
f(x, t) =1
σ√2π t
e−(x−X−µ t)2/2σ2 t .
Q 32. The position x(t) of a particle executing a uniform random walk is the solution of the
stochastic differential equation
dxt = µ(t) dt+ σ(t) dWt , x(0) = X ,
where µ and σ are now prescribed functions of time. Find the density of x at time t > 0.
Answer - Intuitive approach
29
This is a repeat of the previous example. The SDE can be still be integrated immediately to get
xt = X +
∫ t
0µ(s) ds+
∫ t
0σ(s) dWs , x(0) = X .
In this case xt −X −∫ t
0µ(s) ds is an N
(0,
∫ t
0σ2(s) ds
)Gaussian random deviate. Thus
f(x, t) =1√
2π
∫ t
0σ2(s) ds
exp
[−
(x−X −
∫ t
0µ(s) ds
)2
2
∫ t
0σ2(s) ds
].
Answer - PDE approach
If x satisfies the SDE dxt = µ(t) dt + σ(t) dWt then the density f(x, t) of x at time t satisfies the
partial differential equation∂f
∂t=σ2(t)
2
∂2f
∂x2− µ(t)
∂f
∂x.
The task is to solve this equation with initial condition f(x, 0) = δ(x − X). The procedure is
precisely the same as the previous question, except that the Fourier transform of f is now the
preferred approach. Let
f(t;ω) =
∫ ∞
−∞f(x, t) eiω x dx
then
df
dt=
σ2(t)
2
∫ ∞
−∞
∂2f
∂x2eiω x dx− µ(t)
∫ ∞
−∞
∂f
∂xeiω x dx
=(−ω2σ2(t)
2+ µ(t) i ω
)f
with initial condition f(0;ω) = eiω X . Clearly the solution of this first order ODE is
f(t;ω) = exp[−ω2
2
∫ t
0σ2(u) du+
(X +
∫ t
0µ(u) du
)i ω
].
This function is now the characteristic function of the Gaussian distribution with mean and variance
X +
∫ t
0µ(u) du ,
∫ t
0σ2(u) du
Thus
f(x, t) =1√2π
1√∫ t
0σ2(u) du
exp
−(x−X −
∫ t
0µ(u) du
)2
2
∫ t
0σ2(u) du
.
30
Q 33. The state x(t) of a particle satisfies the stochastic differential equation
dxt = a dt+ b dWt , x(0) = X ,
where a is a constant vector of dimension n, b is a constant n ×m matrix and dW is a vector of
Wiener increments with m×m covariance matrix Q. Find the density of x at time t > 0.
Answer - Intuitive approach
This is again a repeat of the previous example. In matrix notation this SDE can be integrated
immediately to get
Xt = X0 +At+BW .
where Xt, X0 and A are N dimensional column vectors, B is a constant N ×M matrix and Wt is
an M dimensional column vector of correlated Wiener processes. Clearly Xt is an N dimensional
Gaussian deviate with expected value X0 +At. The covariance of Xt is therefore
E[(Xt −X0 −At)(Xt −X0 −At)T] = E[B(WtWTt )B
T] = BQBTt = Gt
where Qdt = E[dWtdWTt ]. Thus
f(X, t) =1
(2π t)N/21
|G |1/2exp
[− (X −X0 −At)G−1 (X −X0 −At)T
2t
].
Answer - PDE approach
If x satisfies the SDE dxt = a dt+ b dWt then the density f(x, t) of x at time t satisfies the partial
differential equation∂f
∂t=g jk2
∂2f
∂xj ∂xk− ak
∂f
∂xk.
where
g jk =m∑
r,s=1
b jrQ rs b ks .
The task is to solve this equation with initial condition f(x, 0) = δ(x−X). The n-dimensional Fourier
transform of f with respect to x is defined by the formula
f(t;ω) =
∫Rn
f(x, t) eiω ,x dx
in which ω is an n-dimensional vector. By taking the Fourier transform of the Kolmogorov equation
satisfied by f(x, t), it follows that
df
dt=
gjk2
∫Rn
∂2f
∂xj ∂xkeiω ,x dx− ak
∫Rn
∂f
∂xkeiω ,x dx
=(−g jkωjωk
2+ akωk i
)f
with initial condition f(0;ω) = eiω .X . Clearly
f(t;ω) = exp(−g jkωjωk t
2+ (Xk + ak t) i ωk
).
31
By way of variety, the probability density function f(x, t) is computed by direct inversion of the
Fourier transform using the identity
f(x, t) =1
(2π)n
∫Rn
f(t;ω) e−iω .x dω
=1
(2π)n
∫Rn
exp(− 1
2
[g jkωjωk t+ 2(xk −Xk − ak t) i ωk
) ]dω .
Let v = x−X− a t, then by observing that G = [gjk t] is a symmetric positive definite matrix, it is
straight forward algebra to demonstrate that
g jk ωjωk t+ (xk −Xk − ak t) i ωk = (ω + ivG−1)G (ω + ivG−1)T + vG−1 vT .
Therefore,
f(x, t) = exp[− vG−1 vT
2
] 1
(2π)n
∫Rn
exp[− 1
2(ω + ivG−1)G (ω + ivG−1)T
]dω
= exp[− vG−1 vT
2
] 1
(2π)n
∫Rn
exp[− 1
2ξG ξT
]dξ .
In order to evaluate this integral, observe that since G is symmetric and positive definite then there
exists a non-singular matrix F such that G = FFT. Thus
ξG ξT = ξ FFT ξT = (ξ F ) (ξ F )T = η ηT , η = ξ F .
Changing variables from ξ to η = ξ F gives
f(x, t) = exp[− vG−1 vT
2
] 1
(2π)n
∫Rn
exp[− 1
2ξG ξT
]dξ
= exp[− vG−1 vT
2
] 1
(2π)n
∫Rn
1
detFexp
[− η ηT
2
]dη
= exp[− vG−1 vT
2
] 1
(2π)n
∫Rn
1
detFexp
[− η21 + η22 + · · ·+ η2n
2
]dη .
Now |F |2 = |G | = tn | g | where g = [g jk]. Thus |F | = tn/2 | g |1/2. Furthermore,∫Rn
exp[− η21 + η22 + · · ·+ η2n
2
]dη =
[ ∫Rn
exp(−η2/2) dη]n
= (2π)n/2 .
In conclusion, the probability density function of x is
f(x, t) =1
(2π t)n/21
| g |exp
[− (x−X− a t) g−1 (x−X− a t)T
2t
], g = [g jk] .
Q 34. The state x(t) of a system evolves in accordance with the stochastic differential equation
dxt = µx dt+ σ x dWt , x(0) = X ,
32
where µ and σ are constants. Find the density of x at time t > 0.
Answer - Intuitive approach
The SDE is the geometric random walk. Take Y = logX and use Ito’s lemma to construct the SDE
satisfied by Yt. Ito’s lemma yields
dY =dY
dXdX +
σ2X2
2
d2Y
dX2dt → dY =
1
X(µX dt+ σX dWt) +
σ2X2
2
(−1
X2dt)
which simplifies to give
dY = (µ− σ2/2) dt+ σ dWt .
This equation has solution Y = Y0+(µ−σ2/2) t+σWt. Consequently Y is a Gaussian deviate with
mean value Y0 + (µ− σ2/2) t and variance σ2t. The density of Y is thus
fY (Y, t) =1
σ√2π t
exp[− (Y − Y0 − (µ− σ2/2)t )2
2σ2t
].
The transformation Y = logX is now used to map f(Y, t) into
fX(X, t) =1
σ√2π t
1
Xexp
[− ( log(X/X0)− (µ− σ2/2)t )2
2σ2t
].
Answer - PDE approach
If the state x(t) of a system satisfies the stochastic differential equation dx = µx dt+ σ x dWt with µ
and σ constants, then f(x, t), the density of x at time t > 0, satisfies the partial differential equation
∂ f(x, t)
∂t=
1
2
∂2
∂x2
(σ2x2f(x, t)
)− ∂
∂x
(µxf(x, t)
).
Let z = log x then∂f
∂x=∂f
∂z
1
x,
∂2f
∂x2=∂2f
∂z21
x2− ∂f
∂z
1
x2.
Thus it is seen that f satisfies the modified PDE
∂ f
∂t=
1
2
∂2
∂x2
(σ2x2f(x, t)
)− ∂
∂x
(µxf(x, t)
)=
σ2
2
∂
∂x
(2xf(x, t) + x2
∂f
∂x
)− ∂
∂x
(µxf(x, t)
)=
σ2
2
(2f(x, t) + 4x
∂f
∂x+ x2
∂2f
∂x2
)− µ
(x∂f
∂x+ f
)=
σ2x2
2
∂2f
∂x2+ (2σ2 − µ)x
∂f
∂x+ (σ2 − µ)f
=σ2
2
(∂2f∂z2
= −∂f∂z
)+ (2σ2 − µ)
∂f
∂z+ (σ2 − µ)f
=σ2
2
∂2f
∂z2+ (
3
2σ2 − µ)
∂f
∂z+ (σ2 − µ)f .
Now take the Fourier transform of this equation with respect to z to deduce that
f(t;ω) =
∫Rf(z, t) ei ω z dz
33
satisfies the ordinary differential equation
df
dt=
(− σ2ω2
2− i (
3
2σ2 − µ)ω + (σ2 − µ)
)f
with initial condition f(0, ω) = X−1 ei ω logX . Clearly,
f(t, ω) = X−1 exp(− σ2ω2 t
2+ i (logX − 3t
2σ2 + µ t)ω + (σ2 − µ) t
)with inverse transform
f = e(σ2−µ) t 1
σX√2π t
exp[−
(z − logX +3t
2σ2 − µ t)2
2σ2t
]
= e(σ2−µ) t 1
σX√2π t
exp[−
(log x− logX +3t
2σ2 − µ t)2
2σ2t
]
= e(σ2−µ) t 1
σX√2π t
exp[−
(log x/X +(σ22
− µ)t+ σ2 t)2
2σ2t
]
= e(σ2−µ) t 1
σX√2π t
exp[−
(log x/X +(σ22
− µ)t)2
2σ2t− 2
(log x/X +(σ22
− µ)t)
2σ2tσ2 t− σ2 t
2
]
= e(σ2−µ) t 1
σX√2π t
exp[−
(log x/X +(σ22
− µ)t)2
2σ2t− log x/X −
(σ22
− µ)t− σ2 t
2
]
=1
σX√2π t
exp[−
(log x/X +(σ22
− µ)t)2
2σ2t− log x/X
]
=1
σX√2π t
exp[−
(log x/X +(σ22
− µ)t)2
2σ2t
]exp(− log x/X)
=1
σ x√2π t
exp[−
(log x/X +(σ22
− µ)t)2
2σ2t
].
Q 35. The state x(t) of a system evolves in accordance with the Ornstein-Uhlenbeck process
dx = −α (x− β) dt+ σ dWt , x(0) = X ,
where α, β and σ are constants. Find the density of x at time t > 0.
Answer - Intuitive approach
The SDE is reorganised into the form dx + α (x − β) dt = σ dWt. Ito’s lemma is now applied to
(x− β)eαt to obtain
d[(x− β)eαt] = σeαt dWt → (x− β)eαt = (X0 − β) + σ
∫ t
0eαsdWs .
34
which simplifies to give
x(t) = β + (X0 − β)e−αt + σ
∫ t
0e−α(t−s)dWs .
Thus x(t) is a gaussian deviate with mean value β + (X0 − β)e−αt and variance
σ2∫ t
0e−2α(t−s)ds =
σ2(1− e−αt)
2α.
The final conclusion is that x has probability density function
f(x, t) =1
σ
√α
π(1− e−αt)exp
[− α(x− β − (X0 − β)e−αt )2
σ2(1− e−αt)
].
Answer - PDE approach
If x(t) evolves in accordance with the stochastic differential equation dx = −α (x − β) dt + σ dWt
then the density of x at time t > 0 satisfies the partial differential equation
∂f
∂t=σ2
2
∂2f
∂x2+ α
∂
∂x
((x− β)f
)and the initial condition f(x, 0) = δ(x−X). Let
f(t;ω) =
∫Rf(x, t) ei ω x dx
then by taking the Fourier transform of the partial differential equation, it follows that f(t;ω) satisfies
the ordinary differential equation
∂f
∂t= −σ
2ω2
2f + α
∫R
∂
∂x
((x− β) f(x, t)
)ei ω x dx
= −σ2ω2
2f − i α ω
∫R(x− β) f(x, t) ei ω x dx
= −σ2ω2
2f + i α β ω f − αω
∂f
∂ω
with initial condition f(0, ω) = ei ω X . Clearly ϕ(t, ω) = log f satisfies the first order partial differential
equation∂ϕ
∂t+ αω
∂ϕ
∂ω= −σ
2ω2
2+ i α β ω
with initial condition ϕ(0, ω) = i ω X. We may solve this equation by characteristic methods. Take
η = logω − α t and ξ = ω then
∂ϕ
∂t+ αω
∂ϕ
∂ω= −α∂ϕ
∂η+ αω
( ∂ϕ∂ξ
+1
ω
∂ϕ
∂η
)= α ξ
∂ϕ
∂ξ= −σ
2ξ2
2+ i α β ξ .
This equation is now integrated to obtain
ϕ = −σ2ξ2
4α+ i β ξ + ψ(η)
35
where the initial condition yields
i ω X = −σ2ω2
4α+ i β ω + ψ(logω) → ψ(η) = i eη (X − β) +
σ2 e2η
4α.
It therefore follows that
ϕ = −σ2ω2
4α+ i β ω + i (X − β) elogω−α t +
σ2
4αe2(logω−α t)
= −σ2ω2
4α+ i β ω + i (X − β)ω e−α t +
σ2ω2
4αe−2α t
= −σ2ω2
4α( 1− e−2α t ) + i ω (β + (X − β) e−α t ) .
Thus f(t;ω) = expϕ corresponds to a Gaussian distribution with mean β+(X−β) e−α t and variance
σ2(1− e−2α t)/2α, that is
f(x, t) =1
σ
√α
π(1− e−2α t)exp
[− α
(x− β − (X − β) e−α t)2
σ2(1− e−2α t)
].
Q 36. If the state of a system satisfies the stochastic differential equation
dx = a(x, t) dt+ b(x, t) dW , x(0) = X ,
write down the initial value problem satisfied by f(x, t), the probability density function of x at time
t > 0. Determine the initial value problem satisfied by the cumulative density function of x.
Answer
Let f(x, t) be the probability density function corresponding to the distribution of the states of the
stochastic differential equation
dx = a(x, t) dt+ b(x, t) dW , x(0) = X ,
then f(x, t) satisfies the partial differential equation
∂f
∂t=
1
2
∂2(b2f)
∂x2− ∂(af)
∂x, f(x, 0) = δ(x−X) .
Let F (x, t) be the cumulative distribution function of f(x, t) then
F (x, t) =
∫ x
−∞f(u, t) du → f(x, t) =
∂F
∂x.
The equation satisfied by F (x, t) is therefore
∂2F
∂x∂t=
1
2
∂2
∂x2
(b2∂F
∂x
)− ∂
∂x
(a∂F
∂x
)→ ∂
∂x
[∂F
∂t− 1
2
∂
∂x
(b2∂F
∂x
)+ a
∂F
∂x
]= 0 .
Thus it follows that F satisfies
∂F
∂t=
1
2
∂
∂x
(b2∂F
∂x
)− a
∂F
∂x+ ψ(t) .
36
However,
F (x, t) → 1 ,∂F
∂x= f → 0 ,
∂2F
∂x2=∂f
∂x→ 0 , x→ ∞
and therefore ψ(t) = 0. In conclusion, F (x, t) satisfies the partial differential equation
∂F
∂t=
1
2
∂
∂x
(b2∂F
∂x
)− a
∂F
∂x
with initial condition
F (x, 0) =
∫ x
−∞f(u, 0) du =
0 x < X ,
1/2 x = X ,
1 x > X .
Q 37. Cox, Ingersoll and Ross proposed that the instantaneous interest rate r(t) should follow the
stochastic differential equation
dr = α(θ − r)dt+ σ√r dW , r(0) = r0 ,
where dW is the increment of a Wiener process and α, θ and σ are constant parameters. Show that
this equation has associated transitional probability density function
f(t, r) = c(vu
)q/2e−(
√u−
√v)2 e−2
√uv Iq(2
√uv) ,
where Iq(x) is the modified Bessel function of the first kind of order q and the functions c, u, v and
the parameter q are defined by
c =2α
σ2(1− e−α(t−t0)), u = cr0 e
−α(t−t0) , v = cr , q =2αθ
σ2− 1 .
Answer
The transitional probability density function for the stochastic differential equation
dr = α(θ − r)dt+ σ√r dw ,
satisfies the partial differential equation
∂f
∂t=σ2
2
∂2 [rf ]
∂r2− α
∂[(θ − r)f ]
∂r, f(r, 0) = δ(r −R) .
Since the variance is proportional to r (and cannot be negative), the sample space of r is (0,∞). Let
f(t;ω) =
∫ ∞
0f(r, t) e−ω r dr
37
then the Laplace transform of the Kolmogorov equation gives
∂f(t;ω)
∂t=
∫ ∞
0
∂
∂r
[σ22
∂ [rf ]
∂r− α (θ − r)f
]e−ω r dr
=[ ( σ2
2
∂ [rf ]
∂r− α (θ − r)f
)e−ω r
]∞0
+ ω
∫ ∞
0
[σ22
∂ [rf ]
∂r− α (θ − r)f
]e−ω r dr
= ω
∫ ∞
0
[σ22
∂ [rf ]
∂r− α (θ − r)f
]e−ω r dr
=σ2ω
2
[rf e−ω r
]∞0
+σ2ω2
2
∫ ∞
0rf e−ω r dr − ωαθ f(t;ω) + ωα
∫ ∞
0rf e−ω r dr
= −σ2ω2
2
∂f(t;ω)
∂ω− ωαθ f(t;ω)− ωα
∂f(t;ω)
∂ω
= −[ σ2ω2
2+ ωα
] ∂f(t;ω)∂ω
− ωαθ f(t;ω) .
Let ϕ(t, ω) = log f(t;ω) then clearly ϕ is the solution of the partial differential equation
∂ϕ
∂t+
( σ2ω2
2+ ωα
) ∂ϕ∂ω
= −ωαθ
with initial condition ϕ(0, ω) = log f(0;ω) = −ωR. Take ξ = ω and η = logω − log(2α+ σ2ω)− α t
then
∂ϕ
∂t+
( σ2ω2
2+ ωα
) ∂ϕ∂ω
= −α ∂ϕ∂η
+( σ2ω2
2+ ωα
)( ∂ϕ∂ξ
+∂ϕ
∂η
( 1
ω− σ2
2α+ σ2ω
))= −α ∂ϕ
∂η+σ2ω2 + 2ωα
2
( ∂ϕ∂ξ
+∂ϕ
∂η
2α
ω(2α+ σ2ω)
)=
σ2ω2 + 2ωα
2
∂ϕ
∂ξ.
Therefore ϕ satisfies the partial differential equation
σ2ω2 + 2ωα
2
∂ϕ
∂ξ= −ωαθ → ∂ϕ
∂ξ= − 2αθ
σ2ξ + 2α.
Thus the general solution for ϕ is
ϕ = −2αθ
σ2log(σ2ξ + 2α) + ψ(η)
where the initial condition gives
−ωR = −2αθ
σ2log(σ2ω + 2α) + ψ(logω − log(2α+ σ2ω) ) .
Let λ = log(ω/(2α+ σ2ω)) then
ω
2α+ σ2ω= eλ → ω =
2α
e−λ − σ2.
Thus
ψ(λ) =−2αR
e−λ − σ2+
2αθ
σ2log
( 2α e−λ
e−λ − σ2
).
38
Bearing in mind that the task is to compute f(t;ω) = eϕ, it follows that
f(t;ω) = (σ2ω + 2α)−(1+q) eψ(η)
= (σ2ω + 2α)−(1+q)( 2α
1− σ2 eη
)q+1exp
[ −2αR
e−λ − σ2
]=
( 2α
(σ2ω + 2α)(1− σ2 eη)
)q+1exp
[ −2αReη
1− σ2 eη
]where the parameter q = 2αθ/σ2 − 1. Now
eη = e−α tω
2α+ σ2ω
which further simplifies f(t;ω) to obtain
f(t;ω) =( 2α
2α+ σ2ω(1− e−αt)
)q+1exp
[ −2αRω e−αt
2α+ σ2 ω(1− e−αt)
].
Let functions c, u, v be defined by
c =2α
σ2(1− e−αt), u = cR e−αt) , v = cr
then
f(t;ω) =( c
c+ ω
)q+1exp
[ −cRω e−αtc+ ω
]=
( c
c+ ω
)q+1exp
[ −uωc+ ω
]=
( c
c+ ω
)q+1e−u exp
[ cu
c+ ω
].
Since f(t;ω) is a function of (c+ ω), it follows that
f(r, t) = e−u e−cr L−1[(c/ω)q+1 exp(cu/ω) ;ω → r
].
To complete this calculation, we compute the Laplace transform of rq/2 Iq(2√ucr) where Iq(x) is the
modified Bessel function of argument x. The result is
L[rq/2 Iq(2
√ucr) ; ω] =
∫ ∞
0rq/2 Iq( 2
√ucr ) e−ω r dr
=
∫ ∞
0rq/2
( (2√ucr )q
2qΓ(q + 1)
∞∑k=0
(ucr)k
k! (q + 1)k
)e−ω r dr
=(uc)q/2
Γ(q + 1)
( ∞∑k=0
(uc)k
k! (q + 1)k
∫ ∞
0rq+k e−ω r dr
)=
(uc)q/2
Γ(q + 1)
( ∞∑k=0
(uc)k
k! (q + 1)k
Γ(k + q + 1)
ωq+k+1
)=
1
c
( uc
)q/2 (c/ω)q+1
Γ(q + 1)
( ∞∑k=0
(uc/ω)k
k!Γ(q + 1)
)=
1
c
( uc
)q/2(c/ω)q+1 exp(uc/ω) .
39
Thus
f(r, t) = c e−u e−cr( cu
)q/2rq/2 Iq(2
√ucr)
= c e−u e−cr(cru
)q/2Iq(2
√ucr)
= c(vu
)q/2e−(
√u−
√v)2 e−2
√uv Iq(2
√uv)
when cr is replaced by v.
Q 38. Consider the problem of numerically integrating the stochastic differential equation
dx = a(t, x) dt+ b(t, x) dW , x(0) = X0 .
Develop an iterative scheme to integrate this equation over the interval [0, T ] using the Euler-
Maruyama algorithm.
It is well-know that the Euler-Maruyama algorithm has strong order of convergence one half and
weak order of convergence one. Explain what programming strategy one would use to demonstrate
these claims.
Answer
Let N be the number of steps to be taken in advancing the solution from t = 0 to t = T , then
∆t = T/N . The standard deviation of each Wiener step is therefore σ =√∆ and the iterative
scheme is captured by the pseudo-code
1. Initialize x at X0;
2. Iterate N times x − > a(k∆t, x)∆t+ σb(k∆t, x) ξ where ξ ∼ N(0, 1).
3. Final value of x is x(T )
Note that there is no requirement to store intermediate values of x.
Strategy First it is necessary to simulate the integration process a large number of times, say M
times, by which is meant that x(T ) will be simulated M times with each simulation based on an
underlying realisation of the Wiener process. Let x∆tk (T ) be the value of x(T ) returned by the kth
simulation when using the step size ∆t. In computing x∆tk (T ) we choose a very fine resolution of the
interval [0, T ], say involving N small time steps, and construct the corresponding series of N Wiener
increments. These increments, appropriately packaged to build the Wiener increments ∆W∆t over
intervals of duration ∆t, define the realisation of the underlying Wiener process needed to compute
x∆tk (T ) and, of course, by integrating at the finest resolution, i.e. with ∆t = T?N , one computes
numerically ones best estimate of the true value of xk(T ) against which numerical error will be
measured. Needless to say, if the SDE has an exact solution expressed in terms of W (T ), then this
solution would be taken as the exact solution against which error is to be estimated.
40
For each realisation the error ek = x∆tk (T )− xk(T ) is computed. To test for strong convergence one
plots log(∑M
k=1 | ek |)/M against log∆t and to test for weak convergence one plots log
∣∣∣∑Mk=1 ek
∣∣∣/Magainst log∆t. The former plot will be an approximate straight line with gradient one half and the
latter plot will be an approximate straight line of gradient one.
Q 39. Compute the stationary densities for the following stochastic differential equations.
(a) dX = (β − αX) dt+ σ√X dW
(b) dX = −α tanX dt+ σ dW
(c) dX = [(θ1 − θ2) cosh(X/2)− (θ1 + θ2) sinh(X/2)] cosh(X/2) dt+ 2 cosh(X/2) dW
(d) dX =α
Xdt+ dW
(e) dX =( αX
−X)dt+ dW
Answer
The stationary density f(x) satisfies
1
2
d(gf)
dx−µf = 0 → d(gf)
dx=
2µ
g(gf) → d log(gf)
dx=
2µ
g→ f(x) =
A
gexp
(∫2µ
gdx
),
where A is a constant which takes the value which ensures that f integrates to one.
(a) Here µ = (β − αX) and g(x) = σ2X. Thus
f(x) =A
σ2xexp
(∫2(β − αx)
σ2 xdx
)=
A
σ2xexp
(∫2β
σ2x− 2α
σ2dx
)=
A
σ2x2β/σ
2−1 e−2αx/σ2.
(b) Here µ = −α tanX and g(x) = σ2. Thus
f(x) =A
σ2exp
(− 2
∫tanx
σ2dx
)=
A
σ2exp
(2log | cosx|
σ2
)=
A
σ2( cos2 x)1/σ
2
.
(c) Here µ = [(θ1 − θ2) cosh(X/2)− (θ1 + θ2) sinh(X/2)] cosh(X/2) and and g(x) = 4 cosh2(X/2).
Thus
f(x) =A
4 cosh2(x/2)exp
(∫[(θ1 − θ2) cosh(x/2)− (θ1 + θ2) sinh(x/2)] cosh(x/2)
4 cosh2(x/2)dx
)=
A
4 cosh2(x/2)exp
(∫θ1 − θ2
4− θ1 + θ2
4
sinh(x/2)
cosh(x/2)dx
)=
A
4 cosh2(x/2)exp
(∫(θ1 − θ2)x
4− θ1 + θ2
2log cosh(x/2)
)=
A
4 cosh2+(θ1+θ2)/2(x/2)exp
((θ1 − θ2)x
4
).
41
(d) Here µ = α/X and g(x) = σ2. Thus
f(x) =A
σ2exp
(∫2α
σ2xdx
)=
A
σ2exp
(2ασ2
log x)=
A
σ2x2α/σ
2.
(e) Here µ = (α/X −X) and g(x) = σ2. Thus
f(x) =A
σ2exp
(2
∫(α/x− x)
σ2dx
)=
A
σ2exp
(2ασ2
log x− x2
σ2
)=
A
σ2x2α/σ
2e−x
2/σ2.