✦ Simulator

A bond is a fixed set of promises. Only the price moves.

Price any bond, watch the curve bend as yields change, and see exactly how much of that movement duration explains and how much it misses. Then build a yield curve and read the future rates hidden inside it.

$0 At par
actual price what duration alone predicts
The straight line is tangent to the curve at today's yield. It is accurate for tiny moves and drifts further below the truth the further you go in either direction.
If rates move
Shock the market yield and compare the shortcuts against rediscounting every cash flow.
+0 bp
A basis point is one hundredth of a percentage point, so 100 bp is 1%.
When the money actually arrives
Each bar is one payment, drawn at its present value. The dashed line is the balance point of all of them, which is precisely what Macaulay duration measures.
coupon final coupon plus face value
The bond
Everything except the price is fixed when the bond is issued.
$
Risk measures
The numbers a fixed income desk actually quotes.
Macaulay duration
0
average time to repayment
Modified duration
0
% price move per 1% yield move
Convexity
0
how much the line bends
DV01
$0
gain or loss per basis point
Coupon rate
0%
of face value
Current yield
0%
coupon over price
Term structure

The yield curve

Every bond above was priced at a single yield. Real markets quote a different rate for every maturity, and the shape of that curve carries a forecast whether anyone intended it or not.

Rates by maturity
The solid line is what you earn lending today for each term. The dashed line is the one year rate the curve implies for each future year.
spot rate implied 1 year forward
+0 bp the 2s10s spread, the gap between two year and ten year rates
Shape the curve
A Nelson-Siegel curve, the same three-factor form central banks use to fit real data: a level, a slope, and a hump.
0%
Roughly what overnight and very short lending pays. Central banks set this most directly.
0%
Where the curve settles at thirty years. Driven by long-run growth, inflation expectations and term premium.
0
Pushes the middle of the curve up or down without moving either end.
Pricing the bond off this curve
Each payment discounted at the rate for its own date, rather than one yield for all of them.
Price off the curve
$0
every payment at its own spot rate
Implied yield
0%
the single yield that matches it
How the model works

Price

Every coupon plus the face value, discounted back at the periodic yield. P = C·[1 − (1+i)⁻ᴺ] / i + F·(1+i)⁻ᴺ

Macaulay duration

Each payment date weighted by its share of the present value, so it comes out in years. D = Σ t·PV(CFₜ) / P

Modified duration

Macaulay adjusted for compounding, which converts an average time into a price sensitivity. Dmod = D / (1 + i)

Convexity

The second derivative of price with respect to yield, scaled by price. It is what the straight line misses. C = Σ t(t+1)·PV(CFₜ) / [P(1+i)²]

The two-term estimate

Duration and convexity together approximate the entire curve. ΔP/P ≈ −Dmod·Δy + ½·C·Δy²

Forward rates

Lending for two years must pay the same as lending one year then reinvesting. (1+s₂)² = (1+s₁)(1+f)

What you are actually watching

A bond is the simplest instrument in finance and the one most people get backwards. Nothing about the promises changes after issue. All the drama is in what someone will pay for them.

The price moves so the return can stay competitive

Load the Premium bond preset. It pays an 8% coupon while the market demands 4%, and it trades well above its $1,000 face value. That is not generosity, it is arithmetic: buyers bid the price up until the return from here matches what they could get elsewhere.

Pay $1,327 for a bond that returns $1,000 at maturity and you have locked in a capital loss that eats the excess coupon exactly. The yield to maturity is what you actually earn once that is counted, which is why current yield, the coupon divided by the price, flatters a premium bond and understates a discount one.

Duration is a time, and then it is a risk number

Macaulay duration starts as something concrete: the average number of years you wait for your money, weighting each payment by how much of the price it accounts for. The dashed line on the cash flow chart is literally the balance point of those bars.

Divide it by one plus the periodic yield and it becomes modified duration, a sensitivity. A modified duration of 8 means roughly an 8% price move for each percentage point of yield, in the opposite direction. Load the Zero coupon preset and duration equals maturity exactly, because there is only one payment to average. Every coupon bond pays something earlier, so its duration always sits below its maturity.

Convexity is the error term, and it is on your side

Push the rate slider to +300 bp and watch the table. The duration-only estimate is too low, and it stays too low when you drag the other way to −300 bp. That is not a bug in the approximation, it is the shape of the curve.

The price-yield relationship bends upward, so the true price sits above the tangent line on both sides. For a bondholder this is a free asymmetry: duration overstates how much you lose when yields rise and understates how much you gain when they fall. Convexity measures that curvature, and it is worth more the longer and the lower-coupon the bond, which is why long zeros are the most convex thing in the market.

DV01 is the same idea shrunk to a working unit: the dollars gained or lost per basis point. Trading desks hedge in DV01 because it is additive across positions in a way that percentages are not.

The curve is not one number, and its shape is a forecast

Everything above used a single yield. Real markets quote a rate for every maturity, and the relationship between them is the term structure.

The dashed forward rate line is where it gets interesting. If two-year money pays more than one-year money, that extra return has to come from somewhere, and arbitrage pins down the one-year rate a year from now that makes both paths break even. Nobody promised that rate. It is simply what today's prices imply, and it is the benchmark any actual forecast has to beat to be worth acting on.

What an inversion does and does not tell you

Load the Inverted preset. Ten-year money now pays less than two-year money, which looks irrational until you ask what would make someone accept it. Locking in a lower rate for longer is sensible if you expect short rates to fall a long way, and short rates usually fall when a central bank is cutting into a downturn.

Every US recession since the 1970s was preceded by an inversion of the 2s10s spread. That record is striking and it is also routinely oversold. The lead time has ranged from a few months to roughly two years, which is useless for timing anything. There have been inversions without a following recession. And the number of episodes is small enough that a handful of cases is carrying the entire claim.

The honest reading is narrower and more useful: an inversion says the bond market expects rate cuts. It is a measure of collective expectation, not a mechanism, and it can be wrong in the same way any consensus can.

What this model leaves out

Credit risk, entirely. Every cash flow here is assumed to arrive, which is roughly true for a Treasury and increasingly false as you move toward corporate and high yield paper, where a spread over the risk-free curve does most of the work.

There are no embedded options, so no callable bonds, where the issuer refinances the moment rates fall and hands you negative convexity instead. No taxes, no accrued interest between coupon dates, no bid-ask spread, and no liquidity difference between an on-the-run Treasury and something nobody has traded in a month. The curve is also a smooth three-factor fit, which is how central banks summarize a curve rather than how any individual bond prices.

Things to try

Each isolates one mechanism, and the numbers are worth checking by hand.

1Prove duration equals maturity

Load Zero coupon and read Macaulay duration. It is exactly 10 years. Now nudge the coupon up to 1% and watch it fall below maturity immediately.

2Watch convexity earn its keep

Load Long bond and drag the yield shock to +300 bp, then −300 bp. Compare the duration-only error at each end. The bond gains more than duration promises and loses less.

3Find the par point

On any preset, set the market yield equal to the coupon rate. The price snaps to exactly its par value, whatever the maturity.

4Compare a 2 year with a 30 year

Flip between Short note and Long bond at the same yield shock. Same market move, wildly different damage, and DV01 tells you the size in dollars.

5Invert the curve by hand

Start from Normal and drag the short end above the long end. Watch the forward curve dive below the spot curve, which is the market pricing in cuts.

6Make the two prices disagree

With a steep curve, compare the price off the curve against the single-yield price. The gap is what using one average rate for every date costs you.

Common questions about bonds and the yield curve

Why do bond prices fall when interest rates rise?

Because the coupon payments were fixed when the bond was issued. If newly issued bonds start paying more, nobody will buy the old one at its previous price, so the price drops until the return from buying it today matches what is available elsewhere. The promised cash flows never change. Only the price someone is willing to pay for them does, which is why an existing bondholder feels a rate rise as an immediate loss.

What is duration, in plain terms?

Macaulay duration is the weighted average time until you get your money back, weighting each payment by its present value. Modified duration turns that average into a sensitivity: a modified duration of 7 means the price moves roughly 7% for every percentage point change in yield, in the opposite direction. The first is measured in years, the second in percent, and confusing them is the most common mistake with the concept.

What does convexity add that duration misses?

Duration is a straight-line approximation to a curved relationship, so it is only accurate for small moves. Because the price-yield curve bends upward, the true price always sits above the straight line, which means duration alone overstates your losses when rates rise and understates your gains when they fall. Convexity measures that curvature and corrects for it, and it matters most for long-dated, low-coupon bonds.

Why does a zero coupon bond have duration equal to its maturity?

Because there is only one cash flow, paid at maturity. Duration is the present-value-weighted average time until payment, and when there is a single payment that average is just the date of that payment. Every coupon bond returns some money earlier, which pulls the average forward, so a coupon bond's duration is always shorter than its maturity.

What does an inverted yield curve actually mean?

It means investors will accept a lower rate to lend for ten years than for two, which only makes sense if they expect short rates to be much lower in the future. Every US recession since the 1970s was preceded by an inversion of the 2s10s spread, but the lead time ranged from a few months to about two years, there have been inversions without a recession following, and the number of episodes is small. Treat it as a reading of what the bond market expects rather than as a cause of anything.

What is a forward rate?

The future interest rate implied by today's curve. If two-year money yields more than one-year money, the extra return has to come from somewhere, and the forward rate is the one-year rate a year from now that would make lending for two years and lending twice for one year break even. It is what current prices imply rather than a forecast anyone has committed to, which makes it the benchmark a real forecast has to beat.

Why is DV01 quoted instead of a percentage?

Because dollars add up across positions and percentages do not. A desk holding twenty different bonds can sum their DV01s to get the portfolio's exposure to a one basis point move, then hedge that single number. Percentage duration has to be weighted by market value before it can be combined, so DV01 skips a step that is easy to get wrong.

About this model: default-free cash flows, no embedded options, no taxes, no accrued interest, no bid-ask spread, and a smooth three-factor curve rather than individual quoted bonds. Real fixed income work adds credit spreads, optionality, settlement conventions and day count rules that move prices by more than the rounding here. Use this to build intuition for how price, yield and time interact, not to value a specific security.