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

Crank-Nicholson finite difference solution of American option

Posted by abiao at 20:31 | Code » Matlab | Comments(1) | Reads(28231)
Crank-Nicolson for a European put was introduced before, to better master this technique, i share another sample code using Crank-Nicholson finite difference for American option.

BLSPRICEFDAM Black-Scholes put and call pricing for American Options using the Crank-Nicholson finite difference solution of Black-Scholes  Partial differential equation. Note that this function returns an approximate solution unlike the analytical solution (BLSPRICE)
SO is the current asset price, X is the exercise price, R is the risk-free interest rate, T is the time to maturity of the option in years, SIG is the standard deviation of the annualized continuously compounded rate of return of the asset (also known as volatility), and Q is the dividend rate of the asset.  The default Q is 0. N denotes the number of discretization points in the stock price domain, and M denotes the number of discretization points in time domain used for the PDE solution.Try increasing either of M or N to achieve greater efficiency.

lecture notes can be downloaded at http://www.cs.cornell.edu/Info/Courses/Spring-98/CS522/home.html and matlab file http://www.cs.cornell.edu/Info/Courses/Spring-98/CS522/content/blspricefdam.m.

Tags: , ,
Pretty cool and correct, things are all in the proper place.
design home cheats
Pages: 1/1 First page 1 Final page
Add a comment
Enable HTML
Enable UBB
Enable Emots
Nickname   Password   Optional
Site URI   Email   [Register]