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

Periodic compounding against the continuously compounded bond

MathFin.Models.Rates.PeriodicCompoundingMSC 91G30JEL G12 source

An account that accrues simple interest y per period and reinvests it grows like (1 + y) ^ n over n periods. This file places that geometric growth next to the library's continuously compounded zero-coupon bond zcb r t T = exp (−r (T − t)) (Models/Rates/ZCB.lean), in three statements:

  • one_add_pow_mul_zcb_log: compounding at y > −1 per period is exactly continuous compounding at the equivalent rate log (1 + y), with time measured in periods: discounting the grown balance by zcb (log (1 + y)) 0 n returns the initial balance. This is the conversion R_c = m · log (1 + R_m / m) with m = 1.
  • one_add_mul_pow_le_inv_zcb: at the same nominal rate r, n periods of length t (with r t ≥ −1) never out-accrue continuous compounding over the elapsed time n · t: (1 + r t)^n ≤ 1 / zcb r 0 (n t) (from 1 + x ≤ exp x).
  • tendsto_one_add_div_pow_inv_zcb: splitting a horizon T into n equal periods, (1 + r T / n) ^ n → 1 / zcb r 0 T = exp (r T) (Mathlib's Real.tendsto_one_add_div_pow_exp).

eq_mul_pow_of_succ is the closed form of the recurrence I (n + 1) = I n · c that every per-period accrual index satisfies. The DeFi protocol modules (Markets/DeFi/Compound, Markets/DeFi/Dai, Markets/DeFi/Aave) instantiate these lemmas for their accrual indices.

Main results

  • eq_mul_pow_of_succ: if I (n + 1) = I n · c for every n, then I n = I 0 · c ^ n.
  • one_add_pow_mul_zcb_log: for y > −1, (1 + y) ^ n · zcb (log (1 + y)) 0 n = 1, so periodic compounding at y is continuous compounding at the rate log (1 + y).
  • one_add_mul_pow_le_inv_zcb: for r t ≥ −1, (1 + r t) ^ n ≤ (zcb r 0 (n t))⁻¹.
  • tendsto_one_add_div_pow_inv_zcb: (1 + r T / n) ^ n tends to (zcb r 0 T)⁻¹ = exp (r T) as n → ∞.

References

  • J. C. Hull, Options, Futures, and Other Derivatives [Hull], §4.2 (measuring interest rates; continuous compounding and the conversion between compounding frequencies).

Tags

compound interest, continuous compounding, periodic compounding, effective rate, zero-coupon bond, exponential limit, MSC 91G30, JEL G12

Import neighbourhood

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

Declarations 4

theoremMathFin.eq_mul_pow_of_succsource
∀ {I : ℕ → ℝ} {c : ℝ}, (∀ (n : ℕ), I (n + 1) = I n * c) → ∀ (n : ℕ), I n = I 0 * c ^ n

The closed form of a per-period accrual index: if I (n + 1) = I n · c for every n, then I n = I 0 · c ^ n.

theoremMathFin.one_add_pow_mul_zcb_logsource
∀ {y : ℝ}, -1 < y → ∀ (n : ℕ), (1 + y) ^ n * zcb (Real.log (1 + y)) 0 ↑n = 1

Per-period compounding is continuous compounding at the equivalent rate. With time measured in periods, compounding at y > −1 per period for n periods and then discounting by the zero-coupon bond at the continuously compounded rate log (1 + y) returns exactly one: (1 + y) ^ n · zcb (log (1 + y)) 0 n = 1.

theoremMathFin.one_add_mul_pow_le_inv_zcbsource
∀ {r t : ℝ}, -1 ≤ r * t → ∀ (n : ℕ), (1 + r * t) ^ n ≤ (zcb r 0 (↑n * t))⁻¹

Periodic compounding never out-accrues continuous compounding at the same rate. For n periods of length t at the nominal rate r (with r t ≥ −1), (1 + r t) ^ n ≤ 1 / zcb r 0 (n t) = exp (r · n t), since 1 + x ≤ exp x.

theoremMathFin.tendsto_one_add_div_pow_inv_zcbsource
∀ (r T : ℝ), Filter.Tendsto (fun n => (1 + r * T / ↑n) ^ n) Filter.atTop (nhds (zcb r 0 T)⁻¹)

Continuous compounding is the limit of periodic compounding. Splitting the horizon T into n equal periods at the nominal rate r, the accrual factor (1 + r T / n) ^ n tends to 1 / zcb r 0 T = exp (r T).