MathFin
Map / Valuation · Interest rates / MathFin.Models.Rates.ZCB

Fixed-income basics under a deterministic short rate

MathFin.Models.Rates.ZCBJEL G12MSC 91G30 source

Closed-form identities for a zero-coupon bond with continuous compounding under a constant short rate r:

B(t, T) = exp(-(r · (T - t))).

Main definitions

  • zcb: the continuous-compounding zero-coupon bond price zcb r t T = exp (-(r * (T - t))) under a constant short rate r.

Main results

  • zcb_at_maturity: B(T, T) = 1.
  • zcb_pos: B(t, T) > 0; positivity proves it (evalZcb).
  • zcb_zero_natCast: at integer dates the bond is the geometric discount factor, B(0, k) = (e^{-r})^k.
  • zcb_yield_eq_rate: under a constant r, the yield-to-maturity equals r.
  • hasDerivAt_zcb_r: ∂_r B(t, T) = -(T - t) · B(t, T) — the bond duration is the time-to-maturity.
  • zcb_duration_eq_time_to_maturity: -∂_r B / B = T - t.
  • hasDerivAt_deriv_zcb_r: ∂²_r B(t, T) = (T - t)² · B(t, T).
  • zcb_convexity_eq_time_to_maturity_sq: convexity ∂²_r B / B = (T - t)².

The model is purely deterministic; the Vasicek / CIR / HJM stochastic versions would need Itô calculus. zcb r t T is the library's bond price Contracts.bondPrice at the curve e^{−rs} (Rates.bondPrice_exp_eq_zcb), and the market's price at t of one unit paid at T whenever the numéraire is e^{rt} (Rates.priceAt_pay_eq_zcb, both in Models/Rates/DeterministicMarket.lean). It is defined here as the formula, on real dates.

References

  • J. C. Hull, Options, Futures, and Other Derivatives [Hull], 4.2; 4.8; 4.9

Tags

zero-coupon bond, bond duration, bond convexity, constant short rate, yield to maturity, JEL G12, MSC 91G30

Import neighbourhood

Above: what it imports. Below: what imports it.

Corpus entries

mf-zcb-maturity · interest_rates.json · full statement
Zero-Coupon Bond at Maturity

ZCB pays par at maturity: B(T, T) = exp(0) = 1.

mf-zcb-yield · interest_rates.json · full statement
Zero-Coupon Bond Yield Identity

Under a constant short rate r, the yield-to-maturity of a continuously-compounded ZCB equals r: -log(B(t,T))/(T-t) = r.

mf-zcb-duration · interest_rates.json · full statement
Zero-Coupon Bond Duration = Time to Maturity

ZCB Macaulay duration equals remaining time: -∂_r B(t,T) / B(t,T) = T - t.

mf-zcb-convexity · interest_rates.json · full statement
Zero-Coupon Bond Convexity = (Time to Maturity)²

ZCB convexity equals squared remaining time: ∂²_r B(t,T) / B(t,T) = (T - t)².

Declarations 10

defMathFin.zcbsource
ℝ → ℝ → ℝ → ℝ

Continuous-compounding zero-coupon bond price under a constant short rate.

theoremMathFin.zcb_at_maturitysource
∀ (r T : ℝ), zcb r T T = 1

The bond pays 1 at maturity.

theoremMathFin.zcb_possource
∀ (r t T : ℝ), 0 < zcb r t T

The bond is positive. positivity proves it (evalZcb).

theoremMathFin.zcb_zero_natCastsource
∀ (r : ℝ) (k : ℕ), zcb r 0 ↑k = Real.exp (-r) ^ k

At integer dates the bond is the geometric discount factor: B(0, k) = (e^{-r})^k.

theoremMathFin.zcb_yield_eq_ratesource
∀ {r t T : ℝ}, t < T → -Real.log (zcb r t T) / (T - t) = r

Yield-to-maturity for a ZCB under a constant rate equals the rate.

theoremMathFin.hasDerivAt_zcb_rsource
∀ (t T r : ℝ), HasDerivAt (fun r' => zcb r' t T) (-(T - t) * zcb r t T) r

∂_r B(t, T) = -(T - t) · B(t, T). Duration of a ZCB equals time-to-maturity.

theoremMathFin.zcb_duration_eq_time_to_maturitysource
∀ (t T r : ℝ), -deriv (fun r' => zcb r' t T) r / zcb r t T = T - t

ZCB Macaulay duration equals time-to-maturity: -∂_r B / B = T - t.

theoremMathFin.hasDerivAt_deriv_zcb_rsource
∀ (t T r : ℝ), HasDerivAt (deriv fun r' => zcb r' t T) ((T - t) ^ 2 * zcb r t T) r

∂²_r B(t, T) = (T - t)² · B(t, T), for the price itself: ∂_r B = -(T - t) · B at every rate (hasDerivAt_zcb_r).

theoremMathFin.zcb_convexity_eq_time_to_maturity_sqsource
∀ (t T r : ℝ), deriv (deriv fun r' => zcb r' t T) r / zcb r t T = (T - t) ^ 2

ZCB convexity = squared time-to-maturity: ∂²_r B / B = (T - t)².

defMathlib.Meta.Positivity.evalZcbsource
Mathlib.Meta.Positivity.PositivityExt

Extension for the positivity tactic: a zero-coupon bond price zcb r t T is positive.