Quiz: Jacobian Computation — Finite Difference and AAD

Module 3 of 5 · Hard

Quick Quiz

1. The forward finite difference approximation is f(x)[f(x+h)f(x)]/hf'(x) \approx [f(x+h) - f(x)]/h. What is its truncation error order, and what limits how small hh can be made?

2. Central finite differences use f(x)[f(x+h)f(xh)]/(2h)f'(x) \approx [f(x+h) - f(x-h)]/(2h). Compared to forward FD at their respective optimal step sizes:

3. The complex step method computes f(x)Im[f(x+ih)]/hf'(x) \approx \text{Im}[f(x+ih)]/h. Its key advantage over forward finite differences is:

4. Reverse-mode AAD computes the full gradient θLRp\nabla_\theta \mathcal{L} \in \mathbb{R}^p in O(1)O(1) passes (independent of pp). What is the key reason reverse mode is preferred over forward mode for a scalar calibration objective?

5. For a Heston calibration with p=5p = 5 parameters and N=40N = 40 instruments, how many pricing engine evaluations does the central FD Jacobian require per LM iteration?

6. A developer implements the complex step method for Black-Scholes pricing but uses `abs(sigma)` inside the NormCdf computation to ensure a positive argument. What will happen to the derivative?

7. You need the full Jacobian JR100×50J \in \mathbb{R}^{100 \times 50} for an LMM calibration (100 swaptions, 50 parameters). Which method requires the fewest pricing engine evaluations?

8. A pricing function contains the line `d1 = log(S/K) + 0.5*sigma**2*T`. You differentiate with respect to sigma using forward AAD. Which elementary operation in this line contributes a non-zero tangent?