McCulloch Cubic Spline

The McCulloch Cubic Spline fits the discount function with a cubic spline, a smooth curve made of cubic pieces joined at knots. McCulloch (1971, 1975) introduced the spline estimate of the term structure: the discount function is linear in the spline’s coefficients, so it is fitted to the bond prices by least squares, and the number of knots grows with the number of bonds.

The formula for the McCulloch Cubic Spline is as follows:

\[d_{t} = \sum_{j=1}^{J} c_{j} \cdot B_{j,t}\]

Where t is the maturity in years, \(B_{j} (t)\) the cubic B-spline basis functions on the knots, \(c_{j}\) their coefficients and J the number of basis functions, about the square root of the number of bonds, with \(d (0) = 1\). The knots lie at quantiles of the maturities, so that as many bonds mature between every two knots, as McCulloch places them. It is the most flexible of the curves and fits the prices closest, but its forward rates can swing between knots and beyond the longest bond, so its residuals understate how rich or cheap a bond is and its long end is less reliable.

A constant maturity curve is quoted at a dozen maturities. Fitting the curve to the roughly 330 Treasury notes and bonds themselves gives the term structure that what trades implies, at every maturity, and measures each bond against it: a bond priced above the curve is rich, one priced below it cheap, the basis of relative value trading. The curve is a discount function d(t), the value today of 1 paid t years from now, and the methods differ in the shape they give it, from a parametric curve with a handful of parameters to a spline that follows the prices more closely.

The fit is the same for every discount function. Each bond’s price on the curve is its coupons and principal discounted with it:

\[\text{Model Price}_{i} = \sum \left(\text{CF}_{i,k} \cdot d(t_{i,k})\right)\]

The parameters of the discount function minimise the weighted squared differences between these prices and the market prices, with weights inversely proportional to duration, as Gürkaynak, Sack and Wright (2007) fit the Federal Reserve’s Treasury curve:

\[\text{Objective} = \sum_{i=1}^{N} w_{i} \cdot (\text{Model Price}_{i} - P_{i})^{2}\] \[w_{i} = \frac{1}{D_{i}}\]

Where \(P_{i}\) is the market price plus the accrued interest of bond i, \(\text{CF}_{i , k}\) its coupons and principal at times \(t_{i , k}\) in years, \(D_{i}\) its modified duration and N the number of bonds. A price error is about the duration times the price times the yield error, so the weights reduce the weight of the long bonds’ larger price errors, while still giving a basis point of a long bond more weight than one of a short bond (equal weight in yield would need weights of \(1 / D_{i}^{2}\)). The zero rates of the fitted curve are given annually compounded, while the parametric models are fitted on continuously compounded rates, so their parameters compare with the Federal Reserve’s; the instantaneous forward rate is continuously compounded, and the yields of the bonds are bond-equivalent, compounded twice a year, as the Treasury quotes them. A residual is the gap between a bond’s market price or yield and that on the curve: a positive price residual (a negative yield residual) marks a rich bond, a negative price residual a cheap one. Residuals reflect more than mispricing, such as the liquidity of the most recently issued bonds and the demand for particular bonds in the repo market.

Also known as: cubic spline, cubic B-spline, spline curve, regression spline.

In the Finance Toolkit this is get_fitted_bond_curve with method="cubic_spline", the same function as Fitted Bond Curve.

Example

Install the Finance Toolkit with pip install financetoolkit -U, then call get_fitted_bond_curve:

from financetoolkit import FixedIncome

fixedincome = FixedIncome()

fixedincome.get_fitted_bond_curve(method="cubic_spline", date="2026-11-05")

Which returns:

References

  • Paper McCulloch, J.H. (1971). “Measuring the Term Structure of Interest Rates.” The Journal of Business, 44(1), 19-31.
  • Paper McCulloch, J.H. (1975). “The Tax-Adjusted Yield Curve.” The Journal of Finance, 30(3), 811-830.
  • Paper Gürkaynak, R.S., Sack, B. and Wright, J.H. (2007). “The U.S. Treasury Yield Curve: 1961 to the Present.” Journal of Monetary Economics, 54(8), 2291-2304.
  • Library Shares similar logic as QuantLib’s CubicBSplinesFitting (McCulloch Cubic Spline)
Share