Methods for Constructing a

Patrick S. Hagan Chief Investment Office, JP Morgan 100 Wood Street London, EC2V 7AN, England, e-mail: [email protected] Graeme West Financial Modelling Agency, 19 First Ave East, Parktown North, 2193, South Africa e-mail: [email protected], www.finmod.co.za

Abstract In this paper we survey a wide selection of the interpolation algorithms that are in input is perturbed (the method is not local). In Hagan and West [2006] we introduced use in financial markets for construction of curves such as forward curves, basis two new interpolation methods—the monotone convex method and the minimal curves, and most importantly, yield curves. In the case of yield curves we also review method. In this paper we will review the monotone convex method and highlight the issue of bootstrapping and discuss how the interpolation algorithm should be in- why this method has a very high pedigree in terms of the construction quality crite- timately connected to the bootstrap itself. ria that one should be interested in. As we will see, many methods commonly in use suffer from problems: they posit un- reasonable expections, or are not even necessarily free. Moreover, many Keywords methods result in material variation in large sections of the curve when only one yield curve, interpolation, , discount factors

1 Basic Yield Curve Mathematics every redemption date t. In fact, such bonds rarely trade in the market. Rather what we need to do is impute such a continuum via a process Much of what is said here is a reprise of the excellent introduction in known as bootstrapping. [Rebonato, 1998, §1.2]. It is more common for the market practitioner to think and work in The term structure of interest rates is defined as the relationship be- terms of continuously compounded rates. The time 0 continuously com- tween the yield-to-maturity on a zero and the bond’s matu- pounded risk free rate for maturity t, denoted r(t), is given by the rela- rity. If we are going to price derivatives which have been modelled in tionship continuous-time off of the curve, it makes sense to commit ourselves to using continuously-compounded rates from the outset. C(0, t) = exp(r(t)t) (1) Now is denoted time 0. The price of an instrument which pays 1 unit of currency at time t—such an instrument is called a discount or zero coupon Z(0, t) = exp(−r(t)t) (2) bond—is denoted Z(0, t). The inverse of this amount could be denoted 1 r(t) =− ln Z(0, t) (3) C(0, t) and called the capitalisation factor: it is the redemption amount t earned at time t from an investment at time 0 of 1 unit of currency in said zero coupon bonds. The first and most obvious fact is that Z(0, t) is decreas- In so-called normal markets, yield curves are upwardly sloping, with

ing in t (equivalently, C(0, t) is increasing). Suppose Z(0,t1) < Z(0,t2) for some longer term interest rates being higher than short term. A yield curve t1 < t2. Then the arbitrageur will buy a zero coupon bond for time t1, and which is downward sloping is called inverted. A yield curve with one or sell one for time t2, for an immediate income of Z(0,t2)—Z(0,t1) > 0. At time t1 more turning points is called mixed. It is often stated that such mixed they will receive 1 unit of currency from the bond they have bought, which yield curves are signs of market illiquidity or instability. This is not the

they could keep under their bed for all we care until time t2, when they de- case. Supply and demand for the instruments that are used to bootstrap liver 1 in the bond they have sold. the curve may simply imply such shapes. One can, in a stable market What we have said so far assumes that such bonds do trade, with suf- with reasonable liquidity, observe a consistent mixed shape over long pe- ficient liquidity, and as a continuum i.e. a zero coupon bond exists for riods of time.

70 WILMOTT magazine TECHNICAL ARTICLE 2

d f (t) =− ln(Z(t)) (7) 1 dt Z(0, t2) d = r(t)t (8) dt 0 t t 1 2 = +  Z(0, t1) So f (t) r(t) r (t)t, so the forward rates will lie above the yield 1 curve when the yield curve is normal, and below the yield curve when it is inverted. By integrating,1 t = Figure 1: The arbitrage argument that shows that Z(0, t) must be decreasing. r(t)t f (s)ds (9) 0 t Z(t) = exp − f (s)ds (10) The shape of the graph for Z(0, t) does not reflect the shape of the 0 yield curve in any obvious way. As already mentioned, the discount factor Also curve must be monotonically decreasing whether the yield curve is nor- ti riti − ri−1ti−1 1 mal, mixed or inverted. Nevertheless, many bootstrapping and interpola- = f (s)ds (11) t − t − t − t − tion algorithms for constructing yield curves miss this absolutely i i 1 i i 1 ti−1 fundamental point. which shows that the average of the instantaneous forward rate over any Interestingly, there will be at least one class of yield curve where the of our intervals [ti−1, ti] is equal to the discrete forward rate for that inter- above argument for a decreasing Z function does not hold true — a real val. Finally, (inflation linked) curve. Because the actual size of the cash payments t that will occur are unknown (as they are determined by the evolution of r(t)t = ri−1ti−1 + f (s)ds, t ∈ [ti−1, ti] (12) a price index, which is unknown) the arbitrage argument presented ti−1 above does not hold. Thus, for a real curve the Z function is not necessar- which is a crucial interpolation formula: given the forward function we ily decreasing (and empirically this phenomenon does on occasion easily find the risk free function. occur).

1.1 Forward rates 2 Interpolation And Bootstrap Of Yield

If we can borrow at a known rate at time 0 to date t1, and we can borrow Curves—Not Two Separate Processes from t to t at a rate known and fixed at 0, then effectively we can bor- 1 2 As has been mentioned, many interpolation methods for curve construc- row at a known rate at 0 until t . Clearly 2 tion are available. What needs to be stressed is that in the case of boot- strapping yield curves, the interpolation method is intimately connected Z(0, t )Z(0; t , t ) = Z(0, t ) (4) 1 1 2 2 to the bootstrap, as the bootstrap proceeds with incomplete information. This information is ‘completed’ (in a non unique way) using the interpo- is the no arbitrage equation: Z(0; t , t ) is the forward discount factor for 1 2 lation scheme. the period from t to t —it has to be this value at time 0 with the infor- 1 2 In Hagan and West [2006] we illustrated this point using curves; mation available at that time, to ensure no arbitrage. here we will make the same points focusing on a bond curve. Suppose we The forward rate governing the period from t to t , denoted 1 2 have a reasonably small set of bonds that we want to use to bootstrap the f (0; t , t ) satisfies 1 2 yield curve. (To decide which bonds to include can be a non-trivial exer- cise. Excluding too many runs the risk of disposing of market informa- exp(−f (0; t , t )(t − t )) = Z(0; t , t ) 1 2 2 1 1 2 tion which is actually meaningful, on the other hand, including too many could result in a yield curve which is implausible, with a multi- Immediately, we see that forward rates are positive (and this is equiv- tude of turning points, or even a bootstrap algorithm which fails to con- alent to the discount function decreasing). We have either of verge.) Recall that we insist that whatever instruments are included will

ln(Z(0, t2)) − ln(Z(0, t1)) be priced perfectly by the curve. f (0; t1, t2) =− (5) t2 − t1 Typically some rates at the short end of the curve will be known. For example, some zero-coupon bonds might trade which give us exact rates. r t − r t = 2 2 1 1 (6) In some markets, where there is insufficient liquidity at the short end, t − t 2 1 some inter-bank money market rates will be used. Let the instantaneous forward rate for a tenor of t be denoted f(t), that Each bond and the curve must satisfy the following relationship: ^ is, f (t) = lim∈↓0 f (0; t, t +∈), for whichever t this limit exists. Clearly then

WILMOTT magazine71 n might be risk free rates, forward rates, or some transformation of these— A = ; [ ] piZ(0 tsettle , ti) the log of rates, etc. Of course, many choices of interpolation function are = i 0 possible — according to the nature of the problem, one imposes require- where ments additional to continuity, such as differentiability, twice differen- • A is the all-in (dirty) price of the bond; tiability, conditions at the boundary, and so on. − • tsettle is the date on which the cash is actually delivered for a pur- The Lagrange polynomial is a polynomial of degree n 1 which pass- chased bond; es through all the points, and of course this function is smooth. However,

• p0, p1,...,pn are the cash flows associated with a unit bond (typical- it is well known that this function is inadequate as an interpolator, as it = c , = c ≤ < = + c demonstrates remarkable oscillatory behaviour. ly p0 e 2 pi 2 for 1 i n and pn 1 2 where c is the annual coupon and e is the cum-ex switch); The typical approach is to require that in each interval the function is

• t0, t1,...,tn are the dates on which those cash flows occur. described by some low dimensional polynomial, so the requirements of On the left is the price of the bond trading in the market. On the continuity and differentiability reduce to linear equations in the coeffi- right is the price of the bond as stripped from the yield curve. We rewrite cients, which are solved using standard linear algebraic techniques. The this in the computationally more convenient form simplest example are where the polynomials are linear, and these meth- ods are surveyed in §4. However, these functions clearly will not be differ- n entiable. Next, we try quadratics—however here we have a remarkable [A ] Z(0, tsettle ) = piZ(0, ti) (13) i=0 ‘zig-zag’ instability which we will discuss. So we move on to cubics—or even quartics—they overcome these already-mentioned difficulties, and Suppose for the moment that the risk free rates (and hence the dis- we will see these in §5. count factors) have been determined at t0, t1,...,tn−1 . Then we solve All of the interpolation methods considered in Hagan and West [2006] Z(0, tn) easily as appear in the rows of Table 1. n−1 1 We will restrict attention to the case where the number of inputs is Z(0, tn) = [A ] Z(0, tsettle ) − piZ(0, ti) pn reasonably small and so the bootstrapping algorithm is able to price the i=0 instruments exactly, and we restrict attention to those methods where which is written in the form of risk-free rates rather than discount fac- the instruments are indeed always priced exactly. tors as − The criteria to use in judging a curve construction and its interpola- 1 n 1 −rsettle tsettle −ri ti tion method that we will consider are: rn = ln pn − ln [A ] e − pie (14) tn i=0 (a) In the case of yield curves, how good do the forward rates look? These

where the ti’s are now denominated in years and the relevant day-count are usually taken to be the 1m or 3m forward rates, but these are vir- convention is being adhered to. Of course, in general, we do not know the tually the same as the instantaneous rates. We will want to have posi- earlier rates, neither exactly (because it is unlikely that any money mar- tivity and continuity of the forwards.

ket instruments expire exactly at ti) nor even after some interpolation It is required that forwards be positive to avoid arbitrage, while (the rates for the smallest few ti might be available after interpolation, continuity is required as the pricing of interest sensitive instruments but the later ones not at all). However, as in the case of swap curves, (14) is sensitive to the stability of forward rates. As pointed out in

suggests an iterative solution algorithm: we guess rn, indeed other ex- McCulloch and Kochin [2000], ‘a discontinuous forward curve implies piry-date rates for other bonds, and take the rates already known from either implausible expectations about future short-term interest e.g. the money market, and insert these rates into our interpolation algo- rates, or implausible expectations about holding period returns’.

rithm. We then determine rsettle and r0, r1,...,rn−1 . Next, we insert these Thus, such an interpolation method should probably be avoided, es- rates into the right-hand side of (14) and solve for rn. We then take this pecially when pricing derivatives whose value is dependent upon new guess for this bond, and for all the other bonds, and again apply the such forward values. interpolation algorithm. We iterate this process. Even for fairly wild Smoothness of the forward is desirable, but this should not be curves (such as can often be the case in South Africa) this iteration will achieved at the expense of the other criteria mentioned here. reach a fixed point with accuracy of about 8 decimal places in 4 or 5 iter- (b) How local is the interpolation method? If an input is changed, does ations. This then is our yield curve. the interpolation function only change nearby, with no or minor spill-over elsewhere, or can the changes elsewhere be material? (c) Are the forwards not only continuous, but also stable? We can quanti- 3 How To Compare Yield Curve fy the degree of stability by looking for the maximum basis point change in the forward curve given some basis point change (up or Interpolation Methodologies down) in one of the inputs. Many of the simpler methods can have this In general, the interpolation problem is as follows: we have some data x quantity determined exactly, for others we can only derive estimates.

as a function of time, so we have τ1,τ2,...,τn and x1, x2,...,xn known. (d) How local are hedges? Suppose we deal an interest rate derivative of a An interpolation method is one that constructs a continuous function particular tenor. We assign a set of admissible hedging instruments,

x(t) satisfying x(τi) = xi for i = 1, 2,...,n. In our setting, the x values for example, in the case of a swap curve, we might (even should)

72 WILMOTT magazine ^ 3 7 2 , ’; 1 − rt i (19) (18) t − i t is the log- i t i r ± 1 − i . From (11) we see we (11) . From t i 1 t 1 − i 1 r − i function may not be function may − < − t 1 i . Since t r 1 i 1 t − Z t i 1 1 − i − t i i − r t − i < r i Z r t − 1 1 − 1 − i t − − t i t i i − − i t i t t t i t i − t − r i − i ) t − t i 1 + i t t i − t i i t r + + − i i − e Z t that the forward is un- instantaneous i t 1 1 1 r 1 ( n − − i − t i − 1 i 1 t TECHNICAL ARTICLE TECHNICAL i t t + t − − i i . Then from (12) we have that have we . Then from (12) t 1 t − i − − − t i − t i i t t − t t − ,..., i 1 < t 2 t t − t i = , r ln 1 ) = t < t 1 t ( = t ) 1 Z t − t − ( ) i t t r ( = r ) t for for ( r 1 − i t 1 1 − i − t i r − i − t i t i r = This raw method is very attractive because with method no effort is very attractive This raw whatsoever By definition, raw interpolation is theBy definition, method interpolation in- which has constant raw ) t ( defined, moreover, the function jumps at that the point. function jumps defined, moreover, and simplifying, we get that is on that get formula the interval interpolation we and simplifying, arithm of the capitalisation/discount factors, we see thatarithm calling this we of the capitalisation/discount factors, method or ‘linear on the ‘linear on the log of log of capitalisation factors’ is also merited. discount factors’ because that forwards are positive, all instantaneous guaranteed have we the forward the for ‘par- discrete to forwardevery is equal instantaneous be sneezed at. not to seen, this is an achievement have we As ent’ interval. at theIt is only points By writing the above expression with a common denominator of expression with a common denominator By writing the above 4.5 linear forward Piecewise what happens if attractive, decided that method theHaving is quite raw will What we in the obvious way? try defect most remedy its only we to will de- of the we do is that constant forwards being piecewise instead mand that they continuous linear function. What could be a piecewise interpolants the raw rotate gently ask to simply thanbe more natural to but continuous as well? linear, piecewise so that not only they are now two at least rise to this gives very plausible requirement Unfortunately, by understood This is easily indeed. behaviour types of very unpleasant means of an example. which as a rate formula is formula which as a rate 4.4 on the (linear of discount log interpolation Raw factors) This forward curves. This method constant piecewise corresponds to the and is usually starting implement, method is very is trivial to stable, One can often models of the find yield curve. developing mis- point for method the with raw the in fancier methods comparing more by takes method. sophisticated on every interval forward rates stantaneous which explains yet another this choice of name for method:which explains yet ‘linear Again, the forward jumps at each node, and the the Again, forward jumps decreasing. the on the method points is linear interpolation that that constant must be the discrete forward rate for the interval, so the for interval, that forward be the that rate must discrete constant f (17) (16) (15) is clearly not dif- is clearly ) are different—the 1 t ) − ) i t ( ) points (1y, 8%) and ) points (1y, r − i r ( t ( 1 1 f t, r ln − − i i r 1 r t − 1 1 i t t − and t − 2 i i − t t ) 1 i − t − t − − + i i i − t − i t 1 i − i t t − t ( t i has been reduced to zero—that has been reduced to i i − t t i f t r 1 + 1 1 − + ) t + − − i i i i t r t i r r − − r ( i t , as the function t i 1 i 1 1 1 t r − ln − − i − i i i t t t 1 t = 1 − − i ) − i − − − t t t t i i ( t t t r 2 − − i t t = = ) ) t t = ( ( e r f , the import of , the import )) the interpolation formula is formula the interpolation the interpolation formula is formula the interpolation i t t i i ( t t r ( azin ≤ ≤ g the interpolation formula is formula the interpolation ln function which is not decreasing. is undefined at the t t i t f Z ma ≤ ≤

< reaches 1 1 T t − − t i i T t t < O 1 − i t Of course A simple objection to the above formula is that it does not allow neg- is that formula it does not allow the above objection to A simple decree that the those hedging instruments admissible exactly are in- of Does most the curve. yield bootstrap used to struments that were ma- the instruments hedging theassigned to that risk get delta have amount leak into or does a material tenors, the given turities close to other regions of the curve? WILM ative interest rates. Also, the same argument as before shows that the Also, the shows for- same argument as before rates. interest ative an at each node, and similar experimentation will provide jumps ward of a example rate has ‘been forgotten’. But we clearly see that clearly this not the is But we case for has ‘been forgotten’. rate the forward, so the left and right limits We will now survey a handful of these methods, survey and highlight the now will issues We that arise. Now for for Now 4.3 factors Linear on discount which as a rate formula is formula which as a rate 4.2 Linear on the log of rates for Now ferentiable there. Moreover, in the actual rate interpolation formula, by formula, interpolation in the actual rate there. ferentiable Moreover, the time 4.1 Linear on rates For 4 Methods Linear forward jumps. Furthermore,forward jumps. does not pre- the choice of interpolation the ( have suppose we forward rates: negative vent (2y, 5%). Of course, this is a rather contrived economy: the one year inter- the one year 5%). Of course, this economy: is a rather contrived (2y, time is 2%. in one year’s forward is 8% and the rate one year rate est But using linear interpola- free economy. it is an arbitrage Nevertheless, on- years 1.84 from about tion the forwards are negative instantaneous wards. Using (8) we get Using (8) we Curve, first scenario. Forward, first scenario. 5.1 Quadratic splines 0.07 0.2 To complete a quadratic spline of a function x, we desire coefficients 0.065 0.15 (ai, bi, ci) for 1 ≤ i ≤ n − 1. Given these coefficients, the function value at 0.06 0.1 any term τ will be 0.055 0.05 2 x(τ ) = ai + bi(τ − τi) + ci(τ − τi) τi ≤ τ ≤ τi+1 (20) 0.05 0

0.045 −0.05 The constraints will be that the interpolating function indeed meets 0 5 10 0 5 10 the given data (and hence is continuous) and the entire function is 3n − 4 n − 1 Curve, second scenario. Forward, second scenario. differentiable. There are thus constraints: left hand function 0.065 0.2 values to be satisfied, n − 1 right hand function values to be satisfied, and n − 2 internal knots where differentiability needs to be satisfied. 0.15 0.06 However, there are 3n − 3 unknowns. With one degree of freedom re-

0.1 maining, it makes sense to require that the left-hand derivative at τn be 0.055 0.05 zero, so that the curve can be extrapolated with a horizontal asymptote. Suppose we apply this method to the rates (so x = r ). The forward 0.05 i i 0 curves that are produced are very similar to the piecewise linear forward 0.045 −0.05 curves—the curve can have a ‘zig-zag’ appearance, and this zig-zag is sub- 0 5 10 0 5 10 ject to the same parity of input considerations as before. So, next we try a cubic spline. Figure 2: The piecewise linear forward method.

5.2 Cubic splines

Firstly, suppose we have a curve with input zero coupon rates at every This time we desire coefficients (ai, bi, ci, di ) for 1 ≤ i ≤ n − 1. Given these year node, with a value of r(t) = 5% for t = 1, 2,...,5 and r(t) = 6% for coefficients, the function value at any term τ will be t = 6, 7,...,10. We must have f (t) = r(1) for t ≤ 1. In order to assure con- = + − + − 2 + − 3 ≤ ≤ tinuity, we see then we must have f (t) = r(i) for every i ≤ 5. Now, the dis- x(τ ) ai bi(τ τi) ci(τ τi) di(τ τi) τi τ τi+1 (21) crete forward rate for [5, 6] is 11%. In order for the average of the − − piecewise linear function f on the interval [5, 6] to be 11% we must have As before we have 3n 4 constraints, but this time there are 4n 4 that f (6) = 17%. And now in turn, the discrete forward rate for [6, 7] is 6% unknown coefficients. There are several possible ways to proceed to find and so in order for the average of the piecewise linear function f on the another n constraints. Here are the ones that we have seen: interval [6, 7] to be 6% we must have that f (7) =−5%. This zig-zag feature • xi = ri. The function is required to be twice differentiable, which for continues recursively; see Figure 2. Note also the implausible shape of the the same reason as previously adds another n − 2 constraints. For actual yield curve itself. the final two constraints, the function is required to be linear at the Secondly, suppose now we include a new node, namely that extremes i.e. the second derivative of the interpolator at τ1 and at τn r(6.5) = 6%. It is fairly intuitive that this imparts little new information2. are zero. This is the so-called natural cubic spline. Nevertheless, the bootstrapped curve changes dramatically. The ‘parity of • xi = ri. The function is again required to be twice differentiable; for the zig-zag’ is reversed. So we see that the localness of the method is the final two constraints we have that the function is linear on the exceptionally poor. left and horizontal on the right. This is the so-called financial cubic spline Adams [2001]. = 5 Splines • xi riτi. The function is again required to be twice differentiable; for the final two constraints we have that this function is linear on the The various linear methods are the simplest examples of polynomial right and quadratic on the left. This is the quadratic-natural spline splines: a polynomial spline is a function which is piecewise in each in- proposed in McCulloch and Kochin [2000].

terval a polynomial, with the coefficients arranged to ensure at least that • xi = ri. The values of bi for 1 < i < n are chosen to be the slope at τi of the spline coincides with the input data (and so is continuous). In the lin- the quadratic that passes through (τj, rj) for j = i − 1, i, i + 1. The ear case that is all that one can do—the linear coefficients are now deter- value of b1 is chosen to be the slope at τ1 of the quadratic that passes mined. If the polynomials are of higher degree, we can use up the through (τj, rj) for j = 1, 2, 3; the value of bn is chosen likewise. This is degrees of freedom by demanding other properties, such as differentia- the Bessel method [de Boor, 1978, 2001, Chapter IV], although often bility, twice differentiability, asymptotes at either end, etc. somewhat irregularly called the Hermite method by software ven- The first thing we try is a quadratic spline. dors.

74 WILMOTT magazine ^ 5 7 2 n for for ]; it i (24) (22) (23) i n f ] for r n ,τ 1 ,...,τ = ,τ − 1 . This ex- consider i ]. Clearly 0 i τ n f . (Here we ], and if — ,τ i 1 0 n 0 (τ ) ,τ are selected τ r ,τ 1 − ) = 1 τ n = n − 0 i r (τ defined on [0, 1] τ τ>τ 0 and f , g n 1 = ]. A ‘short rate’ (in- ]. A ‘short rate’ for for ,..., i ]. ≤ i n 2 be denoted be denoted n f i ,τ r , defined on [ ) ,τ 1 i 1 τ<τ 1 ≤ − = i f (τ − i τ and 1 = f τ for for ) (τ ) 0 1 too (the latter will be less se- will (the latter too f for for . as being on the straight line . as being on the straight ( r i f for i n τ 1 τ − i = = 1 τ and 1 − , i 0 − τ i d f i 1 r f (τ ) − i − r is increasing on [ 1 τ i i τ i − τ i r τ τ<τ TECHNICAL ARTICLE TECHNICAL − = (τ ) − 1 f d i 1 + is decreasing on [ for for f i + τ i 1 τ r (τ ) ) f d , so the discrete forward is recovered by the by , so the forward is recovered discrete + . Thus n = then f d ) ) i 1 f d n 1 + f d − i 1 (τ ) (τ f =  1 + f d then i 1 − ). f , and probably one at , and probably f − 1 n − 1 n 1 1 dt i . τ f f − ) τ = τ i + d ( < ( 1 i t τ f ↑ ( 1 2 1 2 0 d i − f − f τ − 1 > 1 − − = i n i − i that satisfies (in some sense, they the are conditions below τ + d < τ τ i i d d ) 1 n f f f τ n 1 0 f 3 ( 1 − d  > i − = = i = f f ,..., τ 1 1 i n 0 . So far so good. What happens to the forward rates? Perhaps sur- Perhaps the forward happens to . So far so good. What rates? is positive. is continuous. 2 is the discrete rate which ‘belongs’ to the entire interval [ the entire interval which ‘belongs’ to rate is the discrete f − f f − i d n i , τ curve, as in (11). curve, f f f d ,..., i 1 We now seek an interpolatory function seek an interpolatory now We f Let us first normalise seek a function things, so we In order to avoid this pathology, we now have terms terms have now we this pathology, avoid to In order One rather simple observation is that all of theOne rather simple methods spline we 1 f , . Rather, we begin by assigning it to the and of the midpoint assigning it to begin by interval, we . Rather, = (i) i 0 (ii) then modelling the instantaneous rate at then modelling the rate instantaneous (iii) (iv) If (8). This makes it almost certain almost it that(8). This makes the material has a forward curve discontinuity at such that so that arranged in decreasing order of necessity). in decreasing order arranged and the generic interval for consideration is [ consideration for and the interval generic Note that if the discrete forward rates are positive then so are the are positive that forward if the rates Note discrete if the interpolation is on rates then we will apply horizonal extrapolation apply will thenwe is on rates if the interpolation outside of that the interval: rate to prisingly we cannot apply the the rule cannot apply same extrapolation forwards, to in we prisingly set need to fact, we if not, the algorithm be provided, will model one. may rate stantaneous) if rate, will be an overnight that might be input the rate Usually shortest will has some ‘overkill’—there the algorithmit is provided, here simply it need not be short an instantaneous and rate—but rate be an overnight modified. also check thatalso check and so conclude that these is the are all positive, curve forward cases where in those rates few (except free arbitrage i.e. legal algorithm convex the As an interpolation monotone be negative). may recover and then a forward if required curve, bootstrap method now will using (12). the free rates continuum of risk [ the interval beyond §5 fail in forward in extrapolation saw would be a mistake to model that rate as being the instantaneous rate at as being the rate model that instantaneous rate to be a mistake would first thing we do is calculate first do is calculate thing we that joins the adjacent midpoints. Let this rate plains (22). In (23) and (24) the values vere as the curve, either by design or by nature, probably has a horizontal nature, probably either as the design or by by curve, vere as asymptote τ i f τ>τ or 1 τ , with 4 τ i then the g n + 3 τ i e ,...,τ 2 + 2 ,τ , in a way to be dis- to , in a way 1 τ i n τ d ≤ + i τ i ≤ c 1 + i b for for for periods for i + b i n τ a r = ,..., (τ ) 2 r r , 1 unknowns and 3 additional conditions at and 3 additional conditions unknowns r 5 − e n 5 azin g ) can compromise localness of the interpolator, sometimes localness of the interpolator, ) can compromise ma n

. Again, Bessel interpolation. . Again, i unknowns and 4 additional conditions required. and unknowns τ T . The monotone preserving cubic spline of Hyman [1983]. The spline of Hyman [1983]. preserving cubic . The monotone τ i i 6 r r T or − required. Although one must ask: when does one actually have a have Although does one actually ask: when one must required. O = = 1 n τ i i n method specifies the values of set of instantaneous forwards as inputs for interpolation? for forwards as inputs set of instantaneous and (9) then are risk free rates, apply the inputs if we Alternatively thethe spline is of form x τ 6 x the quartic spline gives the smoothest interpolator of the the forward the smoothest gives spline interpolator quartic this forward rates, The spline can proceed on instantaneous curve. time there are cussed in more detail shortly. cussed in more detail Significant can become apparent when using some of these problems The point of view taken in the monotone convex method is that convex in the the monotone taken The point of view The method of Hyman is a method which attempts to address these to The method of Hyman is a method which attempts • • • [2001] Adams to splines. According quartic further, Going one step WILM methods. The spline is supposed to alleviate the problem of oscillation alleviate methods. The spline is supposed to seen when fitting a data set (the polyno- Lagrange to a single polynomial mial), nevertheless, significant be present. can still oscillatory behaviour Furthermore, see with some of the we the various types of clamping conditions at the bound- imposing to refers (clamping methods above aries inputs are (or can be manipulated to be) discrete forwards belonging to be) discrete to are (or can be manipulated inputs it- curve rate is not performed the on the interpolation intervals; interest forwards—FRA actual discrete On the other have rates. hand may self. We rates interest have if we 6 Monotone Convex devel- a natural of the ideas of theMany have method of Hyman will now the only resolve to method was developed convex opment—the monotone none of the methods simply, remaining deficiency Very of Hyman [1983]. that a financial theymentioned so far are aware are trying solve prob- to lem—indeed, the these breeding ground for methods engi- is typically As such, there is no mechanism which ensures thatneering or physics. the by and some simple method are positive, generated the forward rates which give a yield curve to a set of inputs experimentation will uncover under all of the methods forward rates mentioned here, as some negative con- [2006]. Thus, in introducing the monotone and West seen in Hagan ensure that but explicitly use the method, ideas of Hyman [1983], we vex forward the discrete (whenever are positive the continuous forward rates positive). are themselves rates problems. This method is quite different to the different others; to problems. This method it is a local is quite method—the behav- local by determined values are only interpolatory This method ensures that in regions of mo- not global behaviour. iour, increasing or decreasing (so, threethe of successive inputs notonicity this property; if the function preserves values) the similarly interpolating a have will data has a minimum/maximum then the output interpolator minimum/maximum at the node. grossly. In fact, the iterative procedure from §2 often fails to converge for converge procedure from §2 oftenfails to In fact, the iterative grossly. them from further exclude methods,the and we interpolation quartic analysis. g(1)

(ii) g(0) (i) (iv) 0 x = 0 x = 0 τ = τ τ = τ i–1 i (iii) D g(1) g(0) (iii) Figure 3: The function g. (iv) g(0) = −2g(1) (i) (ii) d ( ) = (τ − + (τ − τ − ) ) − . B g x f i 1 i i 1 x fi (25) A C g(1) = −2g(0) Before proceeding, let us give a sketch of how we will proceed. We will choose g to be piecewise quadratic in such a way that (i) is satisfied by Figure 4: The reformulated possibilities for g. construction. Of course, g is continuous, so (iii) is satisfied. As a quadrat- ic, it is easy to perform an analysis of where the minimum or maximum occurs, and we thereby are able to apply some modifications to g to en- sure that (iv) is satisfied, while ensuring (i) and (iii) are still satisfied. two sectors actually coincide (to preserve continuity). In actual fact the treatment for every diametrically opposite pair of sectors is the same, so Also, we see a posteriori that if the values of fi had satisfied certain constraints, then (ii) would have been satisfied. So, the algorithm will be we really have four cases to consider, as follows (refer Figure 4): to construct (22), (23) and (24), then modify the fi to satisfy those con- (i) In these sectors g(0) and g(1) are of opposite signs and g(0) and g(1) straints, then construct the quadratics, and then modify those quadrat- are of the same sign, so g is monotone, and does not need to be mod- ics. Finally, ified.  τ − τ − (ii) In these sectors g(0) and g(1) are also of opposite sign, but g (0) and (τ ) = i 1 + d. f g fi (26) g(1) are of opposite sign, so g is currently not monotone, but needs τi − τi−1 to be adjusted to be so. Furthermore, the formula for (i) and for (ii) Thus, the current choices of fi are provisional; we might make some need to agree on the boundary A to ensure continuity. adjustments in order to guarantee the positivity of the interpolating (iii) The situation here is the same as in the previous case. Now the for- function f . mula for (i) and for (iii) need to agree on the boundary B to ensure Here follow the details. We have only three pieces of information about continuity. d d 1 ( ) = − − , ( ) = − ( ) = g: g 0 fi 1 fi g 1 fi fi , and 0 g x dx 0. We postulate a func- (iv) In these sectors g(0) and g(1) are of the same sign so at first it appears = + + 2 ⎡tional form⎤ g(⎡x) ⎤K ⎡Lx Mx⎤ , having 3 equations in 3 unknowns we get that g does not need to be modified. Unfortunately this is not the 100 K g(0) case: modification will be needed to ensure that the formula for (ii) ⎣ ⎦ ⎣ ⎦ = ⎣ ⎦ 111 L g(1) , and easily solve to find that and (iv) agree on C and (iii) and (iv) agree on D. 1 1 1 2 3 M 0 The origin is a special case: if g(0) = 0 = g(1) then g(x) = 0 for all x, and = − + 2 + − + 2 g(x) g(0)[1 4x 3x ] g(1)[ 2x 3x ] (27) d = d = d = d ∈ fi−1 fi fi+1 , and we put f (τ ) fi for τ [τi−1,τi].

d So we proceed as follows: Note that by (22) that (iv) is equivalent to requiring that if fi−1 < fi < fi d then f (τ ) is increasing on [τi−1,τi], while if fi−1 > fi > fi then f (τ ) is de- (i) As already mentioned g does not need to be modified. Note that A = − 2 B = creasing on [τi−1,τi]. This is equivalent to requiring that if g(0) and g(1) on we have g(x) g(0)(1 3x ) and on we have g(x) g(0) ( − + 3 2) are of opposite sign then g is monotone. 1 3x 2 x . Now (ii) A simple solution is to insert a flat segment, which changes to a 1  quadratic at exactly the right moment to ensure that g(x)dx = 0. g (x) = g(0)(−4 + 6x) + g(1)(−2 + 6x) 0  So we take g (0) =−4g(0) − 2g(1)  g(0) for 0 ≤ x ≤ η ( ) = ( ) + ( )   g 1 2g 0 4g 1 g(x) = − 2 (28) g(0) + (g(1) − g(0)) x η for η

76 WILMOTT magazine ^ 7 7 2 , 1 ) 1 + d are i f , D d i f ( 0.5 and between 0 between C 0 f 2min 0 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 − − − − − 1 0.5 between 0 and between i f is not required to be everywhere to is not required 0 f are straightforward. 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 − − − − − g . If collar 1 d n f 1 2 TECHNICAL ARTICLE TECHNICAL − as in (22), (23) and (24). as in (22), n n , 0.5 as in (12). Integration formulae are easily estab- are easily formulae Integration as in (12). ,... ,..., r 1 2 from the input data. from the input , , 0 d 0 1 i 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 f − − − − − = = . From top to bottom: approaching the boundary, at the between 0 and 0 and between i i 1 with regard to which of the four sectors we are in. we which of the sectors four with to regard D n f g for for as in (26). and i , for , for f f d 1 C f , 0.5 2 is required to be everywhere positive, then be everywhere collar positive, to is required B f , A lished as the of forms functions and and collar positive, simply omit this step. simply positive, Pseudo-code for this recipe is provided in an Appendix. Working code an Appendix. Working in thisPseudo-code for recipe is provided 0 0 0.5 10 0 0.5 0.5 10 1 0 0 0.5 0.5 0.5 10 1 0 1 0 0.5 0 0.5 0.5 1 0.5 1 0 1 0 1 0 0.5 0.5 0.5 1 1 1 0 0 0.5 0.5 1 1 0 0.5 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 (6) recover If required (5) Define (1) the Determine (4) Construct (3) If (2) Define − − − − − there discontinuities. Figure 5: The g function as we cross the boundaries. From left to right: bound- aries 7 Hedging use the instruments which do we how ask the question: can now We other hedge instruments? In general to been used in our bootstrap have 6.2 Amelioration of this [2006] an enhancement method is considered and West In Hagan making by (smoothed). This is achieved is ameliorated where the curve not only using as inputs methodthe less local i.e. by slightly interpolation nodes away. which is two but also information neighbouring information for this interpolation scheme is available from the second author’s is available scheme this website. for interpolation boundary (central), leaving the boundary. Only at the boundary of i a f 0 , 2 for 1 = (31) (34) (33) (30) (32) d − i < i f A f z − , is every- y f . This sug- < )> since 1 D x 0 ( d i f g < <η 1 − x x < <η . To see this, note . To . Thus, our algo- d > ≤ < i d x x i f ) f d i η 3 1 2 f < ( g < η< − < ] i η i i ) f f f for for 0 1 , , 3 − . ( 1 1 = a g − 1 for 0 for , as required. − i ) i f 2 ) f ) (as in (33)). So, it now suffices(as in (33)). So, it now η) B 1 > ) 1  ) + 0 ( , so the interpolation formula , so the interpolation ( 0 x 2 η 2 ( z 1 g ) − ) ( g at η ( − g   + ) yz 0 0 g ) η y 1 g x η ) η ( 1 ( ( ) + 1 is monotone, so those regions are is monotone, 2 η − ( −  − g − g + ( is positive at the endpoints and has is positive 0 η x x 1 ) g 1 2 and ) ( g g 3 η + ) 3 2 )) 0 g   1 g d ( 1 ) i 1 ( ) ) f ( g ( + 0 g + A A g ( g − - so the first line satisfies (iii)) and and so 3 A x g − − 3 − η 2 3 0 a 1 = −→ − > [ and the result follows, since if and the result follows, = ) ) =− ) ) d η − 1 2 0 1 d i = 0 i η = = f 1 A ( ( f ( ( 1 ) g g 2 g a g ( 1 ( . This is the case if 1 − ( 2 )( dx ( d i ) =− 1 0 f g + + x ( + as − + )< ( i A g e f ) ) A A < g 1 a 1 1 1 1 ( 2 1 ) ( ( = ⎧ ⎨ ⎩ = (so the second line satisfies calcu- (ii). Straightforward g ) 1 0 g g ( 1 is not monotone. is not monotone. ) ) ( > g 0 when ), azin x (as in (34)) at the x-value = g  0 g −→ ) + ( 0 g y 1 , and to that defined, and to approach in (iii) as we ( ) ) 0 0 ( g = A ( 0 g η x C = ( g g ( ) g + = ) ma g 0

x z < 1 ( A ( g T g 0 = T . Now . Now z O 1] + yz , y Note that Note and so is satisfying the choice various requirements A simple when approach lus gives where gests reduces to reduces to [0 Clearly from theClearly (26) it suffices formula ensure that to In region (iv) ∈ WILM (iv) that thatwant a formula defined to reduces in form in (ii) as we We that then where positive. to prove that prove to then x is satisfied Thus the inequality are positive. at the endpoints of the inter- regions (i), (ii) and (iii), in val. Now, 6.1 Ensuring positivity that the guarantee function interpolatory to wish Suppose we (iii) insert a flat we Here again take So we segment. fine. a minimum of We choose the slightly stricter condition choose the stricter slightly We rithm is Hedging under waves. 1

0.5

0

0.5

1 3m 3x6 6x9 9x12 12x15 15x18 2y 3y 4y 5y 6y 7y 8y 9y 10y 15y 20y 25y 30y

Hedging under forward triangles. 2

1

0

−1

−2 3m 3x6 6x9 9x12 12x15 15x18 2y 3y 4y 5y 6y 7y 8y 9y 10y 15y 20y 25y 30y

Hedging under forward boxes. 0.8

0.6

0.4

0.2

0

0.2 3m 3x6 6x9 9x12 12x15 15x18 2y 3y 4y 5y 6y 7y 8y 9y 10y 15y 20y 25y 30y

Figure 6: The obvious superiority of using forward boxes to determine hedge portfolios: not only is the hedge portfolio simple and intuitive, but the portfolio composition is practically invariant under the interpolation method.

the trader will have a portfolio of other, more complicated instru- changes whose moves are somehow representative. Some methods have ments, and will want to hedge them against yield curve moves by using been suggested as follows: liquidly traded instruments (which, in general, should exactly be those • Perturbing the curve: creation of bumps. In bumping, we form new instruments which were used to bootstrap the original curve). For sim- curves indexed by i: to create the ith curve one bumps up the ith input plicity, we will assume that these instruments are indeed available for rate by say 1 basis point, and bootstraps the curve again. hedging, and the risky instrument to be hedged is nothing more com- • Perturbing the forward curve with triangles. One approach is to plicated that another vanilla swap: for example, one with term which is again form new curves, again indexed by i: the ith curve has the not one of the bootstrap terms, is a forward starting swap, or is a original forward curve incremented by a triangle, with left hand stubbed swap. endpoint at t − , fixed height say one basis point and apex at t , and Suppose initially that, with n instruments being used in our boot- i 1 i right hand endpoint at t + . (The first and last triangle will in fact strap, there are exactly n yield curve movements that we wish to hedge i 1 be right angled, with their apex at the first and last time points against. It is easy to see that we can construct a perfect hedge. First one respectively.) calculates the square matrix P where P is the change in price of the jth ij • Perturbing the forward curve with boxes. In boxes: the ith curve has bootstrapping instrument under the ith curve. Next we calculate the the original forward curve incremented by a rectangle, with left change in value of our risk instrument under the ith curve to form a hand endpoint at t − and right hand endpoint at t , and fixed height column vector V. The quantity of the ith bootstrapping instrument re- i 1 i say one basis point. Such a perturbation curve corresponds exactly quired for the perfect replication is the quantity Qi where Q is the solu- with what we get from bumping, if one of the inputs is a t − × t FRA tion to the matrix equation PQ = V. Assuming for the moment that P is i 1 i rate, we bump this rate, and we use the raw interpolation method. invertible, we find the solution. Of course, in reality, the set of possible yield curve movements is far, More generally the user might want to define generic key terms e.g. far greater. What one wants to do then is find a set of n yield curve 1w, 1m, 3m, 6m, 1y, 2y, etc. and define triangles or boxes relative to these

78 WILMOTT magazine ^ 79 2 TECHNICAL ARTICLE TECHNICAL puts of the bootstrap, free), and is arbitrage the curve it (in particular, allow inputs the at other value of the way locations. affect curve in any more or less proportionately. change wards stable. In addition, as bonuses meth- interpolation many reviewed have [2006] we and West In Hagan It is our opinion that and West the in Hagan method new derived (1) reproduced as out- are exactly the instruments bootstrap to all input (4) at a certain the location do not method in inputs is local i.e. changes (5) the for- change, instantaneous the i.e. as inputs forwards are stable (6) perturbations are reasonable and by of this constructed curve hedges (2) if the be positive to guaranteed is the forward curve instantaneous (3) continuous. is typically the forward curve instantaneous ods available and have introduced a couple of new methods. of new introduced a couple In the final and have ods available and be subjective, theanalysis, use will always choice of which method to provided have hope to case basis. But we be decided on a case by needs to some warning flags outlined sev- of the methods, about many and have making the for selection on criteria and quantitative qualitative eral use. which methodto 8 Conclusion [2006] and West Hagan in of the analyse methodsThe comparison we 1. appears in Table ver- the unameliorated (in particular, convex monotone [2006], namely the of our best To sion) should be the method interpolation. of choice for this is the published method only knowledge where simultaneously function will not be decreasing). Z e azin g ma

which will be the basis for our waves, where the triangles are which will be theour waves, basis for T n t T O ,..., 2 Some obvious ideas which are just as obviously rejected are to form are to rejected as obviously Some obvious ideas which are just In either case we have (an automated or user defined) set of dates (an automated have In either case we As an example, consider a 51m swap, where (for simplicity, and in- simplicity, swap, where (for a 51m consider As an example, 6. The very are in Figure plausible and get The type of results we Table 1: A synopsis of the comparison between methods. synopsis of the comparison Table 1: A t , Minimal no continuous poor good very poor poor good poor good good Yield curve type very Linear on discount Linear on rates poor Raw (linear on log of discount) good Linear on the log of rates very Forwards positive? Piecewise linear forward smooth yes Quadratic smooth Forward smoothness Natural cubic no poor no Hermite/Bessel no no Financial Method local? no no Quadratic natural not continuous Hermite/Bessel on rt function continuous Monotone piecewise cubic not continuous Forwards stable? Quartic not continuous Monotone convex (unameliorated) no continuous not Bump hedges local? excellent Monotone convex (ameliorated) continuous no no yes Minimal no no excellent no yes excellent excellent excellent smooth continuous continuous smooth poor continuous excellent continuous excellent smooth no excellent very good very good very good poor very poor very good very good poor very good good smooth poor very good good good very poor good very poor good good good poor poor very poor good good poor very poor good poor very poor 1 WILM defined as above. will corresponding curves itself - such the perturbations yield curve to free (the derived not be arbitrage terms - the inputs to the bootstrap do not necessarily correspond to these correspond do not necessarily to the bootstrap to - theterms inputs nodes. t deed, in some markets, such as the second author’sdeed, in some markets, market) domestic both fixed and floating in swaps occur every 3 months. payments Thus swap, which let us assume are in- the 4 and 5 year our swap lies between the curve. puts to methods, but many for method performs adequately popular bump the out minimal methodsome methods example, - can be rejected - for be used. Furthermore, is to all of the for cubic of hand if bumping splining methods, of varying there leakage is hedge degrees. out of hand as a method withPerturbing - in- triangles can be rejected deed, the pathology the that pathology occurs here is akin to that aris- es when one uses the forward linear method piecewise of bootstrap: theof sign will reverse the bootstrap to an input adding or removing have to Anyway, in question. the before input the quantities hedge Perturbing absurd. these is simply magnitudes in the portfolio hedge is the does not enable methodchoice, but unfortunately of with boxes of the the different quality interpolation between distinguish us to methods. FOOTNOTES & REFERENCES [3] Patrick S. Hagan and Graeme West. Interpolation methods for curve construction. Applied Mathematical Finance, 13 (2):89—129, 2006. 1. We have + = = t = t . [4] James M. Hyman. Accurate monotonicity preserving cubic interpolation. SIAM Journal r(s)s C f (s)ds, so r(t)t [r(s)s]0 0 f (s)ds 2. It would be wrong to say that there is no new information; that would be the case under on Scientific and Statistical Computing, 4(4):645—654, 1983. linear interpolation of rates, but not necessarily here. [5] J. Huston McCulloch and Levis A. Kochin. The inflation premium implicit in the US real and nominal term structures of interest rates. Technical Report 12, Ohio State 3. Strictly speaking, we are defining functions gi, each corresponding to the interval University Economics Department, 2000. URL http://www.econ.ohio- [τi−1,τi]. As the gi are constructed one at a time, we suppress the subscript. state.edu/jhm/jhm.html. [1] Ken Adams. Smooth interpolation of zero curves. Algo Research Quarterly, [6] Ricardo Rebonato. Interest-Rate Option Models. John Wiley and Sons Ltd, second edi- 4(1/2):11—22, 2001. tion, 1998. [2] Carl de Boor. A Practical Guide to Splines: Revised Edition, volume 27 of Applied Mathematical Sciences. Springer-Verlag New York Inc., 1978, 2001.

Pseudo Code For Monotone Convex have already been dimensioned, the raw data inputs have already been provided, and it has been specified with the boolean variable

Interpolation ‘InputsareForwards’ where those inputs are rates r1, r2,...,rn or discrete d d d First the estimates for f0, f1,...,fn . This implementation assumes that forwards f1 , f2 ,...,fn . Further, a ‘collar’ and ‘min’ utility functions it is required that the output curve is everywhere positive. Various arrays are used (not shown). Of course, collar(a, b, c) = max(a, min(b, c)).

Having found the estimates for f0, f1,...,fn , we can find the value of f (τ ) for any τ. The key function here is ‘LastIndex’, which determines

the unique value of i for which τ ∈ [τi,τi+1). Extrapolation is as in the third paragraph of §6.

80 WILMOTT magazine TECHNICAL ARTICLE 2

Working code for this interpolation scheme, with proper dimensioning of all arrays and code for all the missing functions, is available from the second author’s website on the resources page.

W

WILMOTT magazine81