Bootstrapping the interest-rate term structure
Marco Marchioro
www.marchioro.org
October 20th, 2012
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 1
Summary (1/2)
• Market quotes of deposit rates, IR futures, and swaps
• Need for a consistent interest-rate curve
• Instantaneous forward rate
• Parametric form of discount curves
• Choice of curve nodes
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 2
Summary (2/2)
• Bootstrapping quoted deposit rates
• Bootstrapping using quoted interest-rate futures
• Bootstrapping using quoted swap rates
• QuantLib, bootstrapping, and rate helpers
• Derivatives on foreign-exchange rates
• Sensitivities of interest-rate portfolios (DV01)
• Hedging portfolio with interest-rate risk
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 3
Major liquid quoted interest-rate derivatives
For any given major currency (EUR, USD, GBP, JPY, ...)
• Deposit rates
• Interest-rate futures (FRA not reliable!)
• Interest-rate swaps
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 4
Quotes from Financial Times
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 5
Consistent interest-rate curve
We need a consistent interest-rate curve in order to
• Understand the current market conditions (e.g. forward rates)
• Compute the at-the-money strikes for Caps, Floor, and Swaptions
• Compute the NPV of exotic derivatives
• Determine the “fair” forward currency-exchange rate
• Hedge portfolio exposure to interest rates
• ... (many more reasons) ...
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 6
One forward rate does not fit all (1/2)
Assume a continuously compounded discount rate from a flat rate r
D(t) = e−r t (1)
Matching exactly the implied discount for the first deposit rate
1
1 + T1 rfix(1)= D(T1) = e−r T1 (2)
and for the second deposit rate
1
1 + T1 rfix(2)= D(T2) = e−r T2 (3)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 7
One forward rate does not fit all (2/2)
Yielding
r =1
T1log
(1 + T1 rfix(1)
)(4)
and
r =1
T2log
(1 + T2 rfix(2)
)(5)
which would imply two values for the same r. Hence,
a single constant rate is not consistent with all market quotes!
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 8
Instantaneous forward rate (1/2)
Given two future dates d1 and d2, the forward rate was defined as,
rfwd(d1, d2) =1
T (d1, d2)
[D (d1)−D (d2)
D (d2)
](6)
We define the instantaneous forward rate f(d1) as the limit,
f(d1) = limd2→d1
rfwd(d1, d2) (7)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 9
Instantaneous forward rate (2/2)
Given certain day-conventions, set T = T (d0, d) then after preforming
a change of variable from d to T we have,
f(T ) = lim∆t→0
1
∆t
[D(T )−D(T + ∆t)
D(T + ∆t)
](8)
It can be shown that
f(T ) = −1
D(T )
∂D(T )
∂T= −
∂ log [D(T )]
∂T(9)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 10
Instantaneous forward rate for flat curve
Consider a continuously-compounded flat-forward curve
D(d) = e−z T (d0,d) ⇐⇒ D(T ) = e−z T (10)
with a given zero rate z, then
f(T ) = −∂ log [D(T )]
∂T= −
∂ log[e−z T
]∂T
= −∂ [−z T ]
∂T= z
is the instantaneous forward rate
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 11
Discount from instantaneous forward rate
Integrating the expression for the instantaneous forward rate∫∂ log [D(t)]
∂Tdt = −
∫f(t)dt ⇐⇒ log [D(T )] = −
∫ T
0f(t)dt
and taking the exponential we obtain
D(T ) = exp
{−∫ T
0f(t)dt
}
so that choosing f(t) results in a discount factor
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 12
Forward expectations
Recall
D(T ) = E
[e−∫ T
0 r(t)dt]
= e−∫ T
0 f(t)dt (11)
Similarly in the forward measure (see Brigo Mercurio)
rfwd(t, T ) = ET
[1
T − t
∫ T
tr(t′)dt′
](12)
and
f(T ) = ET [r(t)dt] (13)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 13
Piecewise-flat forward curve (1/2)
Given a number of nodes, T1 < T2 < T3, define the instantaneous
forward rate as
f(t) = f1 for t ≤ T1 (14)
f(t) = f2 for T1 < t ≤ T2 (15)
f(t) = f3 for T2 < t ≤ T3 (16)
f(t) = . . .
until the last node
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 14
Piecewise-flat forward curve (2/2)
We determine the discount factor D(T ) using equation
D(T ) = exp
{−∫ T
0f(t)dt
}It can be shown that
D(T ) = 1 · e−f1(T−T0) for T ≤ T1 (17)
D(T ) = D(T1) e−f2(T−T1) for T1 < T ≤ T2 (18)
. . . = . . . (19)
D(T ) = D(Ti) e−fi+1(T−Ti) for Ti < T ≤ Ti+1 (20)
Recall that T0 = 0
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 15
Questions?
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 16
(The art of) choosing the curve nodes
• Choose d0 the earliest settlement date
• First few nodes to fit deposit rates (until 1st futures?)
• Some nodes to fit futures until about 2 years
• Final nodes to fit swap rates
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 17
Why discard long-maturity deposit rates?
Compare cash flows of a deposit and a one-year payer swap for a
notional of 100,000$
Date Deposit IRS Fixed Leg IRS Ibor LegToday - 100,000$ 0$ 0$
Today + 6m 0$ 0$ 1,200$Today + 12m 102,400$ -2,500$ 1,280∗$
For maturities longer than 6 months credit risk is not negligible
*Estimated by the forward rate
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 18
Talking to the trader: bootstrap
• Deposit rates are unreliable: quoted rates may not be tradable
• Libor fixings are better but fixed once a day (great for risk-
management purposes!)
• FRA quotes are even more unreliable than deposit rates
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 19
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0 0.5 1 1.5 2 2.5 3 3.5
Zero
rate
s (%
)
time to maturity
Boostrap of the USD curve using different helper lists
Depo1Y + Swaps
Depo6m + Swaps
Depo3m + Swaps
Depo3m + Futs + Swaps
Depo2m + Futs + Swaps
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 20
-0.05
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0 0.5 1 1.5 2 2.5 3 3.5
Spre
ad o
ver r
isk
free
(%)
time to maturity
Boostrap of the USD curve using different helper lists
Depo1Y + Swaps
Depo6m + Swaps
Depo3m + Swaps
Depo3m + Futs + Swaps
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 21
Discount interpolation
Taking the logarithm in the piecewise-flat forward curve
log [D(T )] = log[D(Ti−1)
]− (T − Ti)fi+1 (21)
discount factors are interpolated log linearly
• Other interpolations are possible and give slightly different results
between nodes (see QuantLib for a list)
• Important: use the same type of interpolation for all curves!
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 22
Bootstrapping the first node (1/2)
Set the first node to the maturity of the first depo rate.
Recalling equation (2) for f1 = r,
D(T1) = e−f1 T1 =1
1 + T1 rfix(1)(22)
This equation can be solved for f1 to give,
f1 =1
T1log
(1 + T1 rfix(1)
)(23)
we obtain the value of f1.
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 23
Bootstrapping the first node (2/2)
-
6
3m 6m 1y 2y 3y 4y 5y 7y 10y
6.0%5.0%4.0%3.0%2.0%1.0%
••f1
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 24
Bootstrapping the second node (1/2)
Set the second node to the maturity of the second depo rate.
The equivalent equation for the second node gives,
D(T2) = e−f1 T1 e−f2 (T2−T1) =1
1 + T2 rfix(2)(24)
from which we obtain
f2 =log
(1 + T2 rfix(2)
)− f1 T1
T2 − T1(25)
Continue for all deposit rates to be included in the term structure
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 25
Bootstrapping the second node (2/2)
-
6
3m 6m 1y 2y 3y 4y 5y 7y 10y
6.0%5.0%4.0%3.0%2.0%1.0%
••f1
•f2
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 26
Bootstrapping from quoted futures (1/2)
For each futures included in the term structure
• Add the futures maturity + tenor date to the node list
• Solve for the appropriate forward rates that reprice the futures
Note: futures are great hedging tools
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 27
Bootstrapping from quoted futures (2/2)
-
6
3m 6m 1y 2y 3y 4y 5y 7y 10y
6.0%5.0%4.0%3.0%2.0%1.0%
••f1
•f2 •f3 •f4
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 28
Bootstrapping from quoted swap rates
For each interest-rate swap to be included in the term structure
• Add the swap maturity date to the node list
• Solve for the appropriate forward rate that give null NPV to the
given swap
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 29
Final piecewise-flat forward curve
-
6
3m 6m 1y 2y 3y 4y 5y 7y 10y
6.0%5.0%4.0%3.0%2.0%1.0%
••f1
•f2 •f3 •f4 •f5 •f6 •f7 •f8 •f9
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 30
Extrapolation
Sometimes we need to compute the discount factor beyond the last
quoted node
We assume the last forward rate to extend beyond the last maturity
D(T ) = D(Tn) e−fn(T−Tn) for T > Tn (26)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 31
Questions?
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 32
QuantLib: forward curve
The curve defined in equations (17)-(20) is available in QuantLib as
qlForwardCurve
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 33
QuantLib: rate helpers
Containers with the logic and data needed for bootstrapping
• Function qlDepositRateHelper for deposit rates
• Function qlFuturesRateHelper for futures quotes
• Function qlSwapRateHelper2 for swap fair rates
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 34
QuantLib: bootstrapped curve
• qlPiecewiseYieldCurve: a curve that fits a series of market quotes
• qlRateHelperSelection: a helper-class useful to pick rate helpers
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 35
Questions?
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 36
Foreign-exchange rates
Very often derivatives are used in order to hedge against future changes
in foreign exchange rates.
We extend the approach of the previous sections to contracts that
involve two different currencies.
Consider a home currency (e.g. e), a foreign currency (e.g. $), and
their current currency-exchange rate so that Xe$,
1 $ =1e
Xe$(27)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 37
Foreign-exchange forward contract
Given a certain notional amount Ne in the home currency and a
notional amount N$ in the foreign currency, consider the contract
that allows, at a certain future date d, to pay N$ and to receive Ne.
Pay/Receive (at d) = Ne −N$ (28)
Bootstrap the risk-free discount curve De(d) using the appropriate
quoted instruments in the e currency, and the risk-free discount curve
D$(d) similarly.
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 38
Present value of notionals
The present value of Ne in the home currency is given by
PVe = De(d)Ne (29)
the present value of N$ in the foreign currency can be written as
PV$ = D$(d)N$ (30)
Dividing the first expression by Xe$
PVe
Xe$= De(d)
Ne
Xe$. (31)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 39
NPV of an FX forward
The net present value of the forward contract in the $ currency is
NPV$fx−fwd =
PVe
Xe$− PV$
= De(d)Ne
Xe$−D$(d)N$ (32)
The same amount can be expressed in the foreign currency as,
NPVefx−fwd = De(d)Ne −Xe$D$(d)N$ (33)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 40
Arbitrage-free forward FX rate
The contract is usually struck so the its NPV=0, from equation (32)
N$ =De(d)
Xe$ D$(d)Ne .
Comparing with (27), we define the forward exchange rate Xe$(d)
Xe$(d) = Xe$D$(d)
De(d). (34)
• The exchange rate Xe$(d) is the fair value of an FX rate at d.
• According to (34) the forward FX rate is highly dependent on the
discount curves in each respective currency.
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 41
Questions?
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 42
Interest-rate sensitivities
In order to hedge our interest-rate portfolio we compute the interest
rate sensitivities
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 43
Dollar Value of 1 basis point
The Dollar Value of 1 basis point, or DV01, of an interest-rate port-
folio P is the variation incurred in the portfolio when interest rates
move up one basis point:
DV01P = P (r1 + ∆r, r2 + ∆r, . . .)− P (r1, r2, . . .) (35)
with ∆r=0.01%
Using a Taylor approximation
DV01P '∂P
∂r∆r (36)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 44
Managing interest-rate risk (1/2)
• Consider an interest-rate portfolio P with a certain maturity T
• Look for a swap S with the same maturity
• Compute DV01 for both portfolio (DV01P ) and Swap (DV01S)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 45
Managing interest-rate risk (2/2)
Buy an amount H, the hedge ratio, of the given swap,
H = −DV01P
DV01S(37)
The book composed by the portfolio and the swap is delta hedged
B(r) = P (r) + H S(r) (38)
where r is the vector of all interest rates
B(r + ∆r)−B(r) ' DV01P ∆r + H DV01S ∆r ' 0 (39)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 46
Advanced interest-rate risk management (1/2)
For highly volatile interest rates use higher-order derivatives (gamma
hedging)
CVP '∂2P
∂r2∆r (40)
For portfolio with highly varying cash flows compute as many DV 01
as the number of maturities. E.g. DV012Y , DV013Y , . . .
DV011YP = P (r1, . . . , r2Y + ∆r, r3Y , . . .)− P (r) (41)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 47
Advanced interest-rate risk management (2/2)
Build the hedging book as
B = P + H2Y S2Y + H3Y S3Y + . . . (42)
with
H2Y = −DV012Y
P
DV012YS
, H3Y = −DV013Y
P
DV013YS
, . . . (43)
The book is delta hedge with respect to all swap rates:
B(r + ∆r)−B(r) ' DV012YP ∆r + H2Y DV012Y
S ∆r + (44)
+DV013YP ∆r + H2Y DV013Y
S ∆r + . . . ' 0
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 48
Questions?
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro
Bootstrapping the interest-rate term structure 49
References
• Options, future, & other derivatives, John C. Hull, Prentice Hall
(from fourth edition)
• Interest rate models: theory and practice, D. Brigo and F. Mer-
curio, Springer Finance (from first edition)
Advanced Derivatives, Interest Rate Models 2010-2012 c© Marco Marchioro