ZCB pays par at maturity: B(T, T) = exp(0) = 1.
ℝ → ℝ → ℝ → ℝ
Continuous-compounding zero-coupon bond price under a constant short rate.
Closed-form identities for a zero-coupon bond with continuous compounding under a constant short rate r:
B(t, T) = exp(-(r · (T - t))).
zcb: the continuous-compounding zero-coupon bond price zcb r t T = exp (-(r * (T - t))) under a constant short rate r.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.
zero-coupon bond, bond duration, bond convexity, constant short rate, yield to maturity, JEL G12, MSC 91G30
Above: what it imports. Below: what imports it.
ZCB pays par at maturity: B(T, T) = exp(0) = 1.
Under a constant short rate r, the yield-to-maturity of a continuously-compounded ZCB equals r: -log(B(t,T))/(T-t) = r.
ZCB Macaulay duration equals remaining time: -∂_r B(t,T) / B(t,T) = T - t.
ZCB convexity equals squared remaining time: ∂²_r B(t,T) / B(t,T) = (T - t)².
ℝ → ℝ → ℝ → ℝ
Continuous-compounding zero-coupon bond price under a constant short rate.
∀ (r T : ℝ), zcb r T T = 1
The bond pays 1 at maturity.
∀ (r t T : ℝ), 0 < zcb r t T
The bond is positive. positivity proves it (evalZcb).
∀ (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.
∀ {r t T : ℝ}, t < T → -Real.log (zcb r t T) / (T - t) = rYield-to-maturity for a ZCB under a constant rate equals the rate.
∀ (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.
∀ (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.
∀ (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).
∀ (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)².
Mathlib.Meta.Positivity.PositivityExt
Extension for the positivity tactic: a zero-coupon bond price zcb r t T is positive.