Adjoint algorithmic differentiation: many Greeks in one reverse pass
A portfolio price may depend on thousands of curves, volatilities, correlations, and market quotes. Bump-and-revalue computes one sensitivity at a time, so a complete risk vector can require thousands of repricings. Adjoint algorithmic differentiation (AAD) applies reverse-mode automatic differentiation to the pricing computation: after one forward valuation, a reverse sweep propagates the price sensitivity back to all inputs.
Greeks from one reverse pass
Illustrative reverse-mode cost: about one forward and one reverse evaluation.
The chain rule on a computation graph
Suppose a program maps inputs to a scalar price . The calculation consists of elementary operations such as additions, products, exponentials, and conditional branches. For a simple chain
the forward pass stores intermediate values. The reverse pass starts with the output adjoint and applies the chain rule backward:
For a scalar output and inputs, reverse mode computes the full gradient with work proportional to the computation graph, largely independent of . Forward-mode differentiation is more efficient when there are few inputs and many outputs; reverse mode is especially useful for one or a few prices with many risk factors.
A portfolio illustration
Suppose a price is
Let and , so . The reverse sweep gives
The same principle applies to a much larger numerical pricing graph. Every market quote is an input node; the output price’s adjoint is propagated through calibration, curve construction, simulation, discounting, and payoff aggregation. This can give deltas to all quotes in one pass, provided the whole calculation is differentiated consistently.
AAD versus Monte Carlo pathwise Greeks
AAD is a way to differentiate a numerical program. Pathwise differentiation is a way to differentiate an expectation under suitable conditions. AAD can automate the chain rule needed for pathwise sensitivities through a simulator, but it does not remove the mathematical limitations of differentiating discontinuous payoffs or the sampling noise of Monte Carlo.
Why the reverse pass is not free
Reverse mode needs intermediate values from the forward pass. Storing every state can consume substantial memory, especially for long simulations with many time steps and risk factors. Checkpointing addresses this by saving selected states and recomputing parts of the forward path during the reverse sweep, trading extra computation for lower memory.
The method also depends on a differentiable implementation. Hard exercise decisions, barriers, clipping, and branch-dependent logic create kinks or discontinuities. AD returns derivatives of the implemented computational graph under its local rules; at nonsmooth points, that derivative may not represent the desired financial sensitivity. Smoothing, conditional expectation, likelihood-ratio methods, or carefully defined subgradients may be more appropriate.
If the price includes Monte Carlo randomness, keep random numbers fixed when differentiating a pathwise estimator. The resulting gradient is a sample estimate with Monte Carlo error, not an exact model Greek. Validate selected sensitivities against common-random-number bump-and-revalue, analytic benchmarks, or independent simulations.
A practical workflow
- Define the market inputs and scalar outputs whose sensitivities are needed.
- Build a computational graph with consistent units, conventions, and explicit calibration dependencies.
- Run a forward valuation while storing or checkpointing required intermediate states.
- Seed the output adjoint with one and execute the reverse sweep.
- Validate representative deltas and cross-check high-impact risks with independent methods.
- Report Monte Carlo error and investigate instability near exercise boundaries, barriers, or calibration degeneracies.
Common mistakes
- Claiming AAD makes sensitivity computation independent of portfolio complexity. It can greatly reduce the incremental cost, but the forward valuation and reverse sweep still have costs.
- Treating algorithmic derivatives as model-free risk. AAD differentiates the implemented model and calibration assumptions.
- Ignoring memory use in a long path simulation; checkpointing or recomputation may be required.
- Expecting stable Greeks through a discontinuous exercise rule without smoothing or specialised treatment.
- Comparing AAD and finite differences with independent random paths, letting Monte Carlo noise swamp the comparison.
Practice
ModeA scalar portfolio price depends on 5,000 market quotes. Which AD mode is usually attractive for computing all first-order sensitivities, and why?Show answer
Reverse mode. One reverse sweep computes the gradient of a scalar output with respect to many inputs, with work roughly proportional to the pricing graph rather than requiring a full revaluation per quote.
AdjointFor V = x²y + exp(y), what are ∂V/∂x and ∂V/∂y?Show answer
and .
Monte CarloDoes differentiating a Monte Carlo pricer with AAD eliminate sampling error in the Greek?Show answer
No. It differentiates the simulated computation. The resulting sensitivity remains a Monte Carlo estimator and should be accompanied by an error estimate and validation.
Further reading: Capriotti and Giles (2024), “15 Years of Adjoint Algorithmic Differentiation in Finance,” Quantitative Finance 24(9), 1353–1379. Author-hosted review.