Documentation

Interest.NFM_cert

Chan & Tse Exercise 1.1 #

Chan & Tse Exercise 1.2 #

theorem neg_log {w : } (h₂ : w 0) (this : 1 - w > 0) :
w < -Real.log (1 - w)

Here we develop interest theory, taking the force of interest δ as basic.

noncomputable def force.a_sub (δ : ) (t τ : ) :
Equations
Instances For
    noncomputable def force.a (δ : ) (t : ) :
    Equations
    Instances For
      noncomputable def force.A (δ : ) (A₀ : ) :
      Equations
      Instances For
        theorem a_zero (δ : ) :
        force.a_sub δ 0 0 = 1
        theorem a_zero' (δ : ) :
        force.a δ 0 = 1

        In name space interest, a(0)=1 was not automatic but here it is:

        Interest namespace will clash with annuity namespaces since they use a for different things.

        def interest.A (A₀ : ) (a : ) :
        Equations
        Instances For
          theorem interest.A_def (A₀ : ) (a : ) (t : ) :
          A A₀ a t = a t * A₀
          def interest.I (A₀ : ) (a : ) :
          Equations
          Instances For
            noncomputable def interest.i₂ (a : ) :

            Effective interest over an interval, not annualized. i₂ u v = (a v - a u) / (a u) This should be used when u ≤ v. See Chan & Tse (1.15).

            One can prove that the limit of i₂ u (u + h) / h as h → 0 is a' u / a u: (a (u+h) - a u) / (h * (a u))

            Equations
            Instances For
              noncomputable def interest.δ (a : ) :

              Force of interest with not necessarily constant interest rates.

              Equations
              Instances For
                noncomputable def interest.i₂ann (a : ) :

                Annualized effective interest over an interval. Equation (1.13) in Chan & Tse.

                Equations
                Instances For
                  noncomputable def interest.iF (a : ) :
                  Equations
                  Instances For
                    noncomputable def interest.i (a : ) :

                    The effective interest rate function i(t) is defined so that a t = (1 + i t) * a (t - 1).

                    Equations
                    Instances For
                      noncomputable def interest.v (a : ) :
                      Equations
                      Instances For
                        theorem interest.chan_tse_exe_1_33 (a : ) (h : ∀ (t : ), a t = 1 / (1 - 1e-2 * t)) (t : ) :
                        v a t = 1 - 1e-2 * t
                        theorem interest.eq_of_deriv_eq (f g : ) (hf : Differentiable f) (hg : Differentiable g) (h : deriv f = deriv g) (h₀ : f 0 = g 0) :
                        f = g
                        theorem interest.solutions_of_deriv_eq_self {f : } (hf : Differentiable f) (h : ∀ (x : ), deriv f x = f x) :
                        ∃ (c : ), ∀ (x : ), f x = c * Real.exp x
                        theorem interest.edist_mul {c : } ( : 0 c) (x y : ) :
                        edist (c * x) (c * y) = ENNReal.ofReal c * edist x y
                        theorem interest.general_force (a : ) (hnz : ∀ (t : ), a t 0) (hdiff : Differentiable a) (ha₀ : a 0 = 1) {n : } (hn : 0 n) (hcontδ : ContinuousOn (δ a) (Set.Ici 0)) ( : t0, 0 < δ a t δ a t 1) (hc₀ : ContinuousAt (δ a) 0) (hme : StronglyMeasurableAtFilter (δ a) (nhds 0) MeasureTheory.volume) :
                        Set.EqOn (fun (t : ) => Real.exp ( (s : ) in 0..t, δ a s)) a (Set.Icc 0 n)

                        The equation a(t) = e^(∫^t δ(s) ds).

                        theorem interest.this_is_proved_instead₀ (a : ) (h : δ a = fun (t : ) => 1 / (10 * (1 + t) ^ 3)) (hnz : ∀ (t : ), a t 0) (hdiff : Differentiable a) (ha₀ : a 0 = 1) (n : ) (hn : 0 n) :
                        Set.EqOn (fun (t : ) => Real.exp ( (s : ) in 0..t, δ a s)) a (Set.Icc 0 n)
                        theorem interest.this_is_proved_instead (a : ) (h : δ a = fun (t : ) => 1 / (10 * (1 + t) ^ 3)) (hnz : ∀ (t : ), a t 0) (hdiff : Differentiable a) (ha₀ : a 0 = 1) :
                        Set.EqOn (fun (t : ) => Real.exp ( (s : ) in 0..t, δ a s)) a (Set.Ici 0)
                        theorem interest.integral_one_div_ten_one_add_pow_three_0_to_5 :
                        (s : ) in 0..5, 1 / (10 * (1 + s) ^ 3) = 1 / 20 * (1 - 1 / 36)
                        theorem interest.integral_one_div_ten_one_add_pow_three_0_to_4 :
                        (s : ) in 0..4, 1 / (10 * (1 + s) ^ 3) = 1 / 20 * (1 - 1 / 25)
                        theorem interest.chan_tse_exe_1_36 (A₀ : ) (a : ) (h : δ a = fun (t : ) => 1 / (10 * (1 + t) ^ 3)) (h₀ : A₀ = 100) (hnz : ∀ (t : ), a t 0) (hdiff : Differentiable a) (ha₀ : a 0 = 1) :
                        I A₀ a 5 Set.Ioo 64e-3 65e-3