U.U.D.M. Project Report 2020:49

Interpolation of the

Gustaf Dehlbom

Examensarbete i matematik, 15 hp Handledare: Maciej Klimek Examinator: Veronica Crispin Quinonez September 2020

Department of Mathematics Uppsala University

Abstract In this thesis we study the yield curve and the properties of it. The thesis gives an introduction to what the yield curve is, the properties of it and the important financial concepts related to it. Furthermore, the monotone convex method is presented, a method specifically developed for finance. In particular how it works, what mathematical properties it focuses on and how it is used to construct the yield curve.

2 Contents

1 Introduction 5

2 Background 6 2.1 Bonds ...... 6 2.2 ...... 7 2.3 Yield curve ...... 7 2.3.1 Normal ...... 9 2.3.2 Inverted ...... 10 2.3.3 Flat ...... 11 2.4 Spot rate ...... 11 2.4.1 Zero- rate ...... 12 2.5 Discount factors ...... 12 2.6 Forward rates ...... 13 2.6.1 Useful properties of forward rates ...... 14 2.7 Bootstrapping ...... 14

3 The Monotone Convex Method 17 3.1 Interpolation of forward rates ...... 17 3.1.1 Calculating f0 ...... 18 3.1.2 Calculating fi ...... 19 3.1.3 Calculating fn ...... 20 3.2 Ensuring monotonicity ...... 22 3.2.1 Sector (i) ...... 25 3.2.2 Sector (ii) ...... 26 3.2.3 Sector (iii) ...... 27 3.2.4 Sector (iv) ...... 28 3.3 Modifying g ...... 28 3.3.1 Modifications of (ii) ...... 28 3.3.2 Modification of (iii) ...... 30 3.3.3 Modification of (iv) ...... 31 3.4 Ensuring positivity ...... 32 3.4.1 Collaring f ...... 34 3.5 Summary ...... 35

3 4 Example 35 4.1 Bootstrapping our yield curve ...... 36 4.2 Enforcing monotonicity ...... 37 4.3 Defining the interpolation function ...... 39 4.4 Recovering the risk free rate function ...... 39

5 Conclusions 40

4 1 Introduction

The yield curve is the term structure of interest rates and is defined as the relationship between the maturity of a zero-coupon and the yield to ma- turity. This plot has a wide range of uses within the financial market where the main purpose consists of valuating various bonds, something that will de- scribe later in this thesis. When constructing the yield curve we begin with a set of discrete data points or financial instruments which we are looking to interpolate. This can however be done in many different ways, especially in regard to what financial instrument we use [10]. It is therefore interesting to look at one of the popular methods and see what makes it beneficial and how.

Most of the popular interpolation algorithms are not developed for finance and this can cause problems. If we for example plot a yield curve using a linear interpolation to compare different bonds it can be problematic. It does not necessarily mean that it is a bad method, it would however be a poor representation of the financial market because of how dynamic and stochastic it is [8]. In addition it could create an opportunity.

An arbitrage opportunity is a type of risk-free investment that can occur if e.g. there is a temporary price difference between similar financial instru- ments. It means that an arbitrageur can make profits without having to risk his or her own money. An illustrative example of this would be if the govern- ment is purchasing gold at the price x whilst a mining company is selling at the price y where y < x. An arbitrageur can then simultaneously purchase at a price y and sell at the price x for an immediate profit of x−y. Arbitrage can happen in various ways, especially when constructing new data points, which is why a good method for constructing a yield curve should prevent this.

Since the yield curve can be constructed with different algorithms, with many of them being intended for engineering or physics [4], it is interesting to look at a popular method developed for the financial market. This article will study the monotone convex method for constructing the yield curve.

5 2 Background

2.1 Bonds A bond is a type of obligation usually issued by the government or large corporations. The basic principle of a bond is that an investor lends money to e.g. one of the above mentioned. The bond has a face value F which is the amount of money the bond pays at the date of maturity. A bond usually has coupon payments C which is annual payments to the investor consisting of a percentage of the face value. The coupon payments can also be divided up in coupon periods m during the year which then would pay C out m at each m in time. If we for example look at a 10% coupon bond with a face value of 500$. The coupon bond will yield the value of 50$ per year [8].

A bond without coupons is called a zero-coupon bond. The difference com- pared to a regular coupon bond is that the zero-coupon bond has no periodic coupon payments which means that the investor solely buys the face value of the bond.

Bonds are categorized into different ratings which shows the risk of the investment. In USA there are primarily two companies that post these ratings, Moody’s and Standard & Poor’s. The ratings is classified as: Grade Standard & Poor’s Moody’s High grade AAA Aaa AA Aa Medium grade A A BBB Baa Speculative grade BB Ba B B Default danger CCC Caa CC Ca C C D

Table 1: Bond rating classification [8, p. 52]

As seen in the table above the bonds rates are quite similar in their notations

6 from triple-A (AAA) to C or D. The grades provide a reflection of the in- vestment security and cost of bonds. Higher rated bonds will be more secure to invest in but will also have lower yield. David Luenberger (1998) denotes the high and medium grades as investment grade and the speculative grades and lower as junk bonds. From now on this article will use the notations of Standard’s and Poor’s. [8]

2.2 Yield to maturity When investing in bonds, yield to maturity (YTM) is used to calculate the rate of return of the bonds current price P [8, p. 52]. As previously mentioned a bond can either consist of coupons being paid annually over m periods or with the face value as the only cash flow (zero-coupon). Regardless of what bond it is, the interest on all of the cash flows should be equal to the bonds current price.

We can look at this as a compounded interest. If we purchase a 10–year coupon bond and hold it until maturity. The simple interest of this would be to add all the stream of payments and divide it with the current price. This will however not account for the embedded interest rates from the cash flows, or perhaps more commonly known as interest on interest. Thus when calculating the YTM, it is assumed that each cash flow is reinvested at the current interest rate.

The following formula can be used to calculate the YTM from a bond with face value F , coupon payments C, m number of coupon payments and n remaining payments:  F C 1 ! P − = YTM n + 1 YTM n (1) [1 + m ] YTM [1 + m ]

2.3 Yield curve A yield curve is a plot depicting yield as a function of time to maturity. When looking at the yield curve for the highest rated zero-coupon bonds it is denoted as the term structure of interest rates. The most important usage for the yield curve is to evaluate the . If we revisit table 1 and consider an AAA-rated bond. There exists a yield curve associated

7 with this bonds quality which in turn can be used to evaluate and compare it to other AAA-rated bonds [8]. For instance if you find a 30 year bond on the secondary market that has F = 1000$ and C = 2%. Since the bond was issued the interest rates has increased and the market now offers similar 30-year bonds but with C = 3%. It would thus be valued at a lower price compared to the similar bonds at present date.

It is not only the present market investors want to evaluate. The yield curve also gives a good indication of what will happen in the future. As later will be explained the yield curve can have different shapes which indicates what the future market will look like [3]. An example of this is predicting future recessions. There is a clear correlation between the shape of the curve and recessions, which can be shown empirically. For instance if a government wants to slow down the economy because they anticipate a recession they will flatten the yield curve [1]. A good example of this would be to look at the yield curves issued by the US Treasury before, during and after the financial crisis 2008.

In the next three subsections, the three most common shapes of the yield curve will be outlined. There are three types of shapes generally discussed when analyzing a yield curve, normal, inverted or flat.

8 2.3.1 Normal The normal shape is a gradually rising curve and the most common of the three. It can be summarized with the short term rates being lower and long term rates higher. It is typically a sign of a growing economy.

Figure 1: a normal yield curve

9 2.3.2 Inverted The inverted yield curve occur when the short-term bonds have higher yields than long term. Luenberger explains this as an occurrence when the short- term yields increase rapidly and investors interpret this as a temporary raise which results in the long-term rates staying the same [8].

Figure 2: an inverted yield curve

10 2.3.3 Flat A flat yield curve has a small or no difference between the short term and long term rates. It is most commonly looked at as a transition between a normal and inverted shaped yield curve. It could also be looked as an indication that the market for long term bonds is less desirable [2].

Figure 3: a flat yield curve

2.4 Spot rate

The spot rate st is defined as the rate of interest for e.g. assets or money, that are held from t = 0 to t. In simpler terms it can be explained as the rate of return from a single cash-flow invested at present time [3]. The spot rate is based of the current market value which is heavenly influenced by supply and demand. It can therefore vary on a daily basis. The spot rates can be calculated using the three following compounding conventions for yearly, m periods or continuously [8, p. 74].

• Spot rates compounded yearly

t (1 + st) (2)

11 • Spot rates compounded m periods per year st (1 + )mt where mt ∈ (3) m Z • Continuously compounded spot rates estt (4)

2.4.1 Zero-coupon rate A similar term called zero-coupon rate or zero rate is often used synony- mously with the spot rate [3]. The zero-coupon rate is instead used when we are looking at zero-coupon bonds. These rates can be extracted from a method called bootstrapping, which will be described later in this article. When these rates have been extracted we can plot them as a function of maturity to get a type of yield curve called the zero curve [5]. Thus, it can be used to price arbitrary cash-flows from zero-coupon bonds. When looking at the zero-coupon bond of the highest quality where the investor does not risk any capital by investing, the rates is instead referred to as risk free rates.

2.5 Discount factors When we are looking at the spot rates we are looking at future values of e.g. assets. The discount factor dt converts future cash-flows to its correspond- ing value at present date. It is thus a way to determine the cash-flows that occurs in a certain point in the future and how it should be discounted back to present date. For the same compounding conventions as spot rates, the discount factor can be calculated with the three following formulas [8, p. 75]:

• Yearly compounding 1 dk = k (5) (1 + sk) • Compounding m periods 1 d k = sk mk (6) (1 + m ) • Continuous compounding

−stt dt = e (7)

12 2.6 Forward rates Forward rates is the rate of interest that occurs at two future dates but being agreed upon at the present date. It is defined as:

Definition 1. The forward rate between times t1 and t2 with t1 < t2 is denoted by ft1t2 . It is the rate of interest charged for borrowing money at time t1 which is to be repaid (with interest) at time t2. [8, p. 79] While spot rate is the interest rate at the present date forward rates is in- stead used to predict the future interest rates. To visualize we can look at an example from Luenbergers investment science [8, p. 77].

If you store money at a 2–year period with known spot rates s1 and s2. Per 2 (2) this be equal to (1 + s2) at maturity. Alternatively if we wanted to borrow money for a 2–year period with s1 for the first year and a forward rate f between year 1 and 2. This would be (1 + s1)(1 + f). If we invest the same amount of money with these models, we should have an equality i.e. 2 (1 + s2) = (1 + s1)(1 + f). If we had an inequality, we would instead have an arbitrage opportunity were we could borrow from e.g. the second method 2 and reinvest it in the first method for a profit of (1 + s1)(1 + f) − (1 + s2) . If we use the equality and derive it we get:

2 2 2 (1 + s2) (1 + s2) (1 + s2) = (1 + s1)(1 + f) ⇐⇒ (1 + f) = ⇐⇒ f = − 1 (1 + s1) (1 + s1) We can thus conclude that the forward rates derives from the two spot rates. This can in turn be used to determine spot rates for example zero-coupon bonds.

Forward rates can also be seen as a hedging tool (a way to secure invest- ments)[3]. For example if a company wants to buy a product and the trans- action is going to happen at the future date t1. The company could then agree on a forward rate close to the current spot rate s1 at t = 0 (present date). This is a way to secure a purchase or investment. As previously men- tioned the market can change due to supply and demand which could make it advantageous or disadvantageous for both parties involved.

Compounded forward rates for time i < j is defined as [8, p. 70–80 ]:

13 • Yearly compounding

1 j ! (j−i) (1 + sj) fi,j = i − 1 (8) (1 + si)

• Compounding m periods

1 sj ! (1 + )j (j−i) f m · m − m i,j = si i (9) (1 + m )

• Continuous compounding

st2 t2 − st1 t1 fi,j = (10) t2 − t1

2.6.1 Useful properties of forward rates Forward rates has useful properties that is advantageous to use when you do not have enough data to make a good estimation. From the forward rates we can extract the risk free rates. This is an important feature that will be used in the chosen method for this article. Two of the important properties is as follows.

The average of the instantaneous forward rate over any interval [ti−1, ti] is d equal to the discrete forward rate fi , for that interval. So

Z ti d riti − ri−1ti−1 1 fi = = f(t)dt (11) ti − ti−1 ti − ti−1 ti−1 Given the forward function f(s) we can obtain the risk free rate function r(t) by Z t r(t)t = ri−1ti−1 + f(s)ds where t ∈ [ti−1, ti] (12) ti−1

2.7 Bootstrapping When constructing yield curves for zero-coupon bonds there are generally not enough data points to make a good estimation for the plot. Bootstrapping is the process of extracting zero rates by calculating the discount factors of

14 several bonds of equal rating [5]. This is done for all the different cash-flow streams. To concretize this we can look at an example with five different bonds of different maturities. The coupon payments are done semi-annually i.e. every 6 months, and are being continuously compounded using (7).

Face value Time to matu- Coupon Price) rity (Years) $100 0.5 0% $97.5 $100 1 5% $98.0 $100 1.5 5% $101.2 $100 2 7% $108.1 $100 2.5 10% $115.3

Table 2: Bootstrapping example [5, p. 82]

The first bond which is a zero-coupon bond is the easiest to derive. We have one cash-flow happening at t = 0.5 and we denote this d(0, 0.5) = er0,0.5 97.5 97.5 = d(0, 0.5) · 100 ⇔ e−0.5r(0,0.5) = 100 In this step we replace our d(0, 0.5) to (7) for the continuously compounded discount factor and proceed by logarithmyzing the equation.

−0.5r0,0.5 ⇔ ln e = ln 0.975 ⇔ −0.5r0,0.5 = ln 0.975

ln 0.975 ⇔ r0,0.5 = = 0.05 (13) −0.5 Thus giving us the zero rate of the first bond which is 5%. We can use this rate r(0,0.5) to calculate r(0,1) which is our second bond. The bond has two payments at 6 months and at maturity which gives us the equation.

98 − 5e−0.0071 98 = 5e−0.5 + e−r · 100 ⇔ e−r = 100 Logarithmyzing as in (13) gives us the final answer.

r(0,1) = 0.072

15 Using the same formula, we can calculate for the remaining bonds (3, 4 and 5). We ultimately end up with the following table of our discrete set of data points:

Maturity Zero rate 0.5 5% 1 7.2% 1.5 8.9% 2 9.4% 2.5 13.6%

Table 3: Bootstrapping example [5, p. 82]

16 3 The Monotone Convex Method

The monotone convex method is a method developed by Patrick S. Hagan and Graeme West [4]. The method is based of the work of James M. Hyman’s Accurate Monotonicity Preserving Cubic Interpolation method [6] with the distinction that their method was developed for interpolation of the yield curve. Hagan and discuss Hymans method among others which typically are used as interpolation algorithms within engineering or physics. Hagan and West believe that this can be problematic since there is no way of ensuring positive and continuous forward rates which are two important properties. Negative forward rates would imply that there exists arbitrage opportunities and as J McCulloch and Levis Kochin describe it:

”a discountinuous forward curve implies either implausible ex- pectations about future short-term interest rates, or implausible expectations about holding period returns”. [7]

3.1 Interpolation of forward rates To begin the interpolation of the yield curve we need a set of instantaneous forward rates fi for i = 1, 2, . . . , n. These rates are rarely available from the bond market. We can, on the other hand, estimate these values in a similar manner to the bootstrapping method.

Recall (10), our set of discrete forward rates with interest rates r1, r2, . . . , rn for periods τ1, τ2, . . . , τn is defined as

d riτi − ri−1τi−1 fi = for 1 ≤ i ≤ n where r0 = 0 (14) τi − τi−1

d Instead of modeling fi to be the instantaneous forward rate at t1 we assign it to the midpoint of a generic interval [τi−1, τi]. We then model our instan- taneous forward rate f(τ) = fi at τi, as the slope of a quadratic function that passes through the midpoints of the interval. We choose the end points, 0 0 namely f(0) = f0 and f(τn) = fn, such that f (0) = 0 = f (τn). We end up with three different formulas for f0, fi and fn as follows.

17 3.1.1 Calculating f0

In any interval [τi, τi−1] we look for a quadratic f. So for some constants K, L, M

2 τ − τi−1 f(τ) = K + Lx(τ) + Mx (τ) where x(τ) = and τ ∈ [τ, τi−1] τi − τi−1

In this case we have i = 1 so τ0 = 0. We then have

τ τ 2 f(τ) = K + L + M( ) where τ ∈ [0, τ1] τ1 τ1

0 L 2Mτ f (τ) = + 2 τ1 τ1

We can see that since f(0) = f0 it follows that K = f0. We also have f 0(0) = 0, it follows that L = 0 since f 0(0) = L . Therefore τ1 τ 2 f(τ) = f0 + M 2 τi

Since f(τ1) = f1 we get 2 τ1 f(τ) = f0 + M 2 τ1 so f0 + M = f1 ⇔ M = f1 − f0. We conclude that τ 2 f(τ) = f0 + (f1 − f0) 2 τ1 The integral average condition, as in (11), says that ! Z τ1 2 d 1 τ1 f1 − f0 fi = · f0 + M 2 dτ = f0 + τ1 0 τ1 3 so we have

d f1 − f0 2 d f1 f = f0 + ⇔ f0 = f + 1 3 3 1 3 3 d 1 d 1 d f0 = f + f1 ⇔ f0 = f − (f1 − f ) 2 1 2 1 2 1

18 Finally

d 1 d f0 = f − (f1 − f ) 1 2 1 as required.

3.1.2 Calculating fi fi can be viewed geometrically

Figure 4: fi

We can see the proportion

d fi+1 − fi τi+1 − τi d = fi − fi τi − τi−1

19 This equality can be derived as follows

d d (fi+1 − fi)(τi − τi−1) = (fi − fi )(τi+1 − τi) ⇔

d d ⇔ fi+1(τi − τi−1) − fi(τi − τi−1) = (fi(τi+1 − τi) − fi (τi+1 − τi) ⇔

d d ⇔ fi(τi+1 − τi + τi − τi−1) = fi+1(τi − τi−1) + fi+1(τi+1 − τi) ⇔

ti − ti−1 d ti+1 − ti d ⇔ fi = fi+1 + fi ti+1 − ti−1 ti+1 − ti−1

3.1.3 Calculating fn

In any interval [τi−1, τi] we look for a quadratic f. For some constants K, L, M we get f(τ) = K + L · x(τ) + M · x2(τ) for x(τ) = τ−τn−1 over the interval τn−τn−1 [τi−1, τi]. In this case i = n so we get

2 τ − τn−1 (τ − τn−1) f(τ) = K + L · + M · 2 τn − τn−1 (τn − τn−1)

0 L 2M(τ − τn−1) f (τ) = + 2 τ − τn−1 (τn − τn−1)

Since f(τn−1) = fn−1 it follows that

f(τn−1) = K =⇒ K = fn−1

0 Since f (τn) = 0 it follows that

0 L 2M(τn − τn−1) 2M + L f (τn) = + 2 = τn − τn−1 (τn − τn−1) τn − τn−1 this is true for when 2M + L = 0 ⇔ L = −2M

Lastly we have the condition that f(τn) = fn. So f(τn) = fn−1 − 2M + M = fn. Thus we can conclude that M = fn−1 − fn. This gives us

2 2(fn−1 − fn)(τ − τn−1) (fn−1 − fn)(τ − τn−1) f(τ) = fn−1 − + 2 τn − τn−1 (τn − τn−1)

20 The integral average condition as in (11), says that

Z τn d 1 fn = · (f(τ)dτ τn − τn−1 τn−1 Inserting f(τ) we get

τ 2 ! 1 Z n 2M(fn−1 − fn)(τ − τn−1 (fn−1 − fn)(τ − τn−1) · fn−1 − + 2 dτ = τn − τn−1 τn−1 τn − τn−1 (τn − τn−1) 1 2 = (fn−1 − fn) + fn 3 3 Thus we have

d 1 2 2 d 1 3 d 1 f = fn−1 + fn ⇔ fn = f − fn−1 ⇔ fn = f − fn−1 n 3 3 3 n 3 2 n 2 Which finally results in

d 1 d fn = f − (fn−1 − f ) n 2 n as required.

In summary, we end up with the following three formulas for calculating the instantaneous forward rates:

d 1 d f0 = f − (f1 − f ) (15) 1 2 1 τi − τi−1 d τi+1 − τi d fi = fi+1 + fi , for i = 1, 2, . . . , n − 1 (16) τi+1 − τi−1 τi+1 − τi−1 d 1 d fn = f − (fn−1 − f ) (17) n 2 n The next step for the method is to define our interpolation function f on [0, τn] that need to satisfy the following five conditions:

(i) The integral average condition as in (11) holds

(ii) f(τ) is positive

(iii) f(τ) is continuous

21 d d d (iv) If fi−1 < fi < fi+1 then f(τ) is increasing on [τi−1, τi].

d d d (v) If fi−1 > fi > fi+1 then f(τ) is decreasing on [τi−1, τi]. [4, p. 75]

The goal will be to construct (15), (16) and (17). We will then modify our fi so that the five conditions is satisfied. Then we will insert a piecewise quadratic g and modify it, which will be covered in the following section. This gives us the resulting interpolation function ! τ − τi−1 d d f(τ) = g + fi = g(x) + fi (18) τi − τi−1

Our choice for fi is at this stage preliminary. Later in the algorithm we can modify fi to ensure positivity.

3.2 Ensuring monotonicity To analyse the monotonicity of our interpolation function f(τ) we seek a function gi defined on [0, 1] corresponding to the interval [τi−1, τi]. Since this process is repeated for each gi on the interval [τi−1, τi] we simply denote it g. This is defined as:

  d g(x) = f τi−1 + (τi − τi−1)x − fi (19) for x ∈ [0, 1] corresponding to the interval [τi−1, τi]. From g(x) we can see that we have three conditions:

d 1. g(0) = fi−1 − fi

d 2. g(1) = fi − fi R 1 3. 0 g(x)dx = 0

We then look for a quadratic g in the interval [0, 1]. So for some constants K, L, M we have: g(x) = K + Lx + Mx2 Using the integral average formula we get

1 Z 1 Z 1 " x2 x3 # 1 1 0 = g(x)dx = (K+Lx+Mx2)dx = Kx+ L+ M = K+ L+ M 0 0 2 3 0 2 3

22 We know g(0) = K and g(1) = K + L + M, which we can use to put it in matrix form as follows

1 0 0 K  g(0)       1 1 1 ·  L  = g(1) 1 1 1 2 3 M 0 Therefore     1 0 0 g(0) (−1) (−1) 1 0 0 g(0)   +   + 1 1 1 g(1) ←− ∼ 0 1 1 g(1) − g(0) ←− ∼ 1 1 1 1 + (−2) 1 2 3 0 ←−−−−− 0 2 3 −g(0)

1 0 0 g(0)  1 0 0 g(0)   1  (−1)  1  0 0 3 g(1) + g(0) ∼ 0 0 3 g(1) + g(0) ←− ∼ 1 1 + 1 0 2 3 −g(0) ←− 0 2 0 −g(0) ←−

1 0 0 g(0)  1 0 0 g(0)   1    0 2 0 −g(0)  | · (2) ∼ 0 1 0 −2g(0)  1 0 0 3 g(1) + g(0) | · (3) 0 0 1 3(g(1) + g(0))

Thus, we have K = g(0), L = −4g(0) − 2g(1) and M = 3g(0) + 3g(1) which gives us g(x) = g(0) − 4g(0)x − 2g(1)x + 3g(0)x2 + 3g(1)x2 which finally derives to

g(x) = g(0) · (1 − 4x + 3x2) + g(1) · (−2x + 3x2) (20) g0(x) = g(0) · (−4x + 6x) + g(1) · (−2 + 6x) (21)

If we revisit the conditions from the previous section and look at condition (iv) and (v). This is equivalent to g(0) and g(1) being of opposite signs. Since the proofs for the two conditions is done in a similar manner, I will only provide one. For

d d d 1. fi−1 < fi < fi+1

d 2. fi−1 < fi < fi

23 3. g(0) < 0 and g(1) > 0 it follows that

d d d d fi−1 < fi < fi+1 ⇔ fi−1 < fi < fi ⇔ g(0) < 0 and g(1) > 0

To show that this is true we begin by looking at 1 and 2

d d d • fi is a convex combination of fi and fi+1 =⇒ fi is between fi and fi+1.

d d d • fi−1 is a convex combination of fi−1 and fi =⇒ fi−1 is between fi−1 d and fi

2 must then be true under the assumption that 1 is true i.e 1 =⇒ 2. We can then solve for 2 =⇒ 1.

d d d • Since fi is between fi and fi+1, and we assumed that fi > fi , it follows d d that fi < fi+1

d d d • Since fi−1 is between fi−1 and fi , and we assumed that fi−1 < fi , it d d follows that fi−1 < fi 1 must then be true under the assumption that 2 is true i.e. 2 =⇒ 1. So d d we have 1 ⇔ 2. Since g(0) = fi−1 − fi and g(1) = fi − fi we can conclude that 2 ⇔ 3.

Since g is a quadratic function we can look at the cases where g0(0) = 0 and, respectively g0(1) = 0, to analyze the monotonicity of g(x) at x ∈ [0, 1]. 1 These equalities correspond to g(1) = −2g(0) and respectively g(1) = − 2 g(0) and divide the g(0)/g(1) plane into 8 sectors demonstrated in figure 4.

24 g(1) g(1) = −2g(0) 1 g(1) = − 2 g(0) (i) (ii) (iv)

(iii) g(0) C (iii)

(iv) (ii) (i) B

D A

Figure 5: Possible outcomes for g

We divide the graph into four different sectors that will be checked for mono- tonicity and adjusted if not. To ease the reader the first case will be located in the first and second quadrant and the second case in the third and fourth.

3.2.1 Sector (i) Case I For the first case we can see g(0) < 0 and g(1) > 0. We also have 1 g(1) > − g(0) ⇔ 2g(1) + g(0) > 0 2 g(1) < −2g(0) ⇔ g(1) + 2g(0) < 0 If we look at (21) for g0(0) and g0(1) with regards to the boundaries above we get

g0(0) = −4g(0) − 2g(1) = −2(g(1) + 2g(0)) > 0 g0(1) = 2g(0) + 4g(1) = 2(2g(1) + g(0)) > 0

25 Thus, g(x) is monotone in the first case of sector of (i). We move on to the next case.

Case II For the second case we can see g(0) > 0 and g(1) < 0. We also have 1 g(1) < − g(0) ⇔ 2g(1) + g(0) < 0 2 g(1) > −2g(0) ⇔ g(1) + 2g(0) > 0

If we look at (21) for g0(0) and g0(1) with regards to the boundaries above we get

g0(0) = −4g(0) − 2g(1) = −2(g(1) + 2g(0)) < 0 g0(1) = 2g(0) + 4g(1) = 2(2g(1) + g(0)) < 0

We can now conclude that g is monotone in the sectors (i) since g(0) and g(1) are of opposite signs and g0(0) and g0(1) are of the same sign. Furthermore when inserting the boundaries the function g will reduce to

g(x) = g(0)(1 − 3x2) on the boundary A (22) 3 g(x) = g(0)(1 − 3x + x2) on the boundary B (23) 2

3.2.2 Sector (ii) Case I For the first case we can see g(0) < 0 and g(1) > 0. We also have 1 g(1) > − g(0) ⇔ 2g(1) + g(0) > 0 2 g(1) > −2g(0) ⇔ g(1) + 2g(0) > 0

We know from case I in (i) that g0(1) > 0 and proceed by looking at g0(0)

g0(0) = −4g(0) − 2g(1) = −2(g(1) + 2g(0)) < 0

26 Case II For the second case we can see g(0) > 0 and g(1) < 0. We also have 1 g(1) < − g(0) ⇔ 2g(1) + g(0) < 0 2 g(1) < −2g(0) ⇔ g(1) + 2g(0) < 0

We know from case II in (i) that g0(1) < 0 and proceed by looking at g0(0)

g0(0) = −4g(0) − 2g(1) = −2(g(1) + 2g(0)) > 0

In the second sectors g(0) and g(1) are of opposite signs, but so are g0(0) and g0(1). Meaning that g is both increasing and decreasing. g is thus not monotone but can be modified to. It also has to agree on boundary A i.e. reducing to the same g(x) as in (i), for our interpolation function to be continuous.

3.2.3 Sector (iii) Case I For the first case we can see g(0) < 0 and g(1) > 0. We also have 1 g(1) < − g(0) ⇔ 2g(1) + g(0) < 0 2 g(1) < −2g(0) ⇔ g(1) + 2g(0) < 0

We know from case I in (i) that g0(0) > 0 and proceed by looking at g0(1)

g0(1) = 2g(0) + 4g(1) = 2(2g(1) + g(0)) < 0

Case II For the second case we can see g(0) > 0 and g(1) < 0. We also have

1 g(1) > − g(0) ⇔ 2g(1) + g(0) > 0 2 g(1) > −2g(0) ⇔ g(1) + 2g(0) > 0

27 We know from Case II in (i) that g0(0) < 0 and proceed by looking at g0(1)

g0(1) = 2g(0) + 4g(1) = 2(2g(1) + g(0)) > 0

This is the same situation as in sector (ii) meaning g is currently not mono- tone but can be modified to be. Here g instead has to reduce to the same g(x) as (i) for boundary B.

3.2.4 Sector (iv) We can instantly see that g(0) and g(1) are of the same sign in both of the sectors which by the requirement means that g is not monotone in (iv). Looking at the derivatives in sectors (4)

Case I Since the boundaries is the same as Case I in (i) we have

g0(0) < 0 g0(1) > 0

Case II Since the boundaries is the same as Case II in (i) we have

g0(0) > 0 g0(1) < 0

Modifications is also needed in sectors (4) for g to be monotone. We want g(x) to reduce to the same form as in (ii) as we approach C and to the same form as (iii) as we approach D.

3.3 Modifying g 3.3.1 Modifications of (ii) We seek to modify g(x) in sectors (ii) for it to be monotone. To achieve this R 1 we insert a flat segment. We choose a parameter η such that 0 g(x) = 0 is satisfied. And as η → 0 g(x) reduces to g(x) = g(0)(1 − 3x2).

28 A proposal for this function is  g(0) for 0 ≤ x ≤ η g(x) = x−η 2 (24) g(0) + (g(1) − g(0))( 1−η ) for η < x ≤ 1 Note that the proposed solution consists of a fragment of a constant function joined together by a fragment of a parabola to ensure monotonicity.

To solve for η we start by solving for each of the functions

1. Z η g(0)dx = g(0) · η 0 2. Z 1  x − η  g(0) + (g(1) − g(0))( )2 dx = η 1 − η h i1 h (η − x)3 i1 = g(0)x + (g(0) + g(1)) · − = η 3(n − 1)2 η 1 − η = g(0)(1 − η) + (g(1) − g(0))( ) 3

It follows Z 1 1 − η 0 = g(x)dx = g(0) + g(0)(1 − η) + (g(1) − g(0))( ) = 0 3 g(1) − ηg(1) ηg(0) − g(0) = g(0) + + = 3 3

η(g(0) − g(1)) + g(1) + 2g(0) = 3 This will be equal to zero when g(0) + 2g(0) η(g(0) − g(1)) = −g(1) − 2g(0) ⇔ η = − g(0) − g(1) which we can rewrite as 3g(0) 3g(0) g(1) − g(0) + 3g(0) η = 1 − = 1 + = g(0) − g(1) g(1) − g(0) g(1) − g(0)

29 Thus, we have g(1) + 2g(0) η = (25) g(1) − g(0) which satisfies our first requirement. When η → 0 we get g(1)+2g(0) = 0 ⇔ g(1) = −2g(0) as required.

3.3.2 Modification of (iii) We do the same process for sectors (iii) but instead with the requirement 3 2 that g reduces to g(x) = g(0)(1 − 4x + 2 x ) at boundary B as η → 1. A proposal for this function is

 η−x g(0) + (g(1) − g(0))( )2 for 0 < x < η g(x) = η (26) g(1) for η ≤ x < 1

We can now solve for η from the different cases

1.

Z η " 3 2 #η η − x 2 x x (g(0) + (g(1) − g(0))( ) )dx = g(1)η + (g(0) − g(1)) 2 − − x = o η 3η n 0 η = g(1)η + (g(1) − g(0))( ) 3

2. Z 1 g(1)dx = (1 − η)g(1) η

It follows Z 1 g(0)η − g(1)η g(x)dx = (1 − η)g(1) + g(1)η + = 0 3 3g(1) + η(g(0) − g(1)) = 3 This is equal to zero when

3g(1) 3g(1) η(g(0) − g(1)) = −3g(1) ⇔ η = − = g(0) − g(1) g(1) − g(0)

30 We then have 3g(1) η = (27) g(1) − g(0) so our first requirement is fine. As η → 1 we get 3g(1) 1 = 1 ⇔ 3g(1) = g(1) − g(0) ⇔ g(1) = − g(0) g(1) − g(0) 2

Thus g(x) will reduce to (23) as we approach B as required.

3.3.3 Modification of (iv) For the last sectors we want to modify g(x) so it reduces to (22) as we approach C and (23) as we approach D. A proposal for this function is

 η−x α + (g(0) − α)( )2 for 0 < x < η g x η ( ) = x−η 2 (28) α + (g(1) − α)( 1−η ) for η ≤ x < 1 for some constants α, η. We again solve for the two different cases 1. Z η η − x η (α + (g(0) − α)( )2)dx = αη + (g(0) − α)( ) 0 η 3 2. Z 1 x − η 1 − η (α + (g(1) − α)( )2)dx = α(1 − η) + (g(1) − g(0))( ) η 1 − η 3

It follows Z 1 η 1 − η g(x) = αη + (g(0) − α)( + α(1 − η) + (g(1) − g(0))( ) = 0 3 3 g(0)η − αη g(1) − g(1)η αη − α = α + + + = 3 3 3 2α + g(0)η − αη + g(1) − g(1)η + αη = = 3 2 η 1 − η = α + g(0) + g(1) 3 3 3

31 We can then solve for α 2 η 1 − η 1  α = − g(0) − g(1) ⇔ α = − ηg(0) + (1 − η)g(1) 3 3 3 2 Now whats left is to choose an η such that our requirements are fulfilled. We choose g(1) η = (29) g(0) + g(1) Then we have g(0) 1 − η = (30) g(0) + g(1) This choice will be useful when proving positivity for f in the next section. We now solve for α

1 g(1)g(0) g(1)g(1)  α = − + g(1) − = 2 g(1) + g(0) g(1) + g(0)

1 g(1)g(0) (g(1) + g(0))g(1) g(1)g(1)  = − + − = 2 g(1) + g(0) g(1) + g(0) g(1) + g(0)

2g(1)g(0) = − 2(g(1) + g(0))

Which gives us g(1)g(0) α = − (31) g(1) + g(0) Looking at α we can see that our g(x) for sectors (ii) and (iv) will converge at D when g(0) = 0. g(x) for sectors (iii) and (iv) will converge at C for g(1) = 0 thus satisfying the remaining requirements.

3.4 Ensuring positivity The last step for this method is guarantee that our interpolation function f is everywhere positive over [τi, τi−1]

32 Theorem 3.1. If the instantaneous forward rates f(τi) = fi satisfy the in- equalities

d d fi−1 < 2fi and fi < 2fi for i = 1, 2, . . . , n Then the following inequality must be true

f(t) > 0 for all t

Proof. Recall function (18) ! τ − τi−1 d d f(τ) = g + fi = g(x) + fi τi − τi−1

d It suffices to show that g(x) > −fi for x ∈ [0, 1], for g corresponding to the interval [τi−1, τi]. Since we know fi, fi−1 > 0 we have

d d 1. g(0) = fi−1 − fi > −fi

d d 2. g(1) = fi − fi > −fi Our interpolation function is constructed such that g is monotone in sectors d (i), (ii) and (iii) which means g(x) > fi for x ∈ [0, 1] will be met in those sectors. The only sector we need look at is (iv) in which we have two cases.

Case I - g(0), g(1) < 0 In the first case we have g0(0) > 0 and g0(1) < 0 which indicates that g is concave up. We also have g(1)g(0) α = − > 0 g(1) + g(0) it follows that g has an absolute maximum at η = x since our coefficients to the quadratic ((g(0) − α), (g(1) − α)) are negative values. It follows that

d g(x) ≥ min(g(0), g(1)) > −fi , x ∈ [0, 1] Case II - g(0), g(1) > 0 In the second case we have g0(0) < 0 and g0(1) > 0 which indicates that g is concave down. We have g(1)g(0) α = − < 0 g(1) + g(0)

33 It follows that g has an absolute minimum at η = x since our coefficients to the quadratic ((g(0) − α), (g(1) − α)) are positive values. It is enough to show that g(1) + g(0) < f d g(1)g(0) i g(1)+g(0) d since g(x) ≥ g(1)g(0) > −fi . Now

d d d 0 < max((g(0), g(1)) = max(fi−1, fi) − fi < fi < 2fi so we have g(0) + g(1) 1 1 1 1 1 = + > d + d = d g(1)g(0) g(0) g(1) 2fi 2fi fi This implies that

g(0) + g(1) g(0) + g(1) − < f d =⇒ > −f d g(0)g(1) i g(0)g(1) i

d as long as g(0), g(1) < 0 and g(0), g(1) < 2fi .

3.4.1 Collaring f

In our final algorithm there may be some fi that we need to adjust for f to be positive. It is defined as

Definition 2. If α, β ∈ R and α < β, then  α if x < α      colarα,β(x) = min β, max(x, α) = max α, min(x, β) = x if x ∈ [α, β]  β if x > β

When used in the final algorithm our new f values will be

1. f0 = colar d (old f0) 0,2fi

2. fi = colar d d (old fi) 0,2min(fi ,fi+1)

3. fn = colar d (old fn) 0,2fi

34 3.5 Summary To summarize the monotone convex method, the final algorithm compose of the following five steps as explained by Hagan and West:

d 1. Determine fi from the input data

2. Define fi where i = 0, 1, . . . , n as shown in (15), (16), (17)

3. Optional: Collar f with the three steps from the previous subsection, if f is required to be positive for all values.

4. Construct g(x) with regard to which of the four sectors we are in

5. Define f(τ) as in (18)

6. Recover r(t) as in (12) [4, p. 77]

4 Example

We want plot the yield curve for the five following zero-coupon bonds of different maturities using the monotone convex method. The bonds are being continuously compounded using (7). It is worth noting that this example does not provide a reasonable representation of the bond market. The purpose of the example is instead to show how the method works in practice.

Face value Years Price $1000 1 $980 $1000 2 $955 $1000 3 $920 $1000 4 $880 $1000 5 $830

Table 4: Monotone convex method example

35 4.1 Bootstrapping our yield curve

−rit We begin by determining the spot rate for each bond using (7): dk = e . We can see from the table above that there is five different cash-flows at par for each bond. In other terms we have t = 1, 2, 3, 4, 5. To determine r1 we calculate  ! −r1 −r1 980 −r1 980 e · 1000 = 980 ⇔ e = ⇔ ln(e ) = ln  ⇔ r1 = 0.0202 1000 1000

The same process is repeated for the rest and results in.

r1 = 0.0202 r2 = 0.0230 r3 = 0.0278 r4 = 0.0320 r5 = 0.0373

We proceed with calculating our set of discrete forward rates using For the first case we get

d r1τ1 − r0τ0 f1 = = 0.0202 τ1 − τ0 This process is then repeated and finally results in

d f1 = 0.0202 d f2 = 0.0258 d f3 = 0.0373 d f4 = 0.0445 d f5 = 0.0585

d We can see that since fi > 0 where i ∈ [1, 5] we don’t have any arbitrage opportunities.

The next step is to calculate the instantaneous forward rates using (15), (16)

36 and (17).

d 1 d f0 = f − (f1 − f ) = 0.0188 1 2 1 1 d 1 d f1 = f + · f = 0.023 2 2 2 1 1 d 1 d f2 = f + · f = 0.0316 2 3 2 2 1 d 1 d f3 = f + · f = 0.0409 2 4 2 3 1 d 1 d f4 = f + · f = 0.0515 2 4 2 3 d 1 d f5 = f − (f4 − f ) = 0.0620 5 2 5

4.2 Enforcing monotonicity

We can now construct gi(x) and analyze which sector it is within for the interval [τi−1, τi] for i = 1, 2, 3, 4, 5. We will begin by calculating the values 0 0 of gi(0) and gi(1) from (20) and then look at the derivatives gi(0) and gi(1) to determine which sector we are in. d d (20) results in g(0) = fi−1 − fi and g(1) = fi − fi . Looking at the first case where i = 1 we get

g1(0) = 0.0188 − 0.0202 = −0.0014

g1(1) = 0.023 − 0.0202 = 0.0028 Inserting these values in (21) we get

0 g1(x) = −0.0014[−4 + 6x] + 0.0028[−2 + 6x] = 0.0084x

0 We see that g1(0) < 0 and g1(1) > 0 and from (21) that g1(0) > 0 and 0 0 0 g1(1) > 0. In other terms g1(0), g1(1) are of opposite sign and g1(0), g1(1) of the same sign. This means that g1(x) is in sector (i) and does not need to be modified. Thus we can use the main function (20) for our first interval.

2 2 2 g1(x) = −0.0014[1−4x+3x ]+0.0028[−2x+3x ] = 0.0042x −0.0014 (32) The same process is done for the rest of the values:

37 i = 2

g2(0) = 0.023 − 0.0258 = −0.0028

g2(1) = 0.0316 − 0.0258 = 0.0057 0 g2(x) = −0.0028[−4 + 6x] + 0.0057[−2 + 6x] = 0.0174x − 0.0002

From i = 2 we can see that g2(0) and g2(1) are of opposite signs, but so are 0 0 0 0 g2(0) and g2(1). Since g2(0), g2(0) < 0 and g2(1), g2(1) > 0 we know that g2(x) are located in sector (ii). We can then modify g2(x) using (24) and (25):  −0.0028 for 0 ≤ x ≤ 0.0128 g2(x) = (33) 0.0087x2 − 0.0002x − 0.0028 for 0.0128 < x ≤ 1 i = 3

g3(0) = 0.0316 − 0.0374 = −0.0057

g3(1) = 0.041 − 0.0374 = 0.0036 0 g3(x) = −0.0057[−4 + 6x] + 0.0036[−2 + 6x] = −0.0126x + 0.0156 g3(x) are located in sector (i) which means we can use the main function (20): 2 g3(x) = −0.0063x + 0.0156x − 0.0057 (34) i = 4

g4(0) = 0.041 − 0.0446 = −0.0036

g4(1) = 0.0513 − 0.0446 = 0.0070 0 g4(x) = −0.0036[−4 + 6x] + 0.0070[−2 + 6x] = 0.0204x + 0.0004 g4(x) are located in sector (i) which means we can use the main function (20): 2 g4(x) = 0.0102x + 0.0004x − 0.0036 (35) i = 5

g5(0) = 0.0513 − 0.058 = −0.0070

g5(1) = 0.0614 − 0.058 = 0.0035 0 g5(x) = −0.0070[−4 + 6x] + 0.0035[−2 + 6x] = −0.021x + 0.021 g5(x) are located in sector (i) which means we can use the main function (20): 2 g5(x) = −0.0105x + 0.021x − 0.007 (36)

38 4.3 Defining the interpolation function We can now define the interpolation functions using (18). For the first case we have ! τ − τ0 d 2 2 f1(τ) = g + f1 = 0.0042τ − 0.0014 + 0.0202 = 0.0042τ + 0.0188 τ1 − τ0 We repeat this process which results in the following table.

2 f1(τ) = 0.0042τ + 0.0188  0.0230 for 1 ≤ τ ≤ 1.0128 f2(τ) = 0.0087τ 2 − 0.0176τ + 0.0319 for 1.0128 < τ ≤ 2 2 f3(τ) = −0.0063τ + 0.0408τ − 0.0248 2 f4(τ) = 0.0102τ − 0.0608τ + 0.1315 2 f5(τ) = −0.0105τ + 0.0105τ − 0.2005

4.4 Recovering the risk free rate function The last and final step is to recover the risk free rate function using (12). For the first case we have

R t 2  Z t . τ . dτ 2 0 (0 0042 + 0 0188) r(t)t = r0t0 + (0.0042τ + 0.0188)dτ = = 0 t

= 0.0014t2 + 0.0188 for 0 ≤ t ≤ 1

Repeating for the remain intervals we get our risk free rate function.

 2 0.0014t + 0.0188 for 0 ≤ t ≤ 1  − 0.0028 . ≤ t ≤ .  t + 0 0230 for 1 1 0233  0.0029t2 − 0.0088t − 0.0058 + 0.0319 for 1.0233 ≤ t ≤ 2 r t t ( ) = 2 0.0324 −0.0022t + 0.0212t + t − 0.0268 for 2 ≤ t ≤ 3   2 0.1188 0.0031t − 0.0274t − t + 0.1217 for 3 ≤ t ≤ 4   2 0.314 −0.0035t + 0.0525t + t − 0.2005 for 4 ≤ t ≤ 5

39 Plotting these values for the correct intervals results in the following curve. To see that the curve is continuous and recovers the right values, we can check the endpoints of the intervals r(t) = rt, in this case it is true.

5 Conclusions

As previously stated the yield curve has a great importance within the finan- cial sector. There is a large amount of information that can be extracted by studying the curve and it helps us understand how investors view the econ- omy. Since the data from the market is limited, higher demands are instead placed on the methods for bootstrapping and plotting the yield curve.

The main purpose for the method developed by Hagan and West was to use the works of Hyman but make it applicable for finance. More explicitly they wanted to modify the method to ensure positive and continuous forward rates. As they mention in their article, many of the interpolation methods

40 usually originates from, and are intended for engineering or physics which can increase the risk for arbitrage opportunities [4]. The authors themselves compare the monotone convex method to other popular methods which shows that there exists no better methods for their purpose[4, p. 79]. This is also supported by Paul F du Preez and Eben Mar´e(2013) which show a particular case where the monotone convex method among their own, are the only two methods that gives a positive and continuous forward curve [9, p. 401].

This does not however mean that the monotone convex method is superior to other methods for usage within finance. Preez and Mar´ementions that a perfect method for interpolation of the yield curve does not exist[9]. Like Hagan and West they look at different methods for interpolating the yield curve and develop a similar method called the monotone preserving method. Preez and Mar´esmethod focuses on maintaining continuity and positivity whilst the monotone convex method focuses on monotonicity. They describe that the continuity is ensured at the expense of monotonicity in some cases. They proceed by giving an example where the monotone convex method have material discontinuities for certain values. Methods for interpolation of the yield curve should thus be chosen based on what the user prioritizes since there exist numerous methods that focuses on different mathematical properties.

41 References

[1] Luca Benzoni, Olena Chyruk, and David Kelley. Why Does the Yield- Curve Slope Predict Recessions? https : / / www . chicagofed . org / publications/chicago-fed-letter/2018/404. 2018. [2] James Chen. Flat Yield Curve. https://www.investopedia.com/ terms/f/flatyieldcurve.asp. 2020. [3] Moorad Choudhry. “Analysing and Interpreting the Yield Curve”. In: (Apr. 2019). doi: 10.1002/9781119444695. [4] Patrick Hagan and Graeme West. “Methods for constructing a yield curve”. In: Wilmott magazine (May 2008), pp. 70–81. [5] John C. Hull. Options, futures, and other derivatives. 6. ed., Pearson internat. ed. Upper Saddle River, NJ [u.a.]: Pearson Prentice Hall, 2006. [6] James Hyman. “Accurate Monotonicity Preserving Cubic Interpola- tion”. In: SIAM Journal on Scientific and Statistical Computing 4 (Dec. 1983), pp. 645–654. doi: 10.1137/0904045. [7] Levis Kochin and J. Mcculloch. “The Inflation Premium in the US Real and Nominal Term Structures of Interest Rates”. In: (Oct. 2000). [8] David G. Luenberger. Investment Science. New York: Oxford university press, 1998. isbn: 9780195108095. [9] Paul F du Preez and Eben MarA˜©. “Interpolating yield curve data in a manner that ensures positive and continuous forward curves”. en. In: South African Journal of Economic and Management Sciences 16 (Jan. 2013), pp. 395–406. issn: 2222-3436. url: http : / / www . scielo.org.za/scielo.php?script=sci_arttext&pid=S2222- 34362013000400003&nrm=iso. [10] Kenton Will. Financial instrument definition. https://www.investopedia. com/terms/f/financialinstrument.asp. 2020.

42