The prices come back
Run the recovered curve backwards and all ten original market prices reappear exactly. A curve that cannot reprice the bonds it was built from is not a curve.
VerificationFIXED INCOME / QUANTITATIVE FINANCE
The yield curve is the price of time — what it costs to borrow for one year, or five, or ten. It is never quoted directly; it has to be extracted from the prices of bonds trading in the market. This project extracts one, three independent ways, and checks the three against each other.
No background needed. What follows is the whole problem in three short paragraphs.
Governments borrow money by selling bonds. A bond is a promise: pay a little each year, then repay the rest at the end. Thousands of them trade every day, and each has a price.
Hidden inside those prices is something nobody publishes directly — the interest rate for every future year. Working it out is called bootstrapping: use the one-year bond to pin down the one-year rate, then use that answer to unlock the two-year bond, and so on up the ladder. Each result pulls the next one up behind it.
This project does that with ten bonds, and recovers the full picture below.
Switch between the rates themselves and the discount factors they come from.
Two of these lines are what it costs to borrow up to a given year. The third — the forward rate — is the cost of borrowing during that single year alone. Hover any point to read the exact figures.
Borrowing is dearest around the two-year mark, then gets steadily cheaper — the market pricing in falling rates ahead.
HOW IT WORKS
Line up all ten bonds and their payment schedules become a grid of numbers. Recovering the curve means solving that grid — and there is more than one honest way to do it.
C · d = P
PAYMENTS × DISCOUNTS = PRICES
Run the recovered curve backwards and all ten original market prices reappear exactly. A curve that cannot reprice the bonds it was built from is not a curve.
VerificationAny single method can be quietly wrong and still look convincing. Three that share no machinery are unlikely to be wrong the same way — and these agree to four decimals.
ConsistencyThe forward curve falls from 5.21% to 2.08% — nearly three times the drop in the headline rates. It is the sharper signal of where borrowing costs are heading.
InterpretationTheory first, results after — or jump straight to whichever you came for.
Five short chapters. The first three build the theory from scratch, assuming no background; the last two show what came out of it.
Discount factors, the cash-flow matrix, and why pricing ten bonds collapses into one matrix equation.
Read → 02The linear solve, the global optimiser and the iterative recursion — how each works, and where they part company.
Read → 03Turning discount factors into the three quoted curves, and why the forward curve falls fastest.
Read → 04The recovered curve, every number behind it, and an interactive view of both.
Read → 05Part two: daily prices, cumulative returns, correlation on returns, and a CSV round-trip.
Read → ↓Every figure and table on this site comes from one Jupyter notebook. Download it and run the whole thing yourself.
Download ↓