**3. Dynamic Nelson–Siegel**

Diebold and Li (2003) proposed the following dynamic version of Nelson–Siegel yield curve model

$$NS(\tau) = \beta\_1 L\_1(\tau) + \beta\_2 L\_2(\tau) + \beta\_3 L\_3(\tau),\tag{3}$$

where

$$\begin{aligned} L\_1(\tau) &= 1, \\ L\_2(\tau) &= \frac{1 - e^{-\lambda \tau}}{\lambda \tau}, \\ L\_3(\tau) &= \frac{1 - e^{-\lambda \tau}}{\lambda \tau} - e^{-\lambda \tau} \end{aligned}$$

and the parameter *λ* is a constant interpreted as the conductor of the curve exponential decay rate.

A yield curve is fitted according to the Nelson–Siegel model to relate yields and maturities of available contracts for a specific day. We will refer to such yield curve as the Nelson–Siegel *static yield curve*. Let *θ* be {*β*1, *β*2, *β*3}. The curves are fitted by constructing a simplex solver which computes appropriate values for *θ* to minimize the distance between *NS*(*τ*) and market data points. The coefficients *β*1, *β*2, and *β*3 are interpreted as three latent dynamic factors. The loading on *β*1 is constant and do not change in the limit; then, *β*1 can be viewed as a long-term factor. The loading on *β*2 starts at 1 and decays quickly to zero; then, *β*2 can be viewed as a short-term factor. Finally, the loading on *β*3 starts at zero, increases, and decays back to zero; then, *β*3 can be viewed as a medium term factor.

The Dynamic Nelson–Siegel (DNS) model is defined by

$$s\_l(\tau) = \beta\_{1,l} L\_1(\tau) + \beta\_{2,l} L\_2(\tau) + \beta\_{3,l} L\_3(\tau) + \varepsilon\_l \tag{4}$$

$$t = 1, \dots, T,$$

where the coefficients *β<sup>i</sup>*,*<sup>t</sup>* are AR(1) processes defined by

$$
\beta\_{i,t} = c\_i + \phi\_i \beta\_{i,t-1} + \eta\_{i,t} \qquad i = 1,2,3.
$$

The parameters *ci* and *φi* are estimated with the maximum likelihood for the ARIMA model. The coefficients *β<sup>i</sup>*,*<sup>t</sup>* are predicted as AR(1) over a dataset of *T* daily market observations. Furthermore, *t* ∼ N (0, *σ*2 ) and *ηi*,*<sup>t</sup>* ∼ N (0, *σ*2*i* ) are independent errors. Since the yield curve model depends only on *β*1,*t*, *β*2,*t*, *β*3,*t*, then forecasting the yield curve is equivalent to forecasting *β*1,*t*, *β*2,*t*, and *β*3,*t*.

Conversely, the factors for long-term, short-term, and medium-term can also be interpreted, respectively, in terms of level, slope, and curvature of the model. Diebold and Li (2003) use these interpretations to claim that the historical stylized facts of the term structure of interest rates can be replicated by fitting the three factors, which means that the model can replicate yield curve geometric shapes.

For the US market, Diebold and Li (2003) show that the DNS model outperforms traditional benchmarks such as the random walk model, even though Vicente and Tabak (2008) state that the model does not outperform a random walk for short-term forecasts (one-month ahead).
