Numerical Differentiation
Estimating a derivative from function values alone, by nudging the input slightly and measuring the change in output — the practical way quants compute Greeks when no clean formula for the derivative exists.
Prerequisites: Numerical Stability and Error Analysis
A structured product's price comes out of a complicated numerical model — a Monte Carlo simulation or an exotic pricing tree — with no clean algebraic formula. Risk management still needs delta, the sensitivity of price to the underlying's move, to hedge the position. Without a formula to differentiate, the practical answer is to nudge the underlying's price by a tiny amount, rerun the model, and see how much the output moves. That's numerical differentiation: estimating a derivative purely from evaluating the function at nearby points, never touching calculus at all.
An analogy: judging a hill's steepness by walking
If you can't see a topographic map's slope formula but can only measure your altitude at any spot, you can still estimate steepness: walk a short step forward, note how much your altitude changed, and divide the altitude change by the distance walked. A shorter step gives a more precise local estimate of the slope right where you're standing, as long as your altimeter is precise enough to actually detect the small change — a step so short that the altitude change is smaller than your altimeter's precision gives you noise, not a slope.
The math, one piece at a time
The forward difference estimates the derivative of at a point using one nudge forward:
where is a small step size. In words: this is exactly the definition of a derivative — the limit of the slope between two nearby points as they get infinitely close — except a computer can't take , so it uses a small but finite instead, and pays a price called truncation error, roughly proportional to .
In plain English: instead of comparing to a point ahead of it, compare a point ahead to a point behind, which cancels out the leading error term by symmetry — central difference's truncation error shrinks proportional to , so halving cuts the error by 4x instead of 2x. But shrinking too far runs into the opposite problem from earlier: floating-point rounding error in computing (a subtraction of two close numbers — see catastrophic cancellation) grows roughly like as shrinks, since a smaller numerator is divided by a smaller . The total error is the sum of both effects, and there's an optimal that balances them — too big and truncation error dominates, too small and rounding error dominates.
Worked example 1: delta by hand
An option prices at $10.00 with the underlying at $100. Bumping the underlying to $100.01 gives a price of $10.0052; bumping down to $99.99 gives $9.9948. Central difference delta:
In words: a $1 move in the underlying moves the option price by about $0.52 — a delta of 0.52, computed with no derivative formula at all, purely from three price evaluations (or in this case, two, since central difference doesn't need itself).
Worked example 2: finding a good step size
Suppose pricing this option to $0.0001 precision (a realistic Monte Carlo noise floor). With : truncation error is roughly proportional to , fine. With (far too small): the price difference is now comparable in size to the pricing model's own $0.0001 noise floor, so the "derivative" computed is dominated by simulation noise, not the true slope — a classic case of chosen too small, producing a wildly unstable delta estimate that can even flip sign between reruns. The lesson: the right step size depends on how precisely the underlying function itself can be evaluated, not just on wanting maximum mathematical accuracy.
What this means in practice
Numerical differentiation via bump-and-reprice is the standard way to compute Greeks for pricing models too complex for closed-form sensitivities — Monte Carlo pricers, exotic-option trees, or any black-box valuation model — and it's also how gradient-based optimizers estimate gradients when no analytic gradient is coded. The choice of step size , and whether to use forward or central differences, is a real engineering decision that trades off truncation error against rounding (or simulation) noise, not a detail to default blindly.
Numerical differentiation estimates a derivative from function evaluations at nearby points rather than from an algebraic formula; central differences are more accurate than forward differences for the same step size, but every numerical derivative faces a genuine trade-off between truncation error (from using a finite, not infinitesimal, step) and rounding or noise error (from subtracting two very close function values) — the best step size balances the two rather than minimizing either alone.
The classic mistake is assuming smaller step size always means a more accurate derivative, and shrinking toward machine precision to "get closer to the true limit." Past a certain point this makes the estimate worse, not better, because the numerator becomes dominated by rounding or simulation noise rather than the true function change. When a numerically-differentiated Greek looks unstable or noisy between reruns, the fix is often to increase the step size, not decrease it.
Related concepts
Practice in interviews
Further reading
- Press et al., Numerical Recipes, ch. 5
- Glasserman, Monte Carlo Methods in Financial Engineering, ch. 7