Bootstrapping Treasury Spot Rates from Par Yields
Summary
The document describes bootstrapping spot rates from US Treasury par yields. It explains that Treasury par yields are bond-equivalent yields based on securities with semiannual coupon payments, then presents a Python example that solves sequentially for spot rates from par rates at half-year intervals. The example’s calculated rates are said to match those in a referenced article.
The question is how to extend the method to Treasury curve maturities that do not fall on the semiannual schedule, including short bill maturities and gaps between longer coupon maturities. It asks whether par yields should be interpolated to create additional semiannual points, but provides no answer or comparison of interpolation methods. The example therefore illustrates the regular-interval case rather than a complete method for constructing a spot curve from the full Treasury dataset. It also does not discuss bill cash-flow conventions or the effects of interpolation choices on the resulting curve.
Key ideas
- Treasury par yields are expressed on a bond-equivalent basis consistent with semiannual coupon payments.
- Bootstrapping solves for spot rates sequentially using the prices implied by earlier rates.
- The example covers maturities spaced at half-year intervals and reports matching rates from a reference article.
- Short bill maturities and irregular gaps in the Treasury curve require additional treatment.
- The document poses interpolation as a possible approach but does not resolve whether or how to use it.
Tags
Full text
# Convert US Treasury par yields to spot rates
# Convert US Treasury par yields to spot rates
I'm devising a methodology to transform par yield to spot rates, I'd like to stick with pure python as much as possible so not really after Quantlib (or other libraries) examples. In particular I want to consume the US Treasury par yield curves. From the website I understand that these are curves based on securities that pay interest on a semiannual basis and the yields are "bond-equivalent" yields. A couple of interesting details on these curves are in the FAQs, in particular
> DOES THE PAR YIELD CURVE ASSUME SEMIANNUAL INTEREST PAYMENTS OR IS IT A ZERO-COUPON CURVE? The par yield curve is based on securities that pay interest on a semiannual basis and the yields are "bond-equivalent" yields. Treasury does not create or publish daily zero-coupon curve rates. DOES THE PAR YIELD CURVE ONLY ASSUME SEMIANNUAL INTEREST PAYMENT FROM 2-YEARS OUT (I.E., SINCE THAT IS THE SHORTEST MATURITY COUPON TREASURY ISSUE)? No. All yields on the par yield curve are on a bond-equivalent basis. Therefore, the yields at any point on the par yield curve are consistent with a semiannual coupon security with that amount of time remaining to maturity.
I'm implementing the bootstrapping methodology, as a reference I came across an article that explains it nicely I think. I got the bootstrapping to work in the code below, the spot rates I get are matching the ones in the article.
```
import numpy as np
from scipy.optimize import fsolve
def func(x, a, b):
return (1 + (x / 100 / 2)) ** (a + 1) - b
par_rates = [2.0, 2.4, 2.76, 3.084, 3.3756, 3.638]
spot_rates = []
m = [0.5, 1.0, 1.5, 2.0, 2.5, 3.0]
par_value = 1000
pf = 2
n_payments = int(m[-1] * pf)
# iterate over rows
for idx, rate in enumerate(par_rates):
if m[idx] <= 1 / pf:
spot_rates.append(rate)
else:
rhs = 0
for idx2 in np.arange(0, idx, 1):
coupon = par_value * (rate / 100 / pf)
exp = idx2 + 1
rhs += coupon / (1 + spot_rates[idx2] / 100 / pf) ** exp
summation = par_value - rhs
s = (par_value + coupon) / (summation)
root = fsolve(func, x0=rate, args=(exp, s))
spot_rates.append(root[0])
```
However, how can I deal with the constant maturities in the Treasury curves that start at 1 month and aren't equally spaced at 6 months (semiannual payments).
Essentially, how to deal with
- par rates that relate to maturities of less than 6 months? The Treasury dataset has 1, 2, 3, 4 months par rates that relate to the 4, 8, 13,17 weeks Treasury Bills
- maturities intervals that are greater than the semiannual interest, for instance 3 and 5yr. Shall I interpolate the par rates to evaluate par rates at 3.5/4./4.5 for instance and keep using the same methodology?Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.