Skip to main content

Desk Lab · Rates

Yield Curve Bootstrapper (real 2026 Treasury data)

Pick any trading day of 2026, then bump one point of the par curve and watch the zero and forward curves react. Every number is bootstrapped live in your browser.

REAL

Every trading day from 2 Jan to 27 Nov 2026
Basis points added to that par yield

Loading the 2026 Treasury curves…

How it works

Up to six months the par yields are bill yields, so the discount factor is 1 / (1 + y·T). From one year on, each par yield is the coupon of a bond priced at 100 with semiannual coupons: 1 = (c/2)·ΣDF(tᵢ) + DF(T). Par yields are interpolated linearly at the missing half-year dates, then each discount factor is solved in order.

Zero rates are continuously compounded, and the forward curve shows the one-year rate implied for each future year. Bump a single par point and the forwards next to it jump, a reminder that forwards amplify small kinks in the input curve. You can see this even with no bump: the 2026 par curve peaks at the 20-year point, and straight-line interpolation turns that kink into a spike in the forwards just before 20 years. Desk curves use smoother interpolation for exactly this reason.

Source: U.S. Department of the Treasury, Daily Treasury Par Yield Curve Rates, 2 Jan to 27 Nov 2026 (public domain). Simplified bootstrap for teaching; a desk curve uses traded instruments, day counts and a smoother interpolation.

The Python behind it

Copy it into a notebook or the Code Playground. The comment shows what it prints.

import numpy as np

years = [1/12, 1.5/12, 2/12, 0.25, 4/12, 0.5, 1, 2, 3, 5, 7, 10, 20, 30]
par = [4.27, 4.28, 4.30, 4.35, 4.38, 4.46, 4.61, 4.69, 4.72, 4.74, 4.82, 4.94, 5.36, 5.33]  # 27 Nov 2026, %

df = {0.5: 1 / (1 + par[5] / 100 * 0.5)}
for n in range(2, 61):                      # semiannual dates out to 30 years
    T = n / 2
    c = np.interp(T, years, par) / 100
    df[T] = (1 - c / 2 * sum(df[k / 2] for k in range(1, n))) / (1 + c / 2)

print(round(df[10.0], 4), round(df[30.0], 4))   # 0.6118 0.2001
print(f"10y zero: {-np.log(df[10.0]) / 10:.4%}")

Practise it like an interview

From the Rates, Curves & Bonds questions. Type your answer, check it, then open the working.

Warm-up

Zero rates with annual compounding are 5% for 1 year and 6% for 2 years. What 1-year rate, starting in 1 year, do they imply (the 1-year forward rate 1 year ahead)?

Show the answer and working

About 7.01%: 1.06² / 1.05 − 1 = 1.1236 / 1.05 − 1.

  1. No arbitrage: investing for 2 years at 6% must give the same as 1 year at 5% and then a second year at the forward rate f.
  2. So 1.05 × (1 + f) = 1.06² = 1.1236.
  3. 1 + f = 1.1236 / 1.05 = 1.0701, so f = 7.01%.

CheckOn an upward-sloping curve the forward sits above both zero rates: 7.01% > 6% > 5%.

Interview trapThe quick estimate 2 × 6% − 5% = 7% is close but not exact. Follow-up: a forward rate is a no-arbitrage rate, not a forecast of future rates.

Try it in the Desk Lab: Yield Curve Bootstrapper (real 2026 Treasury data) →

Warm-up

The yield curve slopes upwards. For the same maturity, rank the par yield, the zero (spot) rate and the forward rate. Why does the order come out that way?

Show the answer and working

Forward > zero > par. A zero rate is an average of the forwards before it, and a par yield is a blend of zero rates tilted towards the earlier, lower ones.

  1. A zero rate for T years is roughly the average of the one-period forward rates up to T. If forwards keep rising, the latest one is above the average: forward > zero.
  2. A par bond pays coupons along the way, and each coupon is discounted at its own earlier, lower zero rate. So the par yield mixes in shorter zeros: par < zero.
  3. On a downward-sloping curve the order flips: forward < zero < par. On a flat curve all three are equal.

CheckExample: zeros of 5% (1 year) and 6% (2 years) give a 1-year forward, 1 year ahead, of 7.01% and a 2-year par yield of 5.97%.

Interview trapCalling all three “the yield”. Interviewers want the averaging argument, and often ask what changes on an inverted curve.

Try it in the Desk Lab: Yield Curve Bootstrapper (real 2026 Treasury data) →

Step up

Bootstrap the curve. The 1-year par yield is 5% and the 2-year par yield is 6% (annual coupons, annual compounding). What is the 2-year zero rate?

Show the answer and working

About 6.03%. DF1 = 1/1.05 = 0.9524; then 6 × 0.9524 + 106 × DF2 = 100 gives DF2 = 0.8895.

  1. A par bond prices at 100. The 1-year bond pays 105 at year 1, so DF1 = 100/105 = 0.9524.
  2. The 2-year par bond pays 6 at year 1 and 106 at year 2: 6 × DF1 + 106 × DF2 = 100.
  3. 6 × 0.9524 = 5.714, so DF2 = (100 − 5.714) / 106 = 0.8895.
  4. Zero rate: z2 = DF2^(−1/2) − 1 = 6.03%.

CheckThe 2-year zero (6.03%) is a little above the 2-year par yield (6%), as it should be on an upward-sloping curve.

Interview trapAssuming the 2-year zero equals the 2-year par yield. Follow-up: bootstrap one more year, or explain why the shorter discount factors must come first.

Try it in the Desk Lab: Yield Curve Bootstrapper (real 2026 Treasury data) →

More from the Desk Lab

For education only; not investment advice. Labels on this site: REAL means real public data with its source given, SIMULATED means random numbers generated for the example, ILLUSTRATIVE means made-up inputs chosen to teach the idea.