Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceStochastic ModelsGuide
Guide
Derivatives pricing
01Forwards, calls and puts02Combining positions03Arbitrage and the forward price04Put–call parity05The one-step binomial model06Risk-neutral probabilities07Multi-step trees and backward induction08American options and early exercise09Delta and hedging10Geometric Brownian motion11The Black–Scholes formula12The Greeks: gamma, vega, theta and rho13Implied volatility and the volatility smile14Stochastic volatility and the Heston model15Static replication: Breeden–Litzenberger and Carr–Madan16Exotic options: barriers, Asians and digitals
Portfolio & risk
01Returns and volatility02Diversification and correlation03The efficient frontier and the capital market line04Risk aversion and the optimal complete portfolio05CAPM, beta and the security market line06Performance measures: Sharpe, Treynor, Jensen and information ratio07Factor models and systematic risk08Value at Risk and expected shortfall
Fixed income
01Bond prices and yields02Duration and convexity03Immunization and duration matching04Spot rates, forward rates and the yield curve05Bond futures and the cheapest-to-deliver06Interest rate swaps07Callable bonds and negative convexity08Credit risk: default probabilities and credit spreads
Corporate finance
01Interest, compounding and discounting02Annuities, perpetuities and loan amortization03Net present value and internal rate of return04The weighted average cost of capital05Capital structure and the Modigliani–Miller theorems06Discounted cash flow valuation07Relative valuation with multiples08Real options: the value of flexibility
Stochastic models
01Random walks and Brownian motion02Probability spaces, σ-algebras and random variables03Filtrations, adapted processes and stopping times04Conditional expectation and martingales05Properties of Brownian motion06The reflection principle and first passage times07The Brownian bridge08The Itô integral09Itô's lemma10Kolmogorov equations and the Feynman–Kac formula11Change of measure and Girsanov's theorem12Monte Carlo option pricing13Simulating SDEs: the Euler–Maruyama scheme14Mean reversion: Ornstein–Uhlenbeck and Vasicek15Jumps and the Merton jump-diffusion model
Knowledge graph

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Guide/Fixed income

Spot rates, forward rates and the yield curve

Lesson 4 of 8 · 1 min read

In "Bond prices and yields" every cash flow of a bond was discounted at one rate, its yield to maturity. In real markets money lent for one year and money lent for ten years earn different rates. This lesson gives each maturity its own rate, the spot rate, shows how to read spot rates off bond prices, and derives the forward rates they imply. It builds on "Interest, compounding and discounting" and "Duration and convexity".

Yields as averages of rates

Two bonds with different coupons but the same maturity usually have different yields to maturity, even from the same issuer. The reason is that a yield is an average: it blends the rates for all the payment dates of that particular bond, weighted by its cash flows. A coupon payment due in year 1 should be worth the same whichever bond it comes from, so it is cleaner to attach a rate to each payment date rather than to each bond.

Spot rates and discount factors

The spot rate r(t)r(t)r(t) (also called the zero rate) is the yield of a zero-coupon bond maturing at ttt: the rate for borrowing or lending from today until ttt with a single repayment. In this lesson spot and forward rates are continuously compounded, so the price today of 1 paid at ttt, the discount factor, is

P(0,t)=e−r(t) t,r(t)=−ln⁡P(0,t)t.P(0,t) = e^{-r(t)\,t}, \qquad r(t) = -\frac{\ln P(0,t)}{t}.P(0,t)=e−r(t)t,r(t)=−tlnP(0,t)​.

The function t↦r(t)t \mapsto r(t)t↦r(t) is the yield curve (or term structure of interest rates). The discount factors carry the same information; the rates are just easier to compare across maturities.

Pricing a coupon bond with spot rates

A coupon bond is a bundle of zero-coupon bonds, one for each payment. If CFtCF_tCFt​ is paid at year ttt, each cash flow is discounted at the spot rate for its own date:

P=∑t=1TCFt e−r(t) t.P = \sum_{t=1}^{T} CF_t\, e^{-r(t)\,t}.P=t=1∑T​CFt​e−r(t)t.

If the curve is flat, r(t)=rr(t) = rr(t)=r for every ttt, this collapses to discounting at a single rate, and the yield of every bond is the same. Otherwise the yield to maturity of a bond is the one rate that reproduces this price, a cash-flow-weighted blend of the spot rates.

Bootstrapping

Zero-coupon bonds do not exist for every maturity, so spot rates are usually extracted from coupon bond prices one maturity at a time, starting at the short end. This is called bootstrapping. We use annual coupons (with F=100F = 100F=100), solve for discount factors, which do not depend on any compounding convention, and only then convert them into continuously compounded spot rates.

Suppose the market quotes a 1-year zero-coupon bond at 97.00 and a 2-year bond with a 5% annual coupon at 101.00.

  1. The 1-year zero gives P(0,1)=97.00/100=0.9700P(0,1) = 97.00/100 = 0.9700P(0,1)=97.00/100=0.9700, so r(1)=−ln⁡0.97≈3.05%r(1) = -\ln 0.97 \approx 3.05\%r(1)=−ln0.97≈3.05%.
  2. The 2-year bond pays 5 at year 1 and 105 at year 2. The first payment is already priced by step 1: 101.00=5⋅0.9700+105 P(0,2)101.00 = 5 \cdot 0.9700 + 105\,P(0,2)101.00=5⋅0.9700+105P(0,2), so P(0,2)=96.15/105≈0.9157P(0,2) = 96.15/105 \approx 0.9157P(0,2)=96.15/105≈0.9157 and r(2)=−12ln⁡0.9157≈4.40%r(2) = -\tfrac{1}{2}\ln 0.9157 \approx 4.40\%r(2)=−21​ln0.9157≈4.40%.

With more bonds the procedure continues the same way: at each maturity only one discount factor is unknown. With these two spot rates a 2-year bond with a 6% coupon must cost 6⋅0.9700+106⋅0.9157≈102.896 \cdot 0.9700 + 106 \cdot 0.9157 \approx 102.896⋅0.9700+106⋅0.9157≈102.89; any other price would let you build it more cheaply from the two quoted bonds. Its yield to maturity (annual compounding) is about 4.46%, a blend of the two spot rates.

Forward rates

A forward rate f(t1,t2)f(t_1, t_2)f(t1​,t2​) is the rate, fixed today, for borrowing or lending between two future dates t1<t2t_1 < t_2t1​<t2​. No arbitrage pins it down from the spot curve. Compare two ways of investing 1 from today until t2t_2t2​:

  • invest directly at the spot rate r2=r(t2)r_2 = r(t_2)r2​=r(t2​), which grows to er2t2e^{r_2 t_2}er2​t2​;
  • invest until t1t_1t1​ at r1=r(t1)r_1 = r(t_1)r1​=r(t1​), and agree today to reinvest from t1t_1t1​ to t2t_2t2​ at f(t1,t2)f(t_1,t_2)f(t1​,t2​), which grows to er1t1 ef(t1,t2)(t2−t1)e^{r_1 t_1}\,e^{f(t_1,t_2)(t_2 - t_1)}er1​t1​ef(t1​,t2​)(t2​−t1​).

Both strategies are riskless and cost 1 today, so by the argument of "Arbitrage and the forward price" they must deliver the same amount. Equating the exponents gives

f(t1,t2)=r2t2−r1t1t2−t1.f(t_1, t_2) = \frac{r_2 t_2 - r_1 t_1}{t_2 - t_1}.f(t1​,t2​)=t2​−t1​r2​t2​−r1​t1​​.

The forward rate between t1t_1t1​ and t2t_2t2​ is the rate that makes rolling over at t1t_1t1​ equivalent to investing until t2t_2t2​ at once: f(t1,t2)=(r2t2−r1t1)/(t2−t1)f(t_1,t_2) = (r_2t_2 - r_1t_1)/(t_2 - t_1)f(t1​,t2​)=(r2​t2​−r1​t1​)/(t2​−t1​).

In the bootstrapping example, f(1,2)=2⋅4.40%−3.05%≈5.76%f(1,2) = 2 \cdot 4.40\% - 3.05\% \approx 5.76\%f(1,2)=2⋅4.40%−3.05%≈5.76%. Check: e0.0305e0.0576≈e2⋅0.0440≈1.092e^{0.0305}e^{0.0576} \approx e^{2 \cdot 0.0440} \approx 1.092e0.0305e0.0576≈e2⋅0.0440≈1.092.

The instantaneous forward curve

Let t2t_2t2​ shrink towards t1=tt_1 = tt1​=t. The numerator is the change in r(t) tr(t)\,tr(t)t, so the limit is a derivative, the instantaneous forward rate:

f(t)=ddt(r(t) t)=r(t)+t r′(t).f(t) = \frac{d}{dt}\big(r(t)\,t\big) = r(t) + t\,r'(t).f(t)=dtd​(r(t)t)=r(t)+tr′(t).

This explains how the two curves sit relative to each other. Where the spot curve rises (r′(t)>0r'(t) > 0r′(t)>0), the forward curve lies above it; where the spot curve falls, the forward curve lies below; where the spot curve is flat, the two coincide. A fair picture is a running average: the spot rate r(t)r(t)r(t) is the average of the forward rates from 0 to ttt, so it only goes up when the new rate being added is above the current average.

Shapes of the yield curve

  • Upward sloping (normal): long rates above short rates. The most common shape.
  • Flat: about the same rate at all maturities; the single-yield world of "Bond prices and yields".
  • Inverted: short rates above long rates, often seen when markets expect rates to be cut.
  • Humped: rates rise over the first few years and then fall back.

The figure draws a smooth three-parameter spot curve (continuously compounded) from 0 to 30 years, with the instantaneous forward curve implied by it. The level is the long-term rate the curve settles at, the slope sets how far the short end lies below (negative) or above (positive) that level, and the hump adds a bump at intermediate maturities. The readouts show the 2-, 10- and 30-year spot rates and the 10-year minus 2-year spread. At the defaults the curve slopes upward: about 3.00% at 2 years, 3.79% at 10 years and 3.93% at 30 years, a spread of about 79 basis points, and the forward curve runs above the spot curve. Make the slope positive to invert the curve and note that the forward curve drops below the spot curve; set slope and hump to 0 and the two curves coincide.

Spot and forward rate curvesOpen in Yield Curve →
4.00%
00.08
-2.00%
-0.040.04
1.00%
-0.040.04
Spot rate r(t)Forward rate f(t)
2-year spot
3.00%
10-year spot
3.79%
30-year spot
3.93%
10y − 2y
79 bp

Summary

  • The spot rate r(t)r(t)r(t) is the rate on a zero-coupon loan to ttt; with continuous compounding the discount factor is e−r(t)te^{-r(t)t}e−r(t)t.
  • A coupon bond is priced by discounting each cash flow at the spot rate for its date; its yield to maturity is a blend of these rates.
  • Bootstrapping recovers discount factors one maturity at a time from coupon bond prices.
  • No arbitrage gives forward rates f(t1,t2)=(r2t2−r1t1)/(t2−t1)f(t_1,t_2) = (r_2t_2 - r_1t_1)/(t_2 - t_1)f(t1​,t2​)=(r2​t2​−r1​t1​)/(t2​−t1​); the forward curve lies above the spot curve where the spot curve rises and below it where it falls.
Try itFit and reshape a yield curve in the Yield Curve lab →
← PreviousImmunization and duration matchingNext →Bond futures and the cheapest-to-deliver
Connections
Spot rates, forward rates and the yield…
Open the full graph →
Labs for this lesson
Yield CurveTreasury Futures Lab