Quiz: Implied Volatility Surface in C++
Module 6 of 8 · Hard
Quick Quiz
1. The `ImpliedVolatilitySurface` constructor calls `evaluate_cubic_spline_coefficients()` and stores `_alpha`, `_beta`, `_gamma` matrices. Why is this computation done at construction time rather than on each call to `implied_volatility()`?
2. Why does the `ImpliedVolatilitySurface` interpolate in **total variance** `w(T,K) = σ*(T,K)² · T` along the maturity axis rather than in implied volatility directly?
3. In the Thomas algorithm for a tridiagonal system of size N, the number of floating-point operations is O(N³), the same as full Gaussian elimination.
4. The `smile_implied_volatility` method uses **linear extrapolation** for strikes outside the market range `[K₁, Kₙ]`. What is the alternative, and what is its practical risk?
5. In the Dupire local volatility computation, the partial derivative `∂σ*/∂K` is approximated by a central finite difference: ``` ∂σ*/∂K ≈ (σ*(T, K+εK) - σ*(T, K-εK)) / (2εK) ``` If `εK` is too small (e.g., `εK = 1e-15`), what numerical problem arises?
6. The forward-moneyness adjustment `K(i) = K · exp(r · (T_i - T))` used during maturity interpolation converts a strike at time T to the equivalent strike at maturity T_i. If T < T_i (querying between the first and second market maturities), then K(i) < K.