MA473 Lab8
MA473 Lab8
MA473 Lab8
IIT GUWAHATI
MA 473 Computational Finance Lab – VIII Date: 24.09.2024
Consider the following Black-Scholes PDE for European call:
∂V 1 2 2 ∂2V ∂V
+ σ S 2
+ (r − δ)S − rV = 0, (0, ∞) × (0, T ], T > 0
∂t 2 ∂S ∂S
V (S, t) = 0, for S = 0,
V (S, t) = S − Ke−r(T −t) , for S → ∞
with the terminal condition V (S, T ) = max(S − K, 0).
With the following transformation
2τ 2r 2(r − δ)
S = Kex , t = T − 2 , q := 2 , q δ := ,
σ σ σ2
2τ
V (s, t) = V Kex , T − 2 =: v(x, τ ), and
σ
1 1 2
v(x, τ ) =: K exp − (q δ − 1)x − (q δ − 1) + q τ y(x, τ ),
2 4
the above Black-Scholes PDE becomes the following 1-D heat conduction parabolic PDE:
∂2y
∂y
= , x ∈ R, τ ≥ 0,
∂τ ∂x2
y(x, 0) = max exp( x2 (qδ + 1)) − exp( x2 (qδ − 1)), 0 , x ∈ R,
y(x, τ ) = 0, for x → −∞,
y(x, τ ) = exp 12 (qδ + 1)x + 14 (qδ + 1)2 τ for x → ∞.
Solve the transformed PDE by the following finite element methods (FEMs):
(i) Piecewise-linear basis functions with the trapezoidal rule for the numerical quadratures and the
Crank-Nicolson scheme (in time).
(ii) Piecewise-linear basis functions with the Simpson’s rule for the numerical quadratures and the
Crank-Nicolson scheme (in time).
The values of the parameters are T = 1, K = 10, r = 0.06, σ = 0.3 and δ = 0.
The output files should contain the following for above problem:
a) Plot the numerical solution at the final time level.
b) Draw the surface plot of the numerical solution.
c) Use the double-mesh principle to calculate the L2 −norm errors. Use the log-log plot to show the
order of convergence.