Fitting the Diebold Li Model

This example shows how to construct a Diebold Li model of the US yield curve for each month from 1990 to 2010. This example also demonstrates how to forecast future yield curves by fitting an autoregressive model to the time series of each parameter.

Diebold Li Model

Diebold and Li start with the Nelson Siegel model

y=β0+(β1+β2)τm(1-e-mτ)-β2e-mτ

and rewrite it to be the following:

yt(τ)=β1t+β2t(1-e-λtτλtτ)+β3t(1-e-λtτλtτ-e-λtτ)

The above model allows the factors to be interpreted in the following way: Beta1 corresponds to the long term/level of the yield curve, Beta2 corresponds to the short term/slope, and Beta3 corresponds to the medium term/curvature. λ determines the maturity at which the loading on the curvature is maximized, and governs the exponential decay rate of the model.

Diebold and Li advocate setting λ to maximize the loading on the medium term factor, Beta3, at 30 months. This also transforms the problem from a nonlinear fitting to a simple linear regression.

Fit the Model

A DieboldLi object is developed to facilitate fitting the model from yield data. The DieboldLi object inherits from the IRCurve object, so the getZeroRates, getDiscountFactors, getParYields, getForwardRates, and toRateSpec methods are all implemented. Additionally, the method fitYieldsFromBetas is implemented to estimate the Beta parameters given a lambda parameter for observed market yields.

The DieboldLi object is used to fit a Diebold Li model for each month from 1990 through 2010.

Forecasting

The Diebold Li model can be used to forecast future yield curves. Diebold and Li propose fitting an AR(1) model to the time series of each Beta parameter. This fitted model can then be used to forecast future values of each parameter, and by extension, future yield curves.

For this example the MATLAB function regress is used to estimate the parameters for an AR(1) model for each Beta.

The confidence intervals for the regression fit are also used to generate two additional yield curve forecasts that serve as additional possible scenarios for the yield curve.

The MonthsLag variable can be adjusted to make different period ahead forecasts. For example, changing the value from 1 to 6 would change the forecast from a 1 month ahead to 6 month ahead forecast.