Skip to content

Central difference

Estimate a derivative from symmetric bumps, see why smooth cubic errors quarter when the step halves, and recognise kinks and floating-point failures.

A central difference estimates a derivative using function values on both sides of the point of interest. For a positive step hh, its simplest first-derivative formula is
Chf(x)=f(x+h)−f(x−h)2h.C_h f(x)=\frac{f(x+h)-f(x-h)}{2h}.
The denominator is 2h2h: that is the distance between the two evaluation points. In finance, replacing ff by an option price and xx by spot gives a bump-and-revalue estimate of delta. The result has units of price per unit of spot. Other model inputs can be bumped in the same way, with their units stated explicitly.
The attraction is symmetry. For a sufficiently smooth function, the leading error from a simple forward difference cancels against the leading error from a simple backward difference.

Two imperfect slopes, one better estimate

Use the dimensionless test function f(x)=x3f(x)=x^3 at x=2x=2. Its exact derivative is f′(2)=12f'(2)=12. With h=0.1h=0.1,
f(1.9)=6.859,f(2)=8,f(2.1)=9.261.f(1.9)=6.859,\qquad f(2)=8,\qquad f(2.1)=9.261.

The backward slope is 11.4111.41, the forward slope is 12.6112.61, and their average is the central slope:

11.41+12.612=9.261−6.8590.2=12.01.\frac{11.41+12.61}{2} =\frac{9.261-6.859}{0.2} =12.01.

The two one-sided errors are −0.59-0.59 and +0.61+0.61. They almost cancel, leaving a central error of +0.01+0.01.

A symmetric stencil evaluates the cubic at 1.9 and 2.1 around x equals 2, with values 6.859 and 9.261. Backward and forward slopes 11.41 and 12.61 average to central slope 12.01. Halving h from 0.1 to 0.05 to 0.025 quarters the exact central error from 0.01 to 0.0025 to 0.000625.
A symmetric stencil evaluates the cubic at 1.9 and 2.1 around x equals 2, with values 6.859 and 9.261. Backward and forward slopes 11.41 and 12.61 average to central slope 12.01. Halving h from 0.1 to 0.05 to 0.025 quarters the exact central error from 0.01 to 0.0025 to 0.000625.
Original synthetic dimensionless example. The stencil shows the evaluation points; the ledger uses exact arithmetic, not a simulated or rounded pricing result.

For this cubic the entire error can be found algebraically:

Chf(x)=3x2+h2.C_h f(x)=3x^2+h^2.

At x=2x=2, halving the step to 0.050.05 gives 12.002512.0025; halving again to 0.0250.025 gives 12.00062512.000625. Each halving divides the error by four. These exact values also provide a benchmark for checking a numerical implementation. An ordinary floating-point computation may differ in its last digits.

What “second order” promises

Subtract the Taylor expansions at x+hx+h and x−hx-h. The constant and quadratic terms cancel. If ff has a continuous third derivative in a neighbourhood of xx, then

Chf(x)=f′(x)+h26f′′′(x)+o(h2).C_h f(x)=f'(x)+\frac{h^2}{6}f'''(x)+o(h^2).
The truncation error is therefore O(h2)O(h^2) as hh tends to zero. If ∣f′′′∣≤M\lvert f'''\rvert\le M throughout the interval, its magnitude is bounded by Mh2/6Mh^2/6.

Second order describes how the error scales under the smoothness assumptions. It does not mean two correct decimal places, nor does it guarantee that every central estimate beats every one-sided estimate at a particular finite step. Special functions can have zero leading error; other errors can dominate.

For a fuller derivation and the connection to Greeks, the membership lesson Numerical Differentiation has a public preview and discusses the competing effects of bump size.

Symmetry cannot repair a kink or lost digits

Consider the terminal call payoff g(S)=max⁡(S−K,0)g(S)=\max(S-K,0). At the strike, every positive symmetric bump gives

g(K+h)−g(K−h)2h=12.\frac{g(K+h)-g(K-h)}{2h}=\frac12.

Yet the left derivative is 00 and the right derivative is 11, so the classical derivative at KK does not exist. A stable central estimate alone does not establish differentiability. This is a statement about the payoff at expiry; the smoothness of a pre-expiry option price must be assessed under its pricing model.

Small steps also magnify errors in the evaluated function values. If each value has an absolute error at most ε\varepsilon, their contribution to the central quotient can be as large as ε/h\varepsilon/h. With Monte Carlo prices, the covariance between the two pricing errors matters too; shared random numbers can reduce the variance of their difference.

In floating-point arithmetic, even the intended nodes can disappear. With standard binary64 arithmetic, x=2x=2 and h=10−16h=10^{-16}, both computed nodes x+hx+h and x−hx-h round to 22. The computed cubic quotient is then 00, although the true derivative is 1212. Shrinking the bump has destroyed the calculation. Check several bump sizes, pricing precision and whether both bumped inputs remain distinct.

A stencil is only part of a pricing scheme

A central approximation to a second derivative uses three values:

f′′(x)≈f(x+h)−2f(x)+f(x−h)h2.f''(x)\approx\frac{f(x+h)-2f(x)+f(x-h)}{h^2}.
It has O(h2)O(h^2) truncation error when the fourth derivative is continuous nearby. In option pricing this supplies a spatial approximation to gamma or to the diffusion term of a PDE. The first-derivative and second-derivative formulas are different stencils.

Choosing central differences in space does not determine how to advance through time. Forward Euler, backward Euler and Crank–Nicolson are separate time-discretisation choices, with their own accuracy and stability properties. A central spatial stencil alone supplies no stability guarantee for the full PDE solver.

Sources

  • Rüdiger U. Seydel, Tools for Computational Finance, 6th edition, Springer, 2017, §4.2.1, equations (4.8)–(4.9), and §4.6.5.3: central difference orders, smoothness conditions and grid sensitivities.
  • Tobin A. Driscoll and Richard J. Braun, Fundamentals of Numerical Computation, Finite differences, §5.4: centred derivative weights and the relation to one-sided differences.
  • Driscoll and Braun, Convergence of finite differences, §5.5: order of accuracy, cancellation and the competing effects of roundoff and truncation.
Last updated
  • central difference
  • numerical differentiation
  • greeks
  • truncation error
  • numerical methods
← Back to the glossaryBack to top ↑