Question: a). Develop Matlab code for pricing European options under a Black Scholes model d.St St rdt+odZt using a finite difference method as discussed in
a). Develop Matlab code for pricing European options under a Black Scholes model d.St St rdt+odZt using a finite difference method as discussed in class. Use forward/backward/central differ- encing 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. DO NOT use the full matrix objects in Matlab. Use the Matlab sparse matrix function spdiags to set up a sparse diagonal matrix of the correct size and 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 ATT/25, 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];
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
