The Art of Cubic Spline Interpolation
Interpolating yield curves is as much an art as it is mathematics. In quant finance, one is frequently presented with discrete interest rate yield data points (e.g. swap rates for 1Y, 2Y, 5Y maturity) and must interpolate a continuous curve.
Why Splines?
Linear interpolation creates sharp edges, meaning the first derivative is discontinuous. This causes severe pricing spikes in interest rate derivatives. Cubic splines ensure that the curve is twice continuously differentiable ($C^2$).
Mathematical formulation
For each interval $[x_i, x_{i+1}]$, the interpolating function is a cubic polynomial: $$S_i(x) = a_i + b_i(x - x_i) + c_i(x - x_i)^2 + d_i(x - x_i)^3$$
We solve for the coefficients by enforcing continuity of values, first derivatives, and second derivatives at each node, along with natural boundary conditions (second derivative equals zero at the endpoints).
This research project forms the basis of my recent quantitative engineering efforts.