Yield Curve Bootstrapper
Operator: Abdulla Al Fahad. How tools are built and checked
A market quotes a 3-month deposit rate, a 6x9 FRA, a 5-year swap rate and a government bond price, and none of them is a discount factor. Bootstrapping turns that mixed set into one curve by solving for the discount factor at each instrument's maturity until every instrument is worth exactly what the market says. What the curve does between those maturities is a modelling choice, and it decides the forward rates you read off it.
Give the page an instrument table and a curve date and it solves all the pillars together, then reports how closely each input is repriced, so a wrong convention shows up as a number instead of a hunch.
Key features
- Six instrument types: DEPOSIT, FRA, FUTURE (with a convexity adjustment in basis points), par SWAP, PAR yield on exact half-year points, and BOND from a clean price and coupon
- Four interpolation methods on the same inputs: log-linear discount factors, linear zero rates, a natural cubic spline on zero rates, and monotone convex (Hagan and West, 2006)
- Zero, discount factor, instantaneous forward, one-year forward and par curves, with a chart that overlays the forwards of all four methods
- A Nelson-Siegel or Svensson least-squares fit to the bootstrapped zeros, and an evaluator that checks the Svensson formulas against the Federal Reserve's published parameters
- A bond priced off the curve with dirty and clean price, yield, a parallel DV01 and a key-rate DV01 for every input quote
How each instrument becomes a cash-flow equation for the curve
The table needs a type column, a tenor (or maturity) column and a quote column; coupon, freq and convexity_bp are optional. Rates are in percent. A DEPOSIT tenor looks like 3M or 1Y, an FRA like 6x9 (months), a FUTURE gives the start as a tenor such as 9M with the price as the quote, a SWAP or PAR gives the maturity as 5Y, and a BOND gives its maturity as yyyy-mm-dd with the clean price as the quote and the coupon in percent.
Every instrument starts on the curve date, except FRAs and futures. There is no spot lag, so the curve date is the spot date. Dates roll Modified Following over weekends and any holidays you list. Curve time is ACT/365F years from the curve date. Deposits, FRAs and futures use one day count you choose (ACT/360 by default); swap fixed legs use another (30/360 by default), annual, semi-annual or quarterly.
A PAR row is a par yield on a year-count grid: coupon times fall at exactly 1/f, 2/f, ... years, with no calendar. That is how par-yield tables such as the Federal Reserve's are defined, and it is why the Fed example reproduces. One curve both projects and discounts: a swap's floating leg is worth par at its start. There is no separate OIS discounting curve.
How it works
Each instrument is written as a list of dated cash flows whose present value is zero when the curve prices it at the quote: a deposit pays 1 + r x tau against 1 lent, a swap pays the fixed coupons and 1 at maturity against 1 lent, a bond pays coupons and 1 against its dirty price. The unknowns are the zero rates at the instrument maturities.
All pillars are solved together by damped Newton iteration with a finite-difference Jacobian, up to 80 iterations, stopping when every present value is below 1e-12. Solving them together is what lets the spline and monotone-convex methods, which move earlier pillars when a later one changes, still reprice every input.
Monotone convex works on forwards. It takes the discrete forward over each pillar interval, forms node forwards from their neighbours, clamps them to be non-negative when every discrete forward is, and bends each interval so the integral of the forward still equals the discrete forward exactly. Beyond the last pillar the forward is held flat; the linear-zero and spline methods hold the zero rate flat instead.
Common use cases
- A treasury analyst loads 12 quotes (three deposits, a 6x9 FRA, a 9-month future with a 0.6 bp convexity adjustment, six swaps from 2Y to 30Y and a bond). With monotone convex interpolation the curve date 30 June 2026 gives a 1-year zero of 5.1767%, a 5-year zero of 4.0403% and a 10-year zero of 4.0200%.
- Switching that same table to the natural cubic spline drops the lowest forward between 0.05 and 29 years from 3.748% to 3.147% while every quote still reprices to about 1e-12, which shows how much freedom the inputs leave between pillars.
- A bank pricing a 4% semi-annual bond maturing 30 June 2033 off that curve gets a dirty price of 99.6460, a yield of 4.0586% and a parallel DV01 of 0.05878 per 100; the key-rate DV01s add to 0.05871.
- A student fits Svensson and Nelson-Siegel to the 12 bootstrapped zeros and finds root-mean-square misses of 4.61 and 7.02 basis points, so the extra hump term earns its keep on this curve.
How to use this tool
- Drop the instrument table, paste it, or load one of the examples, and check the curve date.
- Set the day counts, swap frequency and any holidays, then choose an interpolation method.
- Read the repricing table first: every difference should be near 1e-12 or smaller. Then read the curve, the forward chart and the fit.
- Enter a bond to price it, or download the curve as CSV or the whole analysis as a workbook.
Example
Federal Reserve par yields for 28 June 2024 (SVENPY01 to SVENPY30), loaded with the Fed par yields button, monotone convex interpolation
type,tenor,quote
PAR,1Y,5.0949
PAR,2Y,4.7448
PAR,3Y,4.5356
...
PAR,30Y,4.585Bootstrapped zero yields next to the Fed's published zero yields, in percent
1y 5.0294 (Fed 5.028)
2y 4.6797 (Fed 4.6791)
5y 4.2876 (Fed 4.2873)
10y 4.3359 (Fed 4.3358)
20y 4.5763 (Fed 4.5763)
30y 4.5715 (Fed 4.5714)
Largest repricing error 5e-15; largest zero gap 0.14 basis points (0.31 with log-linear discount factors)Tips for best results
- Compare the forward chart of all four methods before choosing one: where they disagree, the inputs say nothing.
- Futures need their convexity adjustment in the convexity_bp column; leaving it at zero shifts the implied forward by that amount.
- Use PAR rows, not SWAP rows, for a published par-yield table: they use the year-count grid such tables are built on.
Common pitfalls
Two instruments that end on the same date cannot both be pillars. The page asks you to keep one rather than guess which quote wins.
The par column is computed on exact annual or half-year points, so for a SWAP row it can differ from your quote by a few tenths of a basis point because the quote runs on adjusted dates and its own day count.
Nelson-Siegel and Svensson are fitted to the bootstrapped zeros at the pillars, not to the raw prices, so the fit inherits any wiggle in the bootstrap.
This is an analysis page, not a trading or risk system: one curve, no spot lag, no stub periods, no inflation or cross-currency basis.
Common errors and how to fix them
- "The instruments do not pin down a curve (singular system)"
- The quotes cannot all be met by any curve, for example two instruments on the same maturity with different rates. Remove the contradictory quote and make sure every instrument ends on its own date.
- "Row 6: 6x3 is not an FRA such as 3x6"
- Write the FRA as start x end in whole months with the end after the start, for example 3x6.
- "The solver stopped before every instrument repriced"
- Look for a quote that is far out of line, such as a swap rate entered in decimals (0.045) beside percent quotes (4.5).
Checking the Svensson formulas against the Federal Reserve
The Federal Reserve Board publishes daily Svensson parameters (BETA0 to BETA3, TAU1 and TAU2) in feds200628.csv, with the zero, par and instantaneous forward yields it derives from them (Gurkaynak, Sack and Wright, 2007). The page carries the parameters and published yields for 28 June 2024, 31 December 2008 and 31 March 2000, and a table that evaluates the same formulas from the parameters and puts the result beside the published yields.
Across all 30 maturities on those three dates, the zero, par and forward yields agree with the published values to within 0.00005 percentage points, which is the rounding of the four decimals the file prints. The par yield is the coupon-equivalent semi-annual rate: 100 x f x (1 - P(n)) divided by the sum of P(i/f).
- Zero yields are continuously compounded, par yields are coupon-equivalent, forwards are instantaneous.
- The file is a staff research product of the Board and not an official release; the example values are copied unchanged.
Frequently asked questions
Why do the bootstrapped zeros differ from the Fed's by a fraction of a basis point?
The Fed's curve is a smooth Svensson function. Bootstrapping 30 par yields on annual pillars has to guess the half-year discount factors between pillars, and each interpolation method guesses slightly differently, from 0.14 basis points (monotone convex) to 0.31 (log-linear).
Can I model OIS discounting with a separate projection curve?
No. The page builds one curve that both projects and discounts, which is right for a single-curve world and for government curves, and an approximation for collateralised swaps.
Why is the key-rate DV01 total slightly different from the parallel DV01?
Each key-rate row moves one input quote and re-solves the whole curve, and the parallel row moves all of them at once. The two differ by a convexity term; in the example they are 0.05871 and 0.05878.