Chp3-2.mw

To the previous section  

 

Initialization 

> with(FixIncFun):
 

>
 

 

3.2 Smoothing of the Term Structure 

 

The term structure is a function r(t) from the time domain to the interest rate domain i.e., the argument of the function is a time and the value of the function is the spot interest rate at that time. A realistic market requires the knowledge of the discount factors and of the spot rates, not only for times one, two, and three, as in our examples, but for every possible t in some interval [0, T]. Sometimes the value of r(t) is required even for a time period which extends beyond the maximum maturity, time three in our example. The common practice in the marketplace is to use the knowledge of the spot rate of interest for the discrete points (1, 2, and 3 in our examples) and generate from these an estimation of a discount factor or a spot rate for each t in a certain time interval. This process is referred to as smoothing.  

 

In the scope of this book, we will give only an overview of these techniques.  The Appendix will explore these ideas further.  Since spot rates are recovered from discount factors, and vice versa, the smoothing can be done in terms of either spot rates or discount factors. Our discussion of smoothing will be with respect to discount factors. Equation (3.2) showed how one determines the discount factor from the spot rate and vice versa. 

 

The general form of smoothing techniques is based on the assumption that the discount factor for time t, d(t), is a function which can be approximated by some structure. Usually, the estimation of the discount factor, denoted below by is of the form 

d[es](t) = sum(`*`(alpha[i], `*`(f[i](t))), i = 0 .. K),                                       

 (3.5) 

 

where the f[i] are certain functions and the alpha[i], for i=1,...,K are numerical coefficients. Hence utilizing (3.5) implicitly assumes that the discount factor function can be written in such a form. The different smoothing techniques are based on choices of the approximating functions f[i], i = 0, () .. (), K.   

 

The first step is to choose the set of  `+`(K, 1)  functions f[0],..., f[K] . Next, an optimization problem is solved in order to uncover the values of the for i=0,...,K, such that the present value of the cash flow from bond i, `*`(sum(d[es](t), t = 1 .. T[i]), `*`(a[it])) where a[it] is the payment from bond i at time t, is as close as possible to P[i], the market price of bond i.  

 

To this end, one must choose how to measure the distance between the present value, calculated based on d[es], and the market price of the bond. Here again, methods differ from one another. Some selection criteria are based on the sum of squared differences and some on the sum of the absolute value of the differences.   

 

The procedure NarbitB is also capable of producing the smoothing. It uses the criteria of absolute values for measuring the distance. It is possible to think of, and display, the smoothing process as being done in two phases. In the first phase the discount factors for the discrete payment dates of the bonds are identified. In the second phase an optimization problem is solved. It uncovers the values of the for i=0,...,K, such that the value of the continuous curve d[es](t) is as close as possible to the value of the discount factors at the payment dates. Whenever this is possible, NarbitB will demonstrate it with a graph. The reader will find more information about these techniques and the specification of the functions  f[i](t) in the Appendix. 

 

Let us now examine an example of smoothing the discount factors. For simplicity we assume a market in which coupons are paid annually. Hence in NarbitB and its output, the time unit is a year. In order to accomplish this, we need to run the procedure NarbitB as before, but with the addition of two parameters.  We need to specify the number of approximating functions and the name which will be assigned to our new (smooth) discount factors function. This function is termed the continuous approximation of the discount factors. 

 

Suppose we would like to have six approximating functions (i.e., K=5), and we would like to call the continuous approximation ConApp.  We thus need to run NarbitB as demonstrated below. The output of the procedure also generates a graph.  This is illustrated in the Figure which appears directly following the output. (You can add a zero as a parameter at the end to suppress the graph of the discount factor, i.e., execute 'NarbitB([[105,0,0],[10,110,0],[8,8,108]],[94,97,85],6,ConApp,0);' instead of the below) 

 

> NarbitB([[105,0,0],[10,110,0],[8,8,108]],[94,97,85],6,ConApp);
 

 

 

 

 

 

 

 

 

 

`The no-arbitrage condition is satisfied. `
`The discount factor for time`, 1, `is given by`, `/`(94, 105)
`The interest rate spanning the time interval`, [0, 1], `is  given by`, .1170
`The discount factor for time`, 2, `is given by`, `/`(1849, 2310)
`The interest rate spanning the time interval`, [0, 2], `is  given by`, .2493
`The discount factor for time`, 3, `is given by`, `/`(82507, 124740)
`The interest rate spanning the time interval`, [0, 3], `is  given by`, .5119
`The function Vdis([c1,c2,..]), values the cashflow [c1,c2,..]`
`The continuous discount factor is given by the function`, 'ConApp', `(.)`
Plot_2d
 

>
 

 

The Figure above demonstrates the smoothing process. The (blue) boxes are the values of the discrete discount factors for the times at which the bonds are making coupon payments, or are repaying the face value. The continuous graph is the result of our approximation.  The function ConApp estimates the discount factor associated with every t in the interval [0, 3] and is being used Footnote 2 to value the cash flows payable at times other than 1, 2, or 3.  Hence, to calculate the present value of  $4 obtainable at time 1.75, we perform the following calculation: 

 

> ConApp(1.75)*4;
 

3.311229336
 

>
 

 

Similarly, to value the cash flow $4 at time 1.75, $4 at time 2.25, and $100 at time 2.75, we calculate 

 

> ConApp(1.75)*4+ConApp(2.25)*4+ConApp(2.75)*100;
 

74.55914878
 

 

In this last example, we see that the graph passes through the value of the discrete discount factors obtained directly from the market. In this case above, we manage to fit the  estimated discount factor function defined by equation (3.5) to coincide with the discrete factors obtained from the market. This, of course, is not always possible and will depend on the type and number of approximating functions chosen for the approximation. Suppose we attempt to do the same fitting with only three approximation functions. The resultant discount factor function is displayed below: 

 

> NarbitB([[105,0,0],[10,110,0],[8,8,108]],[94,97,85],3,ConApp1);
 

 

 

 

 

 

 

 

 

 

`The no-arbitrage condition is satisfied. `
`The discount factor for time`, 1, `is given by`, `/`(94, 105)
`The interest rate spanning the time interval`, [0, 1], `is  given by`, .1170
`The discount factor for time`, 2, `is given by`, `/`(1849, 2310)
`The interest rate spanning the time interval`, [0, 2], `is  given by`, .2493
`The discount factor for time`, 3, `is given by`, `/`(82507, 124740)
`The interest rate spanning the time interval`, [0, 3], `is  given by`, .5119
`The function Vdis([c1,c2,..]), values the cashflow [c1,c2,..]`
`The continuous discount factor is given by the function`, 'ConApp1', `(.)`
Plot_2d
 

>
 

 

It is now apparent from the Figure above that we do not have a perfect fit. The procedure NarbitB also defines a variable SumAbsDiv. It measures the "goodness-of-fit" in terms of the sum of the absolute deviations of the approximation from the actual observations. Thus, if the value of this variable is zero, the fit is perfect. The Appendix elaborates on this point. Each time NarbitB is run and a continuous approximation of the term structure is solved for, the variable SumAbsDiv is redefined. To check its value, issue the following command:  

 

> SumAbsDiv;
 

`/`(464839, 111363)
 

>
 

 

Sometimes a perfect fit is not possible and we have to make do with the best approximation possible.  In fact, the situation in real world markets is somewhat more complicated. Realistic markets are incomplete. That is, in realistic markets the number of bonds is smaller than the dates on which there are  payments from at least one outstanding bond. Therefore if the NA condition is satisfied, there will be multiple solutions for the set of discount factors. However, unlike the equity market, trading in the bond market is done via a set of dealers and not in a central market place. Consequently, the quotes of bond prices are with errors. These errors are due to the structure of the market and to non synchronization. Not all the bonds are traded at all times. Hence the observed prices of the bonds are prices of the last transactions and they may include prices of different times for different bonds. Consequently, even though theoretically there are no arbitrage opportunities, the NA is not satisfied by the observed prices. This however means that the set of equations solved in order to determine the discount factors or the term structure, is inconsistent. This is in spite of the fact that there are more equations than variables. Thus the term structure and or the discount factor function is estimated based on a second best solution concept (see the explanation in the Appendix). The NarbitB procedure is capable of handling such a situation. It will report that the NA is not satisfied and an an arbitrage portfolio. However, when graphing the discount factor, it will not show the discrete solution of the discount factor, as such do not exist. This is demonstrated in the example below.  

 

> NarbitB([[105,0,0],[10,110,0],[8,8,108]],[94,10,787],5,ConNNA);
 

 

 

 

 

 

 

 

 

 

 

`The no-arbitrage condition is not satisfied`
`An arbitrage portfolio is:`
Short, 1, `of Bond`, 1
Buy, `/`(881, 10), `of Bond`, 2
Short, 1, `of Bond`, 3
`The cost of this portfolio is zero`
`This portfolio produces income of`, 768, `at time`, 1
`This portfolio produces income of`, 9683, `at time`, 2
`This portfolio produces income of`, -108, `at time`, 3
`The continuous discount factor is given by the function`, 'ConNNA', `(.)`
Plot_2d
 

 

 

As mentioned before, once we have the continuous approximation of the discount factors, we can generate the continuous approximation of the term structure of interest rates.  Let us try an example using only five approximating functions.  

 

> NarbitB([[105,0,0],[10,110,0],[8,8,108]],[94,97,85],5,ConApp2);
 

 

 

 

 

 

 

 

 

 

`The no-arbitrage condition is satisfied. `
`The discount factor for time`, 1, `is given by`, `/`(94, 105)
`The interest rate spanning the time interval`, [0, 1], `is  given by`, .1170
`The discount factor for time`, 2, `is given by`, `/`(1849, 2310)
`The interest rate spanning the time interval`, [0, 2], `is  given by`, .2493
`The discount factor for time`, 3, `is given by`, `/`(82507, 124740)
`The interest rate spanning the time interval`, [0, 3], `is  given by`, .5119
`The function Vdis([c1,c2,..]), values the cashflow [c1,c2,..]`
`The continuous discount factor is given by the function`, 'ConApp2', `(.)`
Plot_2d
 

>
 

 

> SumAbsDiv;
 

0
 

>
 

 

As we see in this example, the value of SumAbsDiv is zero which means that a perfect fit was possible. Footnote 3. The relation between the discount factors, d(t) and the zero coupon curve, r(t), when the letters reported based on semi annual compounding is given by  

 

Thus given the value of denoted in our calculations by ConApp2(t), it is possible to solve for r(t). The command below solves for r(t) as a function of ConApp2(t) and defines the term structure function r(t). Specifically, the spot rate for time t, will be given by the function r(t) defined below: 

 

> solve(d(t) = (1/(1+(1/2)*r(t)))^(2*t),r(t));
 

`+`(`-`(`/`(`*`(2, `*`(`+`(exp(`+`(`/`(`*`(`/`(1, 2), `*`(ln(d(t)))), `*`(t)))), `-`(1)))), `*`(exp(`+`(`/`(`*`(`/`(1, 2), `*`(ln(d(t)))), `*`(t))))))))
 

> subs(d(t)=ConApp2(t),%):
 

>
 

> r:=unapply(%,t):
 

> simplify(r(t));
 

piecewise(`<`(t, 0), `+`(undefined, `*`(undefined, I)), `<=`(t, 3), `+`(`-`(2), `*`(2, `*`(exp(`+`(`-`(`/`(`*`(`/`(1, 2), `*`(`+`(`-`(`*`(4, `*`(ln(2)))), `-`(`*`(7, `*`(ln(3)))), `-`(ln(5)), `-`(ln(7...
 

> r(1);
 

`+`(`-`(`*`(`/`(1, 47), `*`(`+`(`*`(`/`(1, 105), `*`(`^`(9870, `/`(1, 2)))), `-`(1)), `*`(`^`(9870, `/`(1, 2)))))))
 

> r(2):
 

 

We can now plot this function and see how the spot rate in this market behaves. 

 

> plot(r(t),t=0..3,labels=[Time,`Rate`],thickness=2,title=`A Continuous Approximation of a Term Structure`,titlefont=[TIMES,BOLD,10]);
 

Plot_2d
 

>
 

 

The fact that the rates are reported on an annual basis allows us to compare the rates for different maturities. We see that the rates are decreasing as time increases and then, at about 1.5 years, the rates increase. Different shapes of the term structure are possible.  There are a few theories which explain the shape of the term structure of interest rates.  These theories are summarized in the Appendix.  

 

3.2.1 Smoothing and Continuous Compounding 

 

Given the discount factor for time t, d(t), (we will measure time in years henceforth), the continuously compounded rate r(t) is the solution to equation (3.7), 

 

d(t) = exp(`+`(`-`(`*`(r(t), `*`(t))))). 

(3.6) 

 

Hence  r(t) is given by  

 

r(t) = `+`(`-`(`/`(`*`(ln(d(t))), `*`(t)))). 

(3.7) 

 

Previously we calculated the discount factor function, ConApp2, when the units of time were measured in years.  Therefore, the continuous approximation of the term structure based on continuous compounding will be given by `+`(`-`(`/`(`*`(ln(ConApp2(t))), `*`(t)))). Let us define the function Ts to be the continuously compounded term structure in our example. 

 

> Ts:=unapply(-ln(ConApp2(t))/t,t);
 

proc (t) options operator, arrow; `+`(`-`(`/`(`*`(ln(piecewise(`and`(`<=`(0, t), `<=`(t, 3)), `+`(1, `-`(`*`(`/`(193, 1320), `*`(t))), `*`(`/`(105733, 3129840), `*`(`^`(t, 2))), `*`(`/`(1868729, 77463...
proc (t) options operator, arrow; `+`(`-`(`/`(`*`(ln(piecewise(`and`(`<=`(0, t), `<=`(t, 3)), `+`(1, `-`(`*`(`/`(193, 1320), `*`(t))), `*`(`/`(105733, 3129840), `*`(`^`(t, 2))), `*`(`/`(1868729, 77463...
proc (t) options operator, arrow; `+`(`-`(`/`(`*`(ln(piecewise(`and`(`<=`(0, t), `<=`(t, 3)), `+`(1, `-`(`*`(`/`(193, 1320), `*`(t))), `*`(`/`(105733, 3129840), `*`(`^`(t, 2))), `*`(`/`(1868729, 77463...
 

 

The graphs of the continuous approximation of the term structure based on semiannual compounding (the blue upper graph) and based on continuous compounding (the green lower graph), are plotted together in the Figure below.  

 

> plot([r(t),Ts(t)],t=0..3,color=[blue,green],thickness=2,labels=[ `Time in Years`,`Rate`],title=`Continuous Approximation of the Term Structure: Semiannual Compounding vs. Continuous Compounding`,titlefont=[TIMES,BOLD,8]);
 

Plot_2d
 

>
 

 

The discount for time t in terms of Ts is given by the expression  exp(`+`(`-`(`*`(Ts(t), `*`(t)))))  and is plotted in the Figure below.  Note that indeed the discount factor is a decreasing function for which the range is between zero and one -- as it should be. 

 

> plot(exp(-Ts(t)*t),t=0..3,color=[blue],thickness=2,labels=[ `Time in Years`,` Rate`],title=`The discount factor function implied by the term structure Ts.`,titlefont=[TIMES,BOLD,10]);
 

Plot_2d
 

>
 

 

Note that we have not discussed or specified the evolution of the term structure across time. Rather, our discussion has been devoted to the term structure or set of discount factors that prevail in the market at a certain point. It is as if we take a "snapshot" of bond prices in the market at a certain moment, and extract the term structure prevailing in the market at that time. As time passes, the term structure may, and usually does, change. Many valuation methods, as we will see later, require some specification of a model governing the evolution of the term structure. 

 

Yet, there are many instruments and types of cash flows that could be valued given only the current discount factor d(t). The rest of this Chapter is devoted to two such examples. Some other instruments of these types are valued in the next Chapters. Not surprisingly, most of the cash flows we are able to value in this manner (and their replicating strategies) are static. They do not require (optimal) actions in the future and the valued cash flows are fixed and known (not stochastic) as of the the current time. These cash flows do not include any random or stochastic components that depend on a realization of some future interest rates that are not known at the present time. There is, however, an exception to this rule and this is the cash flow valued in our second example in this Chapter. 

Footnotes 

Footnote 2 

By interpolation, it is possible to obtain an estimation for discount factors beyond t = 3 as well. To this end, one needs to specify the range to which the function should be extrapolated. This is done when a fifth parameter is added to the input. This added parameter can be either zero for surpassing the graph or one to produce the graph. The default value of this parameter is one. To produce the extrapolation, a sixth parameter must be added specifying the right end point of the range. However, in this case, the fifth parameter must be specified. Hence to extrapolate the example in the text for 6.5 years with the graph, one should run 

 

> NarbitB([[105,0,0],[10,110,0],[8,8,108]],[94,97,89],6,ConApp,1,6.5);
 

 

 

 

 

 

 

 

 

 

`The no-arbitrage condition is satisfied. `
`The discount factor for time`, 1, `is given by`, `/`(94, 105)
`The interest rate spanning the time interval`, [0, 1], `is  given by`, .1170
`The discount factor for time`, 2, `is given by`, `/`(1849, 2310)
`The interest rate spanning the time interval`, [0, 2], `is  given by`, .2493
`The discount factor for time`, 3, `is given by`, `/`(87127, 124740)
`The interest rate spanning the time interval`, [0, 3], `is  given by`, .4317
`The function Vdis([c1,c2,..]), values the cashflow [c1,c2,..]`
`The continuous discount factor is given by the function`, 'ConApp', `(.)`
Plot_2d
 

>
 

 

To produce the extrapolation without a graph one should run
 

> NarbitB([[105,0,0],[10,110,0],[8,8,108]],[94.5,97,89],6,ConApp,0,6.5);
 

 

 

 

 

 

 

 

 

`The no-arbitrage condition is satisfied. `
`The discount factor for time`, 1, `is given by`, .9000000000
`The interest rate spanning the time interval`, [0, 1], `is  given by`, .111
`The discount factor for time`, 2, `is given by`, .8000000000
`The interest rate spanning the time interval`, [0, 2], `is  given by`, .250
`The discount factor for time`, 3, `is given by`, .6981481481
`The interest rate spanning the time interval`, [0, 3], `is  given by`, .432
`The function Vdis([c1,c2,..]), values the cashflow [c1,c2,..]`
`The continuous discount factor is given by the function`, 'ConApp', `(.)`
 

>
 

back to text 

Footnote 3 

In certain cases multiple solutions exist for the approximation. Hence running the same procedure with the same parameters may result in a different answer. 

back to text 

To the next Section 

Back to table of contents.