Skip to content
All library documents

Using Adjoint Differentiation to Price Interest Rate Swaps

Article Quant Q&A · Author: Alfie

Summary

The document raises a question about applying adjoint algorithmic differentiation (AAD) to an interest rate swap pricer. The author has been testing AAD on Black–Scholes call options but reports that the resulting Greeks do not match expected values, and proposes moving to a simpler instrument. They assume discount factors and forward points are already available, so curve interpolation is outside the proposed exercise.

The post asks how to structure the swap pricing calculation for AAD and what implementation details matter. It supplies no pricing formula, code, derivative results, or responses, so it does not establish a particular implementation or explain the discrepancy in the option Greeks. Its learning value is therefore as a focused problem statement: swap cash flows and discounting provide a setting for examining how algorithmic differentiation propagates sensitivities through a valuation routine, with the market inputs treated as given.

Key ideas

  • The author proposes an interest rate swap as a simpler AAD example than an option pricer.
  • Discount factors and forward points are assumed to be supplied, leaving interpolation outside the exercise.
  • The stated aim is to obtain sensitivities by differentiating the swap valuation routine.
  • The document gives no implementation guidance or evidence that resolves the reported Greek mismatch.

Tags

Full text
# Adjoint Algorithmic Differentiation: swap pricing


# Adjoint Algorithmic Differentiation: swap pricing












I have tried to implement an AAD routine to price call options using the Black-Scholes formula, but my greeks are not quite agreeing with the expected ones, so I have decided to start with something a bit simpler.

Assuming that I know all the discount factors and forward points (so that that I do not need to use any interpolation routine), what would be the best way to implement an IRSwap pricer using AAD? Any particular points I should bear in mind?

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.