TVM solve for interest rate, revisited
|
06-10-2022, 08:25 PM
(This post was last modified: 06-11-2022 08:23 PM by Albert Chan.)
Post: #7
|
|||
|
|||
RE: TVM solve for interest rate, revisited
(05-17-2022 01:31 PM)Albert Chan Wrote: f = (pv+fv)/n * g + pv * x + pmt = 0 // same formula used for Plus42 If solution exist, Halley's method seems not to over-shoot, but not yet proved. However, starting from edge, we can proof no over-shoot for Newton's method Proof: f is either concave-up, or concave-down (f'' have same sign) g = n*x / ((1+x)^n-1) = 1 - (n-1)/2*x + (n²-1)/12*x² - (n²-1)/24*x³ + ... For integer n, g is decaying if n>0, growing if n<0 (= compounding factor C) Note: if n=1, g=1; if n=-1, g=1+x ⇒ For n=±1, f is a straight line. g ≥ 1 - (n-1)/2*x // x=0 tangent line, but inequality holds for other x. g + (n-1)/2*x - 1 ≥ 0 // if x=0, g=1 ⇒ LHS=0 g''/g = (g+n*x)*(2*(g-1)+(n-1)*x) / (x+x^2)^2 g'' = g^2 * (1+x)^n * 2 * (g+(n-1)/2*x-1) / (x+x^2)^2 Assume n>1: For -1 < x < ∞, x≠0, RHS all factors are postive ⇒ g'' > 0 Take the limit, g''(x=0) = (n²-1)/6 > 0 g'' is positive thoughtout, except on the edge of x domain: Take the limit, g''(x=-1) = g''(x=∞) = 0 f'' = (pv+fv)/n * g'' → sign(f'') = sign(pv+fv) Update: lua code to automatic rate search, using Newton's 1-sided convergence property. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)