**1. Introduction**

Forecast methods applied to a term structure of interest rates are important tools not only for banks and financial firms, or governments and policy makers, but for society itself, helping to understand the movements of markets and flows of money. Several works have been done during the past few decades in order to predict the dynamics of term structure of interest rates. This paper presents a dynamic version of the constrained smoothing B-splines model to forecast the yield curve with no-arbitrage restrictions.

A complete term structure of interest rates does not exist in the real world. Observable market data are discrete points that relate interest rates to maturity dates. Since it is unlikely that there will be an available contract in the market for every maturity needed by practitioners, a continuous curve model is necessary. The importance of these models is crucial for pricing securities, for instance. The first modeling technique that comes to mind is interpolation. With interpolation, one can indeed obtain an adherent fit, but it can easily lead to unstable curves since market data are subject to many sources of disturbance.

The literature describes two approaches for estimating the term structure of interest rates: a statistical approach and an equilibrium approach. The equilibrium approach makes use of theories that describe the overall economy in terms of state variables and its implications on short-term interest rates Cox et al. (1985); Duffie and Kan (1996); Vasicek (1977). In the statistical approach, the construction of the yield curve relies on data observed in the market Heath et al. (1992); Hull and White (1990). This observed data can be smoothed with parametric or nonparametric methods. Parametric methods have functional forms and their parameters can have economic interpretations such as a Nelson–Siegel model Nelson and Siegel (1987) or the Svensson model Svensson (1994). One advantage is that restrictions on parameters can be added so it copes with convenient economic theories such as the

arbitrage-free set. However, its functional form makes parametric methods less flexible to fit observed data. This lack of adherence to data can make its practical usage inappropriate, especially in asset pricing and no-arbitrage applications due to misspecification Laurini and Moura (2010). The model can produce yield curves with theoretical integrity but without reflecting the reality. On the other hand, nonparametric methods do not assume any particular functional form and consequently they are very flexible and can be very robust if combined with appropriate conditions.

After almost 50 years since the publication of the first yield curve models McCulloch (1971), just recently the yield curve dynamics became an essential topic. With the publication of the Dynamic Nelson–Siegel (DNS) model by Diebold and Li (2003), the subject became established. Even though the dynamics of term structure play a vital role in macroeconomic studies, Diebold and Li argued that until then little attention had been paid to forecasting term structures. They gave two reasons for this lack of interest. Firstly, they stated that no-arbitrage models had little to say about term structure dynamics. Secondly, based on the work of Duffee (2002), they assumed that affine equilibrium models<sup>1</sup> forecast poorly. Therefore, there was a belief that the dynamics of yield curves could not be forecast with parsimonious models.

In order to challenge this idea, Diebold and Li proposed the DNS model using a Nelson–Siegel yield curve fitting to forecast its dynamics. This model became very popular among financial market users and even central banks around the world. It is parsimonious and stable. In addition, the Nelson–Siegel model imposes some desired economic properties such as discount function approaching zero as maturity evolves and its factors representing short-, medium-, and long-term behaviors.

In practice, the forecast results of DNS are remarkable, but, despite its both theoretical and empirical success, DNS does not impose restrictions for arbitrage opportunities. Consequently, practitioners could be exposed to critical financial risks, as the pricing of assets that depends on interest rates relies on arbitrage-free theory. In order to mitigate these risks, Christensen et al. (2011) introduce a class of Arbitrage-Free Nelson–Siegel (AFNS) models. They are affine term structure models that keep the DNS structure and incorporate no-arbitrage restrictions. Tourrucôo et al. (2016) list several appealing features of AFNS. Namely, they keep the desired economic properties of the three-factors model of the original structure of DNS. They also ensure lack of arbitrage opportunities with a more simple structure compared to those affine arbitrage-free models published previously by Duffie and Kan (1996) and Duffee (2002). This is achieved by adding a yield-adjustment term to the Nelson–Siegel yield curve model described as an ordinary differential system of equations to ensure no-arbitrage. Tourrucôo et al. (2016) argue that, in long forecast horizons, the AFNS model with uncorrelated factors delivers the most accurate forecasts. Their conclusion is that no-arbitrage is indeed helpful, but only for longer forecasting horizons. Barzanti and Corradi (2001) published earlier works on the use of constrained smoothing B-splines to overcome some difficulties while estimating term structures of interest rates with ordinary cubic splines. They computed the B-splines coefficients as a least squares problem. However, Laurini and Moura (2010) proposed constrained smoothing B-splines with a different methodology. This methodology was initially proposed by He and Shi (1998) and He and Ng (1999) as a general tool to smooth data with certain qualitative properties such as monotonicity and concavity or convexity constraints. Roughly, the methodology builds the yield curve as a *L*1 projection of a smooth function into the space of B-splines. It is achieved by estimating a conditional median function as described in quantile regression theory of Koenker and Bassett (1978). A grea<sup>t</sup> advantage is that, being a conditional median function, it is robust to outliers. In addition, its formulation as a linear programming problem allows us to impose several constraints without a substantial increase in computational costs.

<sup>1</sup> The expression "affine term structure model" describes any arbitrage-free model in which bond yields are affine (constant-plus-linear) functions of some state vector x. For further reading, we recommend Piazzesi (2010).

Our present work proposes DCOBS, a dynamic constrained smoothing B-splines model to forecast the term structure of interest rates. DCOBS describes the coefficients of the yield curve model proposed by Laurini and Moura (2010) as processes evolving over time. Even though constrained smoothing B-splines specification provides full automation in knot mesh selection, we could not use it in a dynamic framework setting. In order to build a common ground and observe curve shapes evolving over time, knots were fixed to capture short-, medium- and long-term behavior according to observed data. These knots were distributed equally in the dataset, so there was the same amount of coefficients on each daily curve, and it was possible to run a statistical regression. DCOBS has shown grea<sup>t</sup> predictability in the short-term, and remained stable in the long-term.

In Sections 2–4, we present a brief introduction to the fundamental concepts of dynamic Nelson–Siegel models. In Section 5, we introduce the DCOBS model. Section 6 presents the dataset used for fitting and forecasting the US Daily Treasury Yield Curve Rates. In Section 7, we study the outputs from a time series of fitted yield curves. Finally, in Section 8, we finish the work pointing the conclusions we made.

The main contributions of this paper are:


#### **2. Term Structure of Interest Rates**

In this paper, interest rates are treated as a multidimensional variable that represents the return on investment expressed by three related quantities: spot rate, forward rate, and the discount value.

Each of these quantities depends on several economical, political, and social information, such as supply and demand of money and the expectation of its future value, risk, and trust perception, consequences of political acts, etc. The term structure of interest rates is a valuable tool not only for banks and financial firms, or governments and policy makers, but, for society itself, helping to understand the movements of markets and flows of money.

It is assumed that fixed income governmen<sup>t</sup> bonds can be considered risk-free so we can define a special type of yield that is the *spot interest rate*, *<sup>s</sup>*(*τ*). This function is the return of a fixed income zero-coupon risk-free bond that expires in *τ* periods. Today's price of such financial instrument whose future value is \$1.00, assuming that its interest rate is continuously compounded, is given by the *discount function*, *d*(*τ*), represented by

$$d(\pi) = \varepsilon^{-s(\pi)\times\pi}.\tag{1}$$

The relationship between the discount value and the spot rate can be recovered by

$$s(\tau) = -\frac{\log(d(\tau))}{\tau}.$$

Based on the available bonds in the market with different maturities, it is possible to plan at an instant a financial transaction that will take place in another future instant, starting at the maturity of the shorter bond and expiring at the maturity of the longer bond. The interest rate of this future transaction is called the *forward rate*.

Consider a forward contract traded at the present day at *τP* = 0. This contract arranges an investment in the future that starts at the settlement date at time *τ*. This investment will be kept until the maturity date, at time *τM* > *τ*. Then, the implied continuously compounded forward rate is related to the spot rate according to

$$f(\tau, \tau\_M) = \frac{s(\tau\_M) \times \tau\_M - s(\tau) \times \tau}{\tau\_M - \tau}.$$

The instantaneous forward rate or short rate *f*(*τ*) is defined by

$$f(\tau) = \lim\_{\tau\_M \to \tau} f(\tau, \tau\_M).$$

That is, the short rate *f*(*τ*) is the forward rate for a forward contract with an infinitesimal investment period after the settlement date. The forward rate can be seen as the marginal increase in the total return from a marginal increase in the length of the investment Svensson (1994). The spot rate *s*(*τ*) is defined by

$$s(\pi) = \frac{1}{\pi} \int\_0^\pi f(x) \, dx. \tag{2}$$

.

Note that the spot rate is the average of the instantaneous forward rates with settlement between the trade date 0 and the maturity date *τ*. From (1) and (2), the discount function and forward rate may be written as

$$d(\pi) = e^{-\int\_0^{\pi} f(x) \, dx}$$

and

$$f(\pi) = -\frac{d'(\pi)}{d(\pi)}.$$

*Yield curve* is a function of the interest rates of bonds that share the same properties except by their maturities. A yield curve of spot rates is called *term structure of interest rates* Cox et al. (1985).

Yield curves of coupon-bearing bonds are not equivalent to yield curves of zero-coupon bonds with same maturity dates Svensson (1994). Therefore, yield curves for coupon-bearing bonds should not be used as direct representations of the term structure of interest rates.

In the real world, the term structure of interest rates has a discrete representation. Using interpolation techniques, we can represent the term structure of interest rates in a continuous way. Such a continuous representation provides a valuable tool for calculating the spot rate at any given interval.

As pointed out by Diebold and Li (2003), the classical approaches to model the term structure of interest rates are equilibrium models and no-arbitrage models.

*Equilibrium models* Cox et al. (1985); Duffie and Kan (1996); Vasicek (1977) construct the term structure of interest rates from economic variables to model a stochastic process for the short rate dynamic. Then, spot rates can be obtained under risk premium assumptions, that is, considering what investors expect as an extra return relative to risk-free bonds.

On the other hand, *no-arbitrage models* focus on perfectly fitting the term structure of interest rate on observed market spot rates so that there is no arbitrage opportunity. A major contribution to no-arbitrage models was given by Hull and White (1990) and Heath et al. (1992).

In the work of Diebold and Li (2003), neither the equilibrium model nor the no-arbitrage model are used to model the term structure of interest rates. Instead, they use the Nelson and Siegel exponential components framework Nelson and Siegel (1987). They do so because they claim their model produces encouraging results for out-of-sample forecasting. In addition, at that time, little attention had been paid in the research of both no-arbitrage and equilibrium models regarding the dynamics and forecasting of interest rates.
