Crank-Nicolson method

From Wikipedia, the free encyclopedia

In the mathematical subfield numerical analysis, the Crank-Nicolson method is a finite difference method used for numerically solving the heat equation and similar partial differential equations. It is a second-order method in time, implicit in time, and is numerically stable. The method was developed by John Crank and Phyllis Nicolson in the mid 20th century.

Contents

[edit] The method

The Crank-Nicolson stencil on a 1D problem.
The Crank-Nicolson stencil on a 1D problem.

The Crank-Nicolson method is based on central difference in space, and the trapezoidal rule in time, giving second order convergence in time. Equivalently, it is the average of forward Euler and backward Euler in time.

Crank-Nicolson for the heat equation in one spatial dimension, ut = auxx, reads

u_j^{n+1} = u_j^n + \frac{1}{2} \frac{a \Delta t}{(\Delta x)^2} \left[(u_{j+1}^{n+1} - 2u_j^{n+1} + u_{j-1}^{n+1}) + (u_{j+1}^n - 2u_j^n + u_{j-1}^n)\right]

or, for a uniform grid in two spatial dimensions, ut = a(uxx + uyy),

\begin{align}u_{j,k}^{n+1} &= u_{j,k}^n + \frac{1}{2} \frac{a \Delta t}{(\Delta x)^2} \left[(u_{j+1,k}^{n+1} + u_{j-1,k}^{n+1} + u_{j,k+1}^{n+1} + u_{j,k-1}^{n+1} - 4u_{j,k}^{n+1})\right. \\ &\left.+ (u_{j+1,k}^{n} + u_{j-1,k}^{n} + u_{j,k+1}^{n} + u_{j,k-1}^{n} - 4u_{j,k}^{n})\right]\end{align}

[edit] Application in financial mathematics

Because a number of other phenomena can be modeled with the heat equation (often called the diffusion equation in financial mathematics), the Crank-Nicolson method has been applied to those areas as well. Particularly, the Black-Scholes option pricing model's differential equation can be transformed into the heat equation, and thus option pricing numerical solutions can be obtained with the Crank-Nicolson method. The importance of that comes from the extensions of the option pricing model that are not able to be represented with a closed form analytic solution; they can still offer numerical solutions. However, for non-smooth final conditions (which happen for most financial instruments), the Crank-Nicolson method is not satisfactory as numerical oscillations are not damped. For vanilla option, this results in oscillation in the gamma value around the strike price. Therefore, special damping initialization steps are necessary (eg fully implicit finite difference method).

[edit] See also

[edit] References

  • Crank J. and Nicolson P. (1947) "A practical method for numerical evaluation of solutions of partial differential equations of the heat conduction type". Proceedings of the Cambridge Philosophical Society 43, 50–64.
  • Wilmott P., Howison S., Dewynne J. (1995) The Mathematics of Financial Derivatives:A Student Introduction. Cambridge University Press.

[edit] External links