Jaime Frade
Computational Finance: Dr. Kopriva
Homework #6
0.
Executive Summary
In this assignment, there was a need to setup a program that calculated the value of an option using the
Black Scholes diﬀerential equation. The method will be based on the CrankNicolson scheme which will be
demostrated is stable and coverengent, unlike other explict methods. This ﬁnite diﬀerence method is provides
the stability of an implicit scheme, yet still is explicit in its values because it is average of the both explict and
implicit methods.
Using the provided test case with a forcing term, the program solved the partial diﬀerential equation, where
the exact solution was provided. A comparsion was made between the numerical and exact solutions which will
be found to be the same.
The expected error behavior will be also shown. As each time step was divided by a factor of two, the error ratio
increased by a factor of four. The method is based on second order and the error illusrated this coverengence
behavior in space and in time.
After illustrating the program and the methods used are acceptable and expected error behavior, the program
will calculate the value of a Euporean Put. From lecture, there valuation has an exact solution so a comparsion
using similar methods as in previous task. From Willmott, the program will also calculate the Greeks, the
variables measuring the equation’s senstivity to stock price, Δ, and interest rate,
ρ
.
In conclusion, my numerical values over an closed interval of stock prices, [0,20], were the same values as
calculated from the exact solution.
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Statement of Problem
1. Problem one
Using a ﬁnite diﬀerence method solve the following partial diﬀerential equation with forcing term, where
the exact solution is known. Before solving the problem numerically, I will verify that the adding the given
forcing term to the right hand side and adding the intial conditions so that the exact solution is
e
x
+
e

τ
.
v
(
x, τ
) =
e
x
+
e

τ
(1)
∂v
∂τ
=

e

τ
(2)
∂v
∂x
=
e
x
(3)
∂
2
v
∂x
2
=
e
x
(4)
Suppose
σ
=
r
= 1, Subsitituting (1)(4) into the following and simplifying will obtain:
∂v
∂τ

rx
∂v
∂x
=
1
R
σ
2
x
2
∂
2
v
∂x
2

rv
(5)

e

τ

xe
x
=
1
R
x
2
e
x

e
x

e

τ

xe
x
=
1
R
x
2
e
x

e
x
e
x
±
1

x

1
R
²
= 0
(6)
From above, (1) is not an exact soution to (5). However, by adding the following forcing term to the right
hand side of (5), (1) will become an exact solution.
∂v
∂τ

rx
∂v
∂x
=
1
R
σ
2
x
2
∂
2
v
∂x
2

rv
+
e
x
±
1

x

1
R
²

{z
}
FORCING TERM
(7)
e
x
±
1

x

1
R
²
=
e
x
±
1

x

1
R
²
0 = 0
Approximation.
To approximate equation (5), I will use the CrankNicolson approximation listed below:
δ
+
τ
u
n
j
=
u
n
+1
j

u
n
j
Δ
τ
=
±
1
R
σ
2
j
x
2
j
δ
+
x
δ

x
+
r
j
x
j
δ
0
x

r
j
²
[
u
n
+1
j
+
u
n
j
]
2
(8)
Error behavior
Verﬁy that (8) has a local truncation error of
O
(Δ
x
2
,
Δ
τ
2
)
Numerical problem
Solve the equation on the interval [0
,
1] with teh exact solution as the intial condition. Integrate to time
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '10
 staff
 Numerical Analysis

Click to edit the document details