Question: a ) . Develop Matlab code for pricing European options under a Black Scholes model dSt St = rdt + sigma dZt using a
a Develop Matlab code for pricing European options under a Black Scholes model
dSt
St
rdt sigma dZt
using a finite difference method as discussed in class. Use forwardbackwardcentral differencing as appropriate to ensure a positive coefficient discretization. The code should be able
to use fully implicit, and CrankNicolson method.
You will have to solve a tridiagonal linear system. Use lu Matlab function to solve linear
systems. Avoid unnecessary LU factorization computation.
b Solve for a European put option, using the data given in the Table with fully implicit,
and CrankNicolson method and compare with the exact solution using blsprice in Matlab.
Use constant timestep sizes.
c Show a convergence table, with a series of grids. Show the option value at t S
Begin with a timestep of tau T where tau is the time to maturity, ietau T t and
the grid
S :K:K
K:K:K
K:K:K
K:K:K
K:K:K
K:K:K
K:K:K
KKK
KKKK;
Table : Data for Put Example
sigma
r
Time to expiry T years
Strike Price $
Initial asset price S
$
where K is the strike, and we are interested in the solution near S K
Note: to carry out a convergence study, you should solve the pricing problem on a sequence of
grids. Each grid has twice as many intervals as the previous grid new nodes inserted halfway
between the coarse grid nodes and the timestep size is halved.
Assume that
Error Otau
S
; S max
i
Si Si
Let
h CS
h Ctau
Suppose we label each computation in the above sequence by a set of h values. Then the
solution on each grid at a given point has the form
V h Vexact A h
V h Vexact A h
V h Vexact A h
where we have assumed that the mesh size and timestep are small enough that the coefficient
A in equation is approximately constant. Now, equation implies that
V h V h
V h V h
Check the theory by examining the rate of convergence of your pricer.
Carry out the above tests using fully implicit, and Crank Nicolson method. Show a convergence table for each test.
d Show plots of the option value for the range S for your solution on the finest
grid for CN method.
Submit your matlab code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
