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

Duration as price sensitivity (first-principles derivation)

MathFin.Models.Rates.DurationSensitivityMSC 91G30JEL G12 source

For a coupon bond with discrete-compounded yield y and cashflows c_i at times t_i ∈ ℕ,

P(y) = Σ c_i / (1 + y)^{t_i}.

The modified duration is D_mod(y) = ModNum(y) / P(y) where ModNum(y) = Σ t_i · c_i / (1 + y)^{t_i + 1}.

The classical sensitivity identity states

dP/dy = -D_mod · P, equivalently P'(y) = -ModNum(y).

Pre-existing content in Models.Rates.MacaulayModified defines bondPriceDisc, macaulayNumerator, modifiedNumerator, and proves the algebraic relation ModNum = MacNum / (1 + y). It does not derive duration as the price derivative — the connection between duration and price sensitivity is exactly the first-principles claim formalized here.

Building blocks

  • hasDerivAt_coupon_term: per-cashflow derivative d/dy [c / (1+y)^n] = -n · c / (1+y)^(n+1).
  • hasDerivAt_bondPriceDisc: sum over cashflows gives dP/dy = -ModNum(y).
  • bondPriceDisc_deriv_eq_neg_modified_duration_times_price: the duration-sensitivity identity in its usual form P'(y) / P(y) = -D_mod(y) (for P(y) ≠ 0).

Main results

  • hasDerivAt_coupon_term: d/dy [c / (1+y)^n] = -n · c / (1+y)^(n+1).
  • hasDerivAt_bondPriceDisc: for 1 + y ≠ 0, the bond price P(y) = Σ c_i / (1 + y)^{t_i} has derivative -ModNum(y) at y.
  • bondPriceDisc_deriv_eq_neg_modified_duration_times_price: for 1 + y ≠ 0, the derivative P' satisfies P' / P(y) = -(ModNum(y) / P(y)), i.e. P'/P = -D_mod.

Tags

modified duration, price sensitivity, interest rate risk, bond duration, yield derivative, coupon bond, MSC 91G30, JEL G12

Import neighbourhood

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

Declarations 3

theoremMathFin.hasDerivAt_coupon_termsource
∀ (c_val : ℝ) (n : ℕ) {y : ℝ}, 1 + y ≠ 0 → HasDerivAt (fun y' => c_val / (1 + y') ^ n) (-(↑n * c_val / (1 + y) ^ (n + 1))) y

Per-cashflow derivative: d/dy [c / (1+y)^n] = -n · c / (1+y)^(n+1).

Proof: chain rule via HasDerivAt.pow on (1 + y')^n, then HasDerivAt.div with a constant numerator. The n = 0 and n ≥ 1 cases are bundled by the final field_simp + ring.

theoremMathFin.hasDerivAt_bondPriceDiscsource
∀ {ι : Type u_1} (s : Finset ι) (t : ι → ℕ) (c : ι → ℝ) {y : ℝ}, 1 + y ≠ 0 → HasDerivAt (bondPriceDisc s t c) (-modifiedNumerator s t c y) y

Bond price has derivative -ModNum(y): the modified duration numerator is the negative slope of the bond price.

Proof: term-by-term derivative via hasDerivAt_coupon_term, summed over the cashflow finset. The sum-of-functions vs function-of-sums identification is handled by Finset.sum_apply.

theoremMathFin.bondPriceDisc_deriv_eq_neg_modified_duration_times_pricesource
∀ {ι : Type u_1} (s : Finset ι) (t : ι → ℕ) (c : ι → ℝ) {y : ℝ}, 1 + y ≠ 0 → ∃ P', HasDerivAt (bondPriceDisc s t c) P' y ∧ P' / bondPriceDisc s t c y = -(modifiedNumerator s t c y / bondPriceDisc s t c y)

Duration-sensitivity identity: P'(y) / P(y) = -D_mod(y), where D_mod = ModNum / P is the modified duration.

This is the operational content of duration: it measures the percentage sensitivity of bond price to yield. Combined with modifiedNumerator_eq_macaulayNumerator_div, gives the standard discrete-compounding identity D_mod = D_Mac / (1 + y).