Finite Differencing Algorithms



As Hull explains in Options, Futures, and other Derivative Securities:

"Finite difference methods value a derivative security by solving numerically the differential equation that the derivative security must satisfy. The differential equation is converted into a set of difference equations and the difference equations are solved iteratively."

Thus, finite differencing can be applied as a numerical method for solving the prices of various financial derivative products. For valuing a European call or put, the Black-Scholes partial differential equation must be satisfied:

df/dt+r*S*df/ds+1/2*sigma*sigma*S*S*d2f/dS2 = rf

This can be done in two ways. The Black-Sholes equation can be solved directly, or it can be transformed into heat equation coordinates.The first approach, as described by Hull, requires a "grid" determined by equally spaced time steps on the x-axis and equally spaced "price" steps on the y-axis. The initial conditions are determined by the payoff function of the option. For example, the initial conditions for a call would satisfy (S-K)+ for equally spaced stock prices ranging from 0 to some price. These payoffs indicate the value of the option at time 0 given the underlying stock price.

A finite differencing algorithm is then applied to the initial array of values iteratively backwards in time along the grid until time T is reached. Hull applies the following algorithm:

AjF(i,j-1)+BjF(i,j)+CjF(i,j+1)=F(i+1,j)

The values of the array in the next time step are then calculated as a function of the previous array's values, hence the "explicit" method. This is comparable to a trinomial lattice approach.

The implicit and Crank-Nicholson algorithms, however, calculate the values of the arrays by using a tridiagonal matrix to infer the next vector of values from the previously calculated values. Hence, the calculations are done "implicitly." The Crank-Nicholson algorithm is a combination of both the explicit and implicit methods.

While the implicit and Crank-Nicholson algorithms are more stable than the explicit method, they are much more expensive computationally due to the additional calculations required. However, they require fewer time steps to converge to the correct answer.

The second approach is to transform the Black-Scholes PDE into a diffusion process such as the heat equation. The initial values of the grid are composed of equally spaced "payoffs" based on log(S/E). A finite differencing algorithm is then used to reach time "T". The values of the option are then translated back into "financial variables" by interpolation between the grid points.