Quantitative finance collector
C++ Matlab VBA/Excel Java Mathematica R/Splus Net Code Site Other
Sep 5

Crank-Nicolson for a European put

Posted by abiao at 15:51 | Code » Matlab | Comments(0) | Reads(12252)
A PDE can be solved by Finite Difference or Finite Element method, both methods require space discretization, therefore, explicit or implicit finite difference is applied for this problem. The advantage of explicit finite difference is it does not require matrix inversion, however, to satisfy CFL condition, dt (time interval) can not be too small to prevent from non-convergece result, Crank-Nicolson is supposed to balance between explicit and implicit finite difference by choosing theta=1/2, which means taking average of explicit and implicit method.

A sample code to show the performance of Crank Nicolson for a Europen put can be downloaded at http://www.maths.strath.ac.uk/~aas96106/ch24.m, it is from chapter 24 of the book An Introduction to Financial Option Valuation: Mathematics, Stochastics and Computation, more codes are at the homepage http://www.maths.strath.ac.uk/~aas96106/option_book.html
wiki(Crank Nicolson)  

Add a comment
Enable HTML
Enable UBB
Enable Emots
Nickname   Password   Optional
Site URI   Email   [Register]