Documentation

Interest.NFM_duration

Five implicit functions from the Annuity Equation: duration version #

The BA II Plus calculator values PMT, I/Y, N, FV, PV can each be computed from the other four. Here we replace PV by D (duration) for a speculative future calculator.

Main results:

-- * If d>1, n≥2, r>0, i>0 and d<1+1/i then i and n are both computed from -- the others.

noncomputable def D :

Macaulay duration of a maturity n, level-payments bond (with redemption value 1) with coupon rate r and yield rate i.

Equations
Instances For
    theorem D_one {i r : } (hi : i > -1) (hr : r 0) :
    D 1 i r = 1

    A bond with unit redemption value and maturity 1 has Macaulay duration 1.

    theorem D_duration_equation (n : ) {i r : } (hi : i > -1) (hr : r 0) :

    The Macaulay duration does indeed satisfy the duration equation.

    theorem D_upper_bound (n : ) {i r : } (hi : i > -1) (hr : r 0) :
    D n i r n

    The maturity date as a trivial upper bound on the Macaulay duration.

    theorem D_upper_bound_strict (n : ) (hn : n 2) {i r : } (hi : i > -1) (hr : r > 0) :
    D n i r < n
    theorem duration_nonneg (n : ) {i r : } (hi : i > -1) (hr : r 0) :
    0 D n i r

    The duration of a bond is nonnegative.

    theorem par_bond_price (n : ) {i : } (hi : i > 0) :

    An at-par bond with unit (1) redemption value has price 1 as well, no matter what the maturity and interest rates are.

    noncomputable def CPT_N_of_D_par (i d : ) :

    The maturity of an at-par bond with rate i and Macaulay duration d. Note that the input to log is only positive if d < 1 + 1 / i.

    Equations
    Instances For
      theorem eq_CPT_N_of_D_par (n : ) {i : } (hi : i > 0) (d : ) (h : annuity.duration_equation n i i d) :
      n = CPT_N_of_D_par i d

      Determine the maturity from the duration for an at-par bond.

      theorem increasing_annuity_zero {n : } :
      annuity.Ia n 0 = (n + 1) * n / 2

      Present value of an increasing annuity with interest rate 0.

      theorem duration_yield_zero {n : } (hn : n 0) {d r : } (hr : 0 r) (h : annuity.duration_equation n 0 r d) :
      d = (r * (n + 1) * n / 2 + n) / (r * n + 1)

      A pleasant formula for the Macaulay duration of a zero-yield bond in terms of the coupon rate r and maturity n. Note that when r=0 it reduces to d=n.

      theorem annuity_bond_price_ne_zero {n : } (hnn : n > 1) {i r : } (hi : i > -1) (hr : r 0) :
      theorem eq_D_of_duration_equation {n : } (hnn : n > 1) {i d r : } (hi : i > -1) (hr : r 0) (hann : annuity.duration_equation n i r d) :
      d = D n i r
      theorem duration_bounded_by_maturity {n : } (hnn : n > 1) {i d r : } (hi : i > -1) (hr : r 0) (hann : annuity.duration_equation n i r d) :
      d n
      theorem eq_CPT_I_of_D_maturity2 {i d r : } (hi : i > -1) (hd : 1 d) (hri : r > 0) (h : annuity.duration_equation 2 i r d) :
      i = (2 - d) * (r + 1) / ((d - 1) * r) - 1

      For a bond with maturity n=2, explicitly find the yield rate i from the Macaulay duration d and the coupon rate r. For larger n it is not generally uniquely solvable. n=3 might be an interesting quadratic equation. Note that if i=r, (d-1)r = 2-d, i.e., i = (2-d)/(d-1).

      theorem deriv_bond_price_sum {n : } (r x : ) :
      deriv (annuity.bond_price_sum n r) x = r * kFinset.Icc 1 n, k * x ^ (k - 1) + n * x ^ (n - 1)
      theorem eq_CPT_I_of_D {n : } (hnn : n 2) {i d r : } (hd : d Set.Ioo 1 n) (hr : r > 0) :

      Inferring the interest rate from the maturity, duration, and coupon rate. With great help from Aristotle.

      theorem eq_CPT_N_of_D.helper₀ {n : } (hnn : n > 1) {i r : } (hi : i > 0) (hri : r i) :
      (r * kFinset.Icc 1 n, k * (1 + i)⁻¹ ^ k + n * (1 + i)⁻¹ ^ n) / (r * kFinset.Icc 1 n, (1 + i)⁻¹ ^ k + (1 + i)⁻¹ ^ n) < 1 + 1 / i

      Aristotle's proof.

      theorem eq_CPT_N_of_D.helper {n : } (hnn : n > 1) {i d r : } (hi : i > 0) (hri : r i) (hann : annuity.duration_equation n i r d) :
      d < 1 + 1 / i

      Incorporate Aristotle's inequality_proof into our setting.

      noncomputable def CPT_N_of_D {i d r : } (hd : 0 < d) (hi : i > 0) (hr : r > 0) (hdi : d < 1 + 1 / i) :

      This version does not assume r<i or r>i.

      Equations
      Instances For
        theorem equation_presented_to_aristotle {n : } {i d r : } (hi : i > 0) (hann : annuity.duration_equation n i r d) :
        d * (r * ((1 - (1 + i)⁻¹ ^ n) / i) + (1 + i)⁻¹ ^ n) - (r * ((1 + i)⁻¹ * (n * (1 + i)⁻¹ ^ (n + 1) - (n + 1) * (1 + i)⁻¹ ^ n + 1) / ((1 + i)⁻¹ - 1) ^ 2) + n * (1 + i)⁻¹ ^ n) = 0

        A temporary lemma to prove that the equation presented to Aristotle is indeed the duration equation.

        theorem eq_CPT_N_of_D {n : } (hnn : n > 0) {i d r : } (hd : 0 < d) (hi : 0 < i) (hr : 0 < r) (hdi : d < 1 + 1 / i) (hann : annuity.duration_equation n i r d) :
        n = CPT_N_of_D hd hi hr hdi