0% found this document useful (0 votes)
16 views20 pages

Chap 3

Chapter 3 discusses the integration of ordinary differential equations, particularly in the context of investment models influenced by continuous interest rates and cash flows. It introduces the balance equation for investment, explains the complementary and particular solutions, and presents methods for solving first-order linear inhomogeneous differential equations. The chapter also covers numerical methods for solving differential equations, including Euler's method, and provides insights into the application of these methods in various financial scenarios.

Uploaded by

CJ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views20 pages

Chap 3

Chapter 3 discusses the integration of ordinary differential equations, particularly in the context of investment models influenced by continuous interest rates and cash flows. It introduces the balance equation for investment, explains the complementary and particular solutions, and presents methods for solving first-order linear inhomogeneous differential equations. The chapter also covers numerical methods for solving differential equations, including Euler's method, and provides insights into the application of these methods in various financial scenarios.

Uploaded by

CJ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

CHAPTER 3

Integration of Differential Equations

Processes which change continuously with with time generally are described by one
or more ordinary differential equations. For example, suppose an investment M (t) draws
interest continuously at a given but not necessarily constant interest rate r(t). At the same
time money is added or withdrawn at a prescribed continuous rate b(t). Clearly one would
like to know M (t) over the life [0, T ] of the contract.
The mathematical model for this process is a simple balance equation:
rate of change of the investment = money coming in − money going out,
or
dM (t)
= r(t)M (t) + b(t).
dt

We also know M (t) either initially or at the end of the contract. To be specific let us assume
that M (t0 ) = M0 is given.
A more suggestive way of writing this equation is

dM
LM (t) ≡ − r(t)M = b(t).
dt

L is a linear differential operator since L[x(t)+αy(t)] = Lx(t)+αLy(t) for arbitrary differen-


tiable functions x(t) and y(t). L is called a first order differential operator because only the
first derivative appears, it has variable coefficients since r(t) is not assumed to be constant,
and the equation LM = b is inhomogeneous since M = 0 is not a solution. Accordingly,
the differential equation is known as a first order linear inhomogeneous differential equation
with variable coefficients.
Such an equation can be solved analytically. It follows from the general theory that its
solution is of the form

M (t) = Mc (t) + Mp (t)

where Mc (t) is known as the complementary solution which solves

LMc (t) = 0

1
and which includes the constant of integration, and where Mp (t) is a particular integral
which means ANY function which solves

LMp (t) = b(t).

Once Mc (t) and Mp (t) have been found the constant of integration is computed such that
M (t0 ) = M0 .
The complementary solution is found by the method of separation of variables. We
rewrite the equation
M 0 (t) − r(t)M (t) = 0

in the form
dM
= r(t)dt
M
and integrate the left side with respect to M and the right side with respect to t.
As an aside we point out that the integration of one side with respect to M and the
other side with respect to t is not at all strange. In general, when we integrate a separable
equation like
f (M )dM = g(t)dt

we obtain an expression like


F (M ) = G(t) + k

where F and G are the anti-derivatives of f and g. This equation defines M implicitly in
terms of t. Implicit differentiation and the chain rule then show that

d dF dM dG
F (M (t)) = = f (M )M 0 = = g(t)
dt dM dt dt

so that M (t) satisfies the separable differentiable equation. In our problem the integration
yields Z t
log |M | = r(x)dx + k
t0

where k is a constant of integration. The lower limit on the integral was chosen for conve-
nience. Changing it is equivalent to changing k. It follows that
Rt
r(x)dx
Mc (t) = ce t0

2
for any non-zero constant c.
The particular integral can be computed with the method of variation of parameters.
We are looking for a solution of the form

Mp (t) = Mc (t)v(t)

where v(t) is to be found so that Mp (t) satisfies the inhomogeneous equation. We find

Mp0 (t) = Mc0 (t)v(t) + Mc (t)v 0 (t) = r(t)Mp (t) + b(t).

Since Mc0 = r(t)Mc the two terms involving r(t) cancel and we are left with

Mc (t)v 0 (t) = b(t)

so that Z t
v(t) = Mc−1 (s)b(s)ds.
t0

Again, the lower limit is chosen for convenience. Any fixed lower limit could be used. Since
Rs
1 − r(x)ds
Mc−1 (s) = e t0
c

we find that Z t Rt
r(x)ds
Mp (t) = e s b(s)ds.
t0

The final solution then is Rt


r(x)dx
M (t) = M0 e t0 + Mp (t)

which is seen to satisfy M (t0 ) = M0 . This formula was developed under the assumptions
that r(t) and b(t) are continuous functions of t. However, it is readily modified when r(t) is
only piecewise continuous and b(t) may in fact describe a single payment at a specified time.
For example, since only the integral of r appears in our solution we need just integrability
of r. Hence finitely many jumps do not cause any problems. The source term b(t) needs
a little more care if we are to model something like a fixed coupon payment of known size
at time t0 . To see how the above solution can be modified let us think of a bond which
pays $M0 at time t0 and a single coupon at time tc < t0 in the amount of $C. Since the

3
bond must decrease in value by the amount of the coupon at the time of its payment we
have a withdrawal from the account. We shall employ the usual notation of t0 = T for the
time when the bond matures. Were the coupon payment stretched out over an interval and
paid at a rate b(t) then the value M (t) of the bond is given by the above expression after
reversing the direction of integration as
RT Z T Rs
− r(x)dx − r(x)dx
M (t) = M0 e t + e t b(s)ds
t

where the algebraic signs are chosen such that b(t) > 0. Let us approximate the one time
C
payment by a time continuous payment of rate φc (t) where φc (t) is the piecewise linear hat
∆t
Rb
function with values φc (tc − ∆t) = φc (tc + ∆t) = 0 and φc (tc ) = 1. Then ∆t C
φ (t)dt = C
a c

if the interval [a, b] includes the interval [tc − ∆t, tc + ∆t] because the area under the hat
function is 1/∆t. Let us now suppose that t > tc + t. Then b(s) = 0 for all s ∈ [t, T ]. Hence
the particular integral is zero and
RT
− r(x)dx
M (t) = M0 e t .

This is the usual discounted value of a zero coupon bond which pays M0 at maturity. Let
us suppose next that t < tc − ∆t. Then b(s) is non-zero only for s ∈ [tc − ∆t, tc + ∆t] and
the particular integral becomes
Z tc +∆t Rs
C − r(x)ds
Mp (t) = e t φc (s)ds.
∆t tc −∆t

The mean value theorem for integrable functions applies because φc (t) is non-negative. It
yields
R ŝ Z tc +∆t R ŝ
C − r(x)dx − r(x)dx
Mp (t) = e t φc (s)ds = Ce t
∆t tc −∆t

where ŝ is some point in the interval [tc − ∆t, tc + ∆t]. A coupon payment at the fixed time
tc is obtained if we let ∆t → 0. This means that ŝ → tc . Hence the value of our coupon
bearing bond is
RT
− r(x)dx
M (t) = M0 e t , t > tc
RT R tc
− r(x)dx − r(x)dx
M (t) = M0 e t + Ce t , t < tc .

4
The last integral is just the discounted value of the coupon paid at time tc . It is apparent
that the “analytic” solution provides useful qualitative insight even when the integrals in
the formula cannot be evaluated in closed form. However, quantitative data are obtainable
only if all integrations can be carried out. This is usually not the case unless the interest
rate is (piecewise) constant and b is sufficiently simple. Otherwise one is forced into the
numerical evaluation of the integrals, but then one may as well integrate the differential
equation itself numerically.
Numerical methods for ordinary differential equations apply equally to linear and non-
linear equations, to a single equation or to a system of equations. This generality is essential
because such problems are commonplace. For example, take a simple model of an investment
where the interest rate depends on the amount invested such as

dM
= r(M )M + b(t)
dt

M (t0 ) = M0

where (
ru for M > Mu
Mu −M M −M1
r(M ) = r1 M u −M1
+ ru Mu −M1 M1 < M < Mu
r1 for M < M1
where the thresholds and rates may in fact be time dependent. For a numerical integration
this problem is not much more complicated than the simple model solved analytically above
(although the lack of differentiability of the right side may require a little care before applying
standard integration programs). Similarly, suppose we have N accounts and moneys flow
between them in proportion to their size. A model might look like

dM
= A(M, t)M + b(t)
dt
 
M1 (t)
where now M (t) =  · · · · · ·  and A is an N ×N matrix whose entries could depend on M .
MN (t)
Again, numerical methods would not be troubled by such a system of differential equations.
We remark that if A does not depend on M then one can find a vector analog of the above
analytic solution, but its numerical evaluation is problematic and generally not easier than
a numerical integration of the differential equation.

5
Numerical methods for ordinary differential equations have reached a high level of
perfection and one has generally as little difficulty solving numerically a problem like

u0 = F (t, u)

u(t0 ) = u0

with standard library programs as one would have solving the linear algebraic system

Ax = b.

We do not intend to study the various approaches to solving a first order system. For well
behaved systems whose solutions change smoothly at comparable rates any of the standard
routines will do a good job. The only advice is to use one of the highly developed library
routines and not to try to code your own numerical method. Only if the system should resist
a numerical integration with your chosen solver does a differentiation among the various
approaches appear justified. But then deeper insight is required than we can provide at this
point.
Nonetheless, so that the numerical integration of a differential equation is not entirely
relegated to a black box we shall discuss in some detail the simplest numerical method in
the simplest setting of just one equation. This discussion will give us the flavor of what
numerical methods are based on and will allow the transition to simulating the solution of
a stochastic ordinary differential equation.
Euler’s method for ordinary differential equations: Let u(t) be the solution of

u0 = F (t, u)

u(t0 ) = u0

then at t0 we have the solution u0 and the slope u0 (t0 ) = F (u0 , t0 ). We can approximate
the solution u(t0 + ∆t) for some (small) ∆t by the value of the linear approximation to u(t)
at t1 = t0 + ∆t, i.e.
u1 = u0 + ∆tF (t0 , u0 ).

6
Given (t1 , u1 ) we then find the straight line approximation at t2 = t1 + ∆t with slope
F (t1 , u1 ). Continuing in this way a piecewise linear curve is generated through the points
{(tn , un )} where
tn+1 = tn + ∆t

and
un+1 = un + ∆tF (tn , un ).

The obvious question now is how well the computed values {un } approximate the values of
the true solution {u(tn )}. The following result applies:
Theorem: Suppose that the problem

u0 = F (t, u)

u(t0 ) = u0

has a solution u(t) over the interval [t0 , T ] which satisfies

|u00 (t)| < K for all t ∈ [t, T ].

Suppose further that


∂F
(t, u) ≤ L
∂u
for all u and for all t ∈ [t0 , T ]. Let ∆t = (T − t0 )/N , tn = t0 + n∆t and let {un } denote the
values computed with Euler’s method. Define the error of the approximation as

en = u(tn ) − un

then
L(tn −t0 ) K∆t  L(tn −t0 ) 
|en | < e |e0 | + e −1 .
2L
Proof: It follows from a Taylor expansion that the analytic solution satisfies

1 00
u(tn+1 ) = u(tn ) + u0 (tn )∆t + u (η)∆t2 ,
2

i.e.,
1 00
u(tn+1 ) = u(tn ) + F (tn , u(tn ))∆t + u (η)∆t2
2

7
for some η ∈ (tn , tn+1 ). Subtracting the Euler approximation we obtain

1 00
en+1 = en + [F (tn , u(tn )) − F (tn , un )]∆t + u (η)∆t2 .
2

The mean value theorem for differentiable functions yields

∂F
|F (tn , u(tn )) − F (tn , un )| = (tn , ξ)(u(tn) − un )
∂u

for some ξ between u(tn ) and un . Since the partial derivative is bounded we obtain

|F (tn , u(tn )) − F (tn , un )| ≤ L|(u(tn ) − un )| = L|en |.

We can estimate the error at tn+1 according to

∆t2
|en+1 | < (1 + L∆t)|en | + K.
2

By induction (or repeatedly substituting) we see that this inequality implies

∆t2 X
n−1
|en | < (1 + L∆t)n |e0 | + K (1 + L∆t)j .
2
j=0

A Taylor expansion about x = 0 shows that for any x

eξ 2
ex = 1 + x + x
2

for some ξ between x and 0. Hence


1 + x ≤ ex

which implies that


(1 + L∆t)n < eLn∆t = eL(tn −t0 ) .

The sum in the error bound is a geometric progression and can be evaluated analytically. If
we have
X
N
SN = rj
j=0

then we obtain for r 6= 1

X
N
(1 − r)SN = (1 − r) r j = 1 − r N+1
j=0

8
so that
1 − r n+1
SN = .
1−r
(Note that by l’Hospital’s rule
lim SN = N + 1.)
r→1

This summation formula implies that

X
n
(1 + L∆t)n − 1 eL(tn −t0 ) − 1
(1 + L∆t)j = ≤ .
j=0
L∆t L∆t

When we use these estimates in our error formula we obtain the final result

K∆t  L(tn −t0 ) 


|en | < eL(tn −t0 ) |e0 | + e −1 .
2L

What does this error bound tell us about the quality of the numerical solution? The first
observation is that we must expect the error to increase as we take more and more time
steps of constant size since the exponential term will grow. On the other hand, if we
integrate the equation over a fixed time interval [t0 , T ] then the exponential is bounded by
eL(T −t0 ) so that the error depends on e0 and ∆t. The appearance of e0 might be puzzling
because we set u0 equal to the given initial condition. However, the given initial condition
for the differential equation may not be one of the numbers representable in the computer,
which implies that e0 is not in general zero but proportional to the accuracy with which
the computer approximates a given number. On modern long wordlength machines this
number tends to be of order 10−7 and is negligible. The second error term dominates. It
goes to zero like ∆t. The common terminology which expresses this behavior is that Euler’s
method converges with order ∆t. This rate is a very slow compared to the commonly used
integrators of program libraries, such as Runge-Kutta, Runge-Kutta-Fehlberg or Adams
integrators whose convergence is of order ∆t4 or ∆t5 .
We shall conclude this brief introduction into the numerical solution of ordinary dif-
ferential equations with an example of a reasonable looking numerical method but which
nonetheless can given nonsensical results for a simple model problem. This will be our first
exposure to an unstable numerical method and foreshadows some of the problems we need

9
to contend with when we integrate the Black Scholes pricing equation in Chapter 4. We
shall consider the problem
u0 = −2u + 1

u(0) = 1.

The analytic solution is


1 −2t
u(t) = (e + 1).
2
Suppose that we are interested in the numerical solution over the interval [0, T ]. A numerical
approximation to the differential equation is the finite difference equation

un+1 − un−1
= −2un + 1
2∆t

where un is the approximation to u(tn ) at tn = n∆t with ∆t = T /N for a given N > 0.


This formula is not self-starting since we need u0 and u1 in order to compute un for n =
2, 3, . . . , N . However, we can always find a good approximation to u(t1 ), and hence for u1 ,
from the Taylor expansion
X
M
u(k) (0)
u(tn ) = ∆tk
k!
k=0

because u and its derivatives are available recursively from the initial value u0 and the
differential equation. To be specific we have

u(0) = 1

u0 (0) = −2u(0) + 1

u00 (0) = −2u0 (0)

·········

u(M ) (0) = −2u(M −1) (0).

With u0 and u1 given we have to solve for n = 2, . . . , N the difference equation

un+1 + 4∆tun − un−1 = 2∆t.

It is known that the solution to such a difference equation can be expressed in form

~u = ~uc + ~up

10
where ~uc = (u0 , . . . , uN ) is a solution of the homogeneous difference equation

un+1 + 4∆tun − un−1 = 0

and ~up is ANY vector which satisfies

un+1 + 4∆tun − un−1 = 2∆t.

It is straightforward to verify that a constant vector up with every component un given by

1
un =
2

solves the inhomogeneous equation. It remains to find a general ~uc which will allow us to
incorporate the initial conditions. We look for a solution of the form

un = β n with β 6= 0.

Substitution into the homogeneous equation shows that β must be a solution of the quadratic
equation
β 2 + 4∆tβ − 1 = 0.

There are two roots


p
β1 = −2∆t + 4∆t2 + 1
p
β2 = −2∆t − 4∆t2 + 1.

The nth component of our general solution can now be written as

1
un = c1 β1n + c2 β2n +
2

where c1 and c2 are computed such that u0 and u1 take on the prescribed initial conditions.
Let us now look at the value uN as N → ∞, i.e., as ∆t → 0. We write

β1N = eN log β1

and compute r !
2T 4T 2
lim N log − + +1 .
N→∞ N N2

11
Since this yields formally
0·∞

we apply l’Hospital’s rule to


 q 
2T 4T 2
log − N + N 2 + 1
lim 1
N→∞
N

and obtain  q 
log − 2T
N + 4T
N2 + 1
lim 1 = −2T
N→∞
N

so that
lim β1N = e−2T .
N→∞

An analogous argument shows that

lim |β2N | = e2T .


N→∞

Hence the startling conclusion is that

1
uN = c1 β1N + c1 (−1)N |β2 |N +
2

where the term involving β1 converges to the correct analytic solution while the other term
oscillates and converges to c2 e2T in magnitude. Clearly for large T this term will dominate
the other two terms so that the numerical solution can have a meaning only if c2 = 0.
However, since a computer does not perform exact arithmetic the exponentially growing
term cannot be suppressed. The above finite difference approximation is said to be unstable
because a small perturbation will grow and destroy the solution.
As an illustration we show in Fig. 1a a plot of the analytic, the Euler and the above
approximate solution over [0, 1] for ∆t = 1/50 when u1 is equal to the analytic solution u(t1 ).
The positive exponential is small in this case and effectively suppressed by the difference
method. However, if we integrate the equation over [0, 5] with the same ∆t then the analytic,
Euler and central difference solutions shown in Fig. 1b result. The oscillating positive
exponential term dominates for larger t and destroys the meaning of the numerical solution.

12
The oscillations can be suppressed over a larger interval by taking a smaller ∆t (which is
reflected, theoretically, in a smaller c2 ), but for a sufficiently large T they will eventually take
over. It is important to recognize that some numerical methods are inherently unstable and
therefore to be avoided. Large unexpected oscillations in a computed solution are usually a
clue that one should look for another numerical method.
Let us conclude this discussion of our numerical method by introducing the concept of
extrapolation which is valuable not only in the numerical solution of differential equations,
but also in the context of numerical integration and, in fact, anytime where a numerical
process depends on a (small) parameter h such that the problem has a true solution u and
the algorithm provides a numerical solution U (h) for which one has an estimate of the form

u − U (h) = Khα + O(hβ )

where O(hβ ) denotes a term which is negligible compared to the term Khα . For example,
the proof of the convergence theorem for Euler’s method with h = ∆t showed that

u − U (h) = Kh + O(h2 )

where u and U (h) denote the analytic and numerical solution at an arbitrary point tn .
Let us suppose we know the exponent α and have computed numerical values for U (h)
and U (h/2). Then it follows from

u − U (h) = Khα + O(hβ )

and
u − U (h/2) = K(h/2)α + O(hβ )

that
u − U (h) − 2α (u − U (h/2)) = O(hβ ) − 2α O(hβ ).

If we solve for u we find

(2α − 1)u = 2α U (h/2) − U (h) + O(hβ )

13
so that
2α U (h/2) − U (h)
U=
2α − 1
is a better approximation to u than either U (h) or U (h/2) because the dominant error term
has been eliminated. U is considered an extrapolation of the values U (h/2) and U (h). But
note that α has to be known in order to find U .
Now given a numerical method depending on a parameter h one may suspect that its
approximate solution satisfies the relation

u − U (h) = Khα + O(hβ )

but short of a complete analysis analogous to our convergence proof for Euler’s method we
may not know the exponent α. If the relationship is indeed true one can actually determine
it experimentally. Thus, suppose we have three numerical results U (h), U (h/2) and U (h/4).
Then by hypothesis
u − U (h) = Khα + O(hβ )

u − U (h/2) = K(h/2)α + O((h/2)β )

u − U (h/4) = K(h/4)α + O((h/4)β )


where u, K and α are not known. Since the remainder term O(hβ ) is supposed to be small
compared to the dominant error term Khα we shall ignore it henceforth. By subtracting
one relationship from another we obtain

U (h/2) − U (h) = K(hα − (h/2)α )

and
U (h/4) − U (h/2) = K((h/2)α − (h/4)α ).

Division now yields


U (h/2) − U (h) (1 − 1/2α )
= = 2α .
U (h/4) − U (h/2) (1/2 − 1/4 )
α α

Since numbers are available from the computation for the left side we can solve for α. Once α
is known we can use the data U (h/2) and U (h/4) to extrapolate an improved approximation

2α U (h/4) − U (h/2)
U= .
2α − 1

14
To illustrate this process and to give some feel for the numbers one might expect, let us
look at the following example.
An account with an initial investment of M (0) = $2 (say in millions) draws continuously
compounded interest at a constant rate of 8%. At the same time we pay continuously the
tax on the account which is assessed at a varying rate between 1.807% and 2.2% according
to
.02(1 + 0.1 tanh(2(M (t) − 1)).

The differential equation for the money M (t) in the account is


M 0 (t) = .08M (t) − [.02(1 + 0.1 tanh(2(M (t) − 1))]M (t)

M (0) = 2
where t is measured in years. This equation will be integrated with Euler’s method for a
time span of four years. We show in Table 1 the number of time steps, the time step ∆t,
the numerical value of M (4) obtained with Euler’s method, the estimate for the exponent α
for the order of convergence based on the three runs with time step ∆t, 2∆t and 4∆t, and
finally the extrapolated value of M (4) computed from the values of M (4) for the time steps
∆t and 2∆t and the theoretical order of convergence of α = 1.
Table 1: A record of Euler’s method for the model problem

N T M (4) extrapolated M (4)

20 4/20 2.51920
40 4/40 2.52087 2.52254
80 4/80 2.52171 .9909 2.52255
160 4/160 2.52214 .9955 2.52256
320 4/320 2.52235 .9943 2.52256
640 4/640 2.52245 .9919 2.52256
1280 4/1280 2.52250 1.0866 2.52255
2560 4/2560 2.52253 .8074 2.52256
5120 4/5120 2.52254 1.2630 2.52256

These numbers are typical for what one would expect. The estimate for the order of conver-
gence is near unity but degrades noticeably as ∆t becomes small. This is due to the division

15
of one very small number by another and suggests that this calculation should be carried
out in double precision. The remarkable result is that the extrapolation of the results from
even the two coarsest grids already yields the numerical solution to which Euler’s method
converges as the grids become finer and finer.
However, it must again be pointed out that Euler’s method (even with extrapolation) is
a poor choice for the numerical integration of initial value problems for ordinary differential
equations. Higher order Runge-Kutta and Adams methods should be employed.
Stochastic differential equations: When one prices an option with a maturity of
several days or weeks in the future then must have a view of how the value of the underlying
asset will change over this period. Of course, this value cannot be predicted with any
certainty. In fact, its short term evolution looks quite random. Such motion is modeled
with a stochastic differential equation which describes a so-called Itô process:

dx = a(t, x)dt + b(t, x)dW

x(t0 ) = x0

where a and b are given functions of t and x.


This equation is far removed from the ordinary differential equation discussed above.
In this setting x is a random variable because W (t) is the random variable associated with
a standard Brownian motion which is defined as follows []:
Definition: A scalar standard Browninan motion, or standard Wiener process, over [0, T ]
is a random variable W (t) that depends continuously on t ∈ [0, T ] and satisfies the following
three conditions:
1) W (0) = 0 (with probability 1).
2) For 0 ≤ s < t ≤ T the random variable given by the increment W (t) − W (s) is
normally distributed with mean zero and variance t − s: equivalently W (t) − W (s) ∈

t − s N (0, 1), where N (0, 1) denotes a normally distributed random variable with zero
mean and unit variance.
3) For 0 ≤ s < t < u < v ≤ T the increments W (t) − W (s) and W (v) − W (u) are
independent.

16
Our goal will be to integrate numerically the stochastic differential equation. However,
we cannot compare numerical results with anything analytic unless we have the same path
for the Brownian motion. Hence we shall fix the sample path with a discrete Brownian
motion.
Discretized Brownian motion: We set δt = T /N . Wn is the numerical value of
W (t) at tn = nδt obtained from W0 = 0 and

Wn = Wn−1 + dWn


where each dWn is an independent random variable of the form δt N (0, 1).
Let us now turn to the stochastic differential equation. The equation itself is just a
shorthand notation for the integral equation
Z t Z t
x(t) = x0 + a(s, x(s))ds + b(s, x(s))dW (s).
t0 t0

We shall assume that the functions a and b are well behaved deterministic functions so that
the first integral is unambiguous. The second integral, on the other hand, is going to be
interpreted as a so-called Itô integral

Z T X
K−1
b(s, x(s))dW (s) = lim a(tj , x(tj ))(W (tj+1 ) − W (tj ))
0 ∆t→0
j=0

where ∆t = T /K and tj+1 − tj = ∆t. It is now natural to integrate the differential equation
over [0, T ] with Euler’s method

xj+1 = xj + a(tj , xj )∆t + b(tj , xj )(W (tj+1 ) − W (tj ))

where x0 is the given initial value and ∆t is a fixed (constant) step size. This formula is
unambiguous. Once we have found xj we draw the random number W (tj+1 ) − W (tj ) from

∆t N (0, 1) and compute xj+1 . The points {xj } form a sample path. If we repeat the
calculation an entirely different sample path will be found. If we find M sample paths we
can compute the mean of {xj } and the deviation from the mean for all the sample paths
which provides statistical information on the solution of the stochastic differential equation.

17
As in the deterministic case one can discuss the error between the analytic and the
numerical solution. This can make sense only if both solutions are based on the same
sample path for the Brownian motion. This is where the discrete Brownian motion comes
into play. We shall assume that the points {tj } used for Euler’s method form a subset of the
points {tn } where we use the values {W (tj )} given by the discrete Brownian motion. Even
though the sample path for the continuous solution and the Euler solution have exactly the
same random behavior, the two solutions will differ because the integrals are approximated
by finite sums. If one were to know the exact solution of the stochastic differential equation
then, of course, one can compare the influence of the step size ∆t on the accuracy of the
numerical solution with respect to the underlying discrete Brownian motion. However, if
one chooses a different sample path for the discrete Brownian motion then a new behavior
of the error would be observed. This raises the question of whether one can say something
about the convergence of the numerical solution independently of the underlying sample
path. The answer is to measure the expected value of the error obtained for many different
sample paths.
Definition: Let x(tj ) and xj be the random variables which solve the stochastic differential
equation and a discrete approximation to it obtained for a step size of ∆t. Then the
numerical method has a STRONG order of convergence γ if there exists a constant C such
that the expectation of the error satisfies

E|xj − x(tj )| ≤ C∆tγ .

Here C will depend on the solution x(t) and the interval of integration [0, tj ] but not on ∆t.
It is known that for smooth functions a and b the above Euler method has strong order of
convergence given by
γ = 1/2.

We note that numerical experiments are reported in [] for the stochastic differential equation

dx = λx + µx dW

x(0) = x0

18
which has the analytic solution

x(t) = x(0) exp((λ − µ2 /2)t + µW (t)).

Thousand different discrete Brownian motion sample paths are generated over [0, 1] for
λ = 2, µ = 1, x0 = 1 and δt = 2−8 . A thousand errors |x(T ) − xK | are averaged for each
of five different step sizes ∆t. The logarithm of the sample averages are plotted against the
logarithm of ∆t. If the strong order of convergence inequality is in fact roughly an equality
then
log E|x(T ) − xK | = log C + γ log ∆t,

i.e. a linear relationship would be expected. The five data points for the five different step
sizes do not lie exactly on a straight line, but a least squares straight line approximation to
the data exhibits a slope of γ = .5383 which is taken as consistent with the prediction of
γ = .5.
Since any one particular sample path x(t) in itself has little meaning it is sensible to
compare also the mean of numerical and analytic solutions. This leads to the concept of a
weak order of convergence.
Definition: A numerical method has weak order of convergence equal to γ if there exists a
constant C such that for all functions g (belonging to a general specified class)

|E(g(x(tj ) − Eg(xj )| ≤ C∆tγ

where C generally will depend on g, on x(t) and on t but not on ∆t. It can be shown that
for Euler’s method the weak order of convergence is equal to 1. This implies that means
and variances are approximated to order ∆t with the numerical method.
In finance the most common stochastic differential equations are the model for the value
S of an equity asset
dS = r(S, t)S dt + σ(S, t)S dW

where r(S, t) represents an interest term and σ(S, t) is the volatility of S, and the model for
a short term interest rate like

dr = a(b − r)dt + σ dW.

19
While it may be instructive to compute sample paths for these equations and to compute
means and variances, their primary use will be deriving pricing equations for options and
bonds which depend on the random functions S and r, respectively.

20

You might also like