# Interpolation and Extrapolation

In Table 2.4 we have shown the discount factors corresponding to some points in time for which we had market quotes and for some for which we have assumed market quotes. Since we are bound to need discount factors for all the points in between, how do we calculate them? There are many possible interpolation techniques. The simplest ones are linear interpolations of some kind that fall into two families, those that are linear in discount factors and those that are linear in rate.

If we need the discount factor Д. corresponding to the point in time *tk* such that, we can either interpolate linearly between discount

factors and have

or interpolate linearly between rates and have

where we have assumed continuous compounding of the zero rate. (Because of the way it is carried out, the above is sometimes called exponential interpolation.) Interpolation is important not only to discount cash flows that happen in between standard market point dates, but also for the generation of forward rates that, should we not interpolate, would look like the curve shown in Figure 2.9b. That curve, while correct, is of little use since it would lead to some very strange behavior when we go across one market point date and our rate jumps from two very different values.

To generate correct and smooth forward rates is crucial since an interest rate curve will be used for trading and hedging, where a correct index generation (let us remember what we said at the very beginning of this chapter about the two objectives of a curve construction process) is as important as a correct discounting. A solution to this problem is one where we combine bootstrapping and interpolation in one single process: this is what the most sophisticated curve construction systems do, but unfortunately, it cannot be done in a closed form. This is achieved by using cubic B-splines.

A cubic B-spline is a variation on the more general cubic spline (see de Boor [15] for a thorough treatment or Press et al. [72] for a more concise and yet clear introduction) and is a function *S(t)* made of a collection of bases (hence the “B-” in B-splines) functions such that

otherwise

and where each base function is a third-degree polynomial

*S(t)* will be used to interpolate a function *y(t)* of which we have some data points *y*t (i) while satisfying the following conditions:

┠*S(t)* will interpolate all data points

┠*S(t)* will be continuous in the interval [*t*1, *t*n]

┠both the first, , and the second, , derivatives of *S(t)* will be continuous in the interval [*t*1, *t*n]

We can apply the spline interpolation to our situation if we imagine that *y(t)* is the smooth index function *f (L*t*)* used to generate forward rates. This index function, which we defined at the very beginning of the chapter, is, for example, what we have called *f*t (*L*EUR) in Section 2.3 when discussing the curve construction of the EUR index curve. Of course, as we have shown when discussing tenor basis swaps, there is sometimes more than one index function (in the same section we mention and , here for simplicity we assume that we are trying to solve for one generic index function. The nature of this function will be determined only by the data points chosen, the principle behind its construction is the same.

We assume that there are some coefficients *f*k *(ks* represent the points in time we are trying to find rates for), such that our index function can be expressed as

In this framework, assuming continuous compounding, we would express the discount factors *D*_{T} as

(2.21)

and the forward rate *L*i,j would be expressed as

(2.22)

Let us assume that we have been given *M* market quotes (which could, for example, be made up of the FRAs and swap values shown in Table 2.4) with values . Let be the corresponding values found with our model, that is, using Equations 2.22 and 2.23. Our goal (see, for example, Waggoner [82]) is to minimize the expression

(2.23)

where the term Λ is a term added for extra smoothing, which can take several forms.^{[1]}

The bootstrap-cum-interpolation outlined above cannot be done, of course, in a closed form but needs some solver routine such as the Levenberg-Marquardt algorithm (Press et al. [72]). There are pros and cons to the two methodologies outlined above. The B-spline methodology gives a smooth outcome and potentially can take as inputs overlapping instruments (which we do not have in Table 2.4 but could happen, for example, in the form of overlapping FRAs). The downsides are that it is not trivial to implement and it is also slower. Moreover, because of the conditions on continuity and differentiability, spline interpolations tend to be nonlocal, that is, the output value at one point depends on many neighboring points. In this respect the B-spline, with its requirement that the base function be zero outside a certain interval is a considerable improvement over the general cubic spline interpolation. Closed-form bootstrapping is simple and fast to implement and will perfectly reprice the inputs; moreover, it will be more local in its sensitivity to change in input points. The disadvantage is that it produces a less smooth outcome and it is less flexible in the way it takes its inputs (e.g., it cannot take overlapping data points).

The greatest advantage of the spline methodology is that it can be extended to multiple curves. In the example above, although we have not shown it, we have presented how a spline bootstrap-cum-interpolation would work, but we have done so with what essentially amounts to a single leg approach: swap rates were used only after assuming that one leg could be ignored because it was equal to par. We have seen, however, in Section 2.3 with the introduction of tenor basis swaps and in Section 2.4 with the introduction of OIS discounting, that to correctly construct a curve we need to be able to include not only more than one leg, but more than one swap at a time.

This is what the more sophisticated financial institutions do to construct index and discount curves and it hinges on using multidimensional solvers, solvers that minimize more than one variable at a time, that is, that (try to) find the global minimum of a function of several variables. The discussion of this is beyond the practical nature of this section, which was simply to offer the tools to bootstrap a curve and build a fairly general and accurate interest rate curve using nothing more than a spreadsheet.

In the chapter About the Web Site we provide the link to a spreadsheet where we offer an implementation in VBA of a simple bootstrapping process like the one shown in this chapter.

- [1] When we have (2.24) with λ being a positive constant and the integral being over the entire time span of our interest rate curve, Λ is called
*Tikhonov regularizer.*