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 forward/backward/central differencing as appropriate to ensure a positive coefficient discretization. The code should be able
to use fully implicit, and Crank-Nicolson 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 1,(with fully implicit,
and Crank-Nicolson 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 =0, S =100.
Begin with a timestep of \tau = T /25, where \tau is the time to maturity, i.e.,\tau = T t, and
the grid
S =[0:0.1*K:0.4*K,...
0.45*K:0.05*K:0.8*K,...
0.82*K:0.02*K:0.9*K,...
0.91*K:0.01*K:1.1*K,...
1.12*K:0.02*K:1.2*K,...
1.25*K:.05*K:1.6*K,...
1.7*K:0.1*K:2*K,...
2.2*K,2.4*K,2.8*K,...
3.6*K,5*K,7.5*K,10*K];
1
Table 1: Data for Put Example
\sigma .4
r .02
Time to expiry (T)1.0 years
Strike Price $100
Initial asset price S
0 $100
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 = O((\tau )
2
,(S)
2
) ; S = max
i
(Si+1 Si)(1)
Let
h = C1S
h = C2\tau
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
2
V (h/2)= Vexact + A (h/2)2
V (h/4)= Vexact + A (h/4)2
(2)
where we have assumed that the mesh size and timestep are small enough that the coefficient
A in equation (2) is approximately constant. Now, equation (2) implies that
V (h) V (h/2)
V (h/2) V (h/4)'4(3)
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 =[50,150], 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!