Post Reply 
PC-1211, PC-1250, etc. TVM
06-11-2024, 03:32 PM (This post was last modified: 06-12-2024 03:38 PM by Albert Chan.)
Post: #38
RE: PC-1211, PC-1250, etc. TVM
(06-02-2024 11:18 PM)Albert Chan Wrote:  
(06-02-2024 06:37 PM)Albert Chan Wrote:  rate = pmt/(x-pv)
f = x + (PV+FV) / ((1+rate)^N-1) = 0      // flatten curve to make Newton's method efficient
...
Interestingly, converge rate seems to match NPMT formula with Newton's method.

I just checked. Barring rounding errors, both ways are equivalent!

I found a more elegant proof, using reciprocal rate r = 1/i = (x-pv)/pmt

x2 = x - f / (df/dx)
(pmt*r2 + pv) = (pmt*r + pv) - f / (df/dr / pmt)
r2 = r - f / (df/dr)

Both are equivalent. We just need to show one has same convergence rate as npmt.

f(r) = (pmt*r + pv) + (pv+fv) / ((1+1/r)^n-1)

Compare this to g = npmt function (terms rearranged to make pattern clearer)

g(i) = (pmt + pv*i) + (pv+fv) / ((1+i)^n-1) * i

We have f = r*g. Let fp = df/dr, gp = dg/di

fp = d(r*g)/dr = (g + r * (dg/di) / (dr/di)) = (g + (1/i) * gp * (-i^2)) = (g - i*gp)

Newton iteration for next estimate:

r2 = r - f/fp = 1/i - (g/i) / (g - i*gp) = 1 / (i - g/gp) = 1 / i2      QED

f(r) = (pmt*r + pv) + (pv+fv) / ((1+1/r)^n-1)

Bonus trivia, from recipocal rate formula, f(1/i) = npmt(i)/i
n assumed positive. If not, we can use time-symmetry: {n,pv,fv} --> {-n,-fv,-pv}

f(r = -1) = limit(npmt(i)/i, i = -1) = (pmt*-1+pv) + (pv+fv)/(∞^-n-1) = (-fv-pmt)
f(r = 0) = limit(npmt(i)/i, i = +∞) = (pmt*0+pv) + (pv+fv)/(∞^n-1) = pv

For extreme rate, npmt(i) is basically linear, slope = (pv if n>0 else -fv)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
PC-1211, PC-1250, etc. TVM - Dave Britten - 03-30-2021, 04:58 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 03-30-2021, 05:07 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 04-01-2021, 05:50 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 05-29-2024, 09:17 PM
RE: PC-1211, PC-1250, etc. TVM - dm319 - 05-31-2024, 01:11 PM
RE: PC-1211, PC-1250, etc. TVM - Albert Chan - 06-11-2024 03:32 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-01-2024, 01:07 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-02-2024, 09:46 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-03-2024, 06:44 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-04-2024, 12:26 AM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-04-2024, 11:35 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-05-2024, 07:16 PM
RE: PC-1211, PC-1250, etc. TVM - dm319 - 06-05-2024, 10:06 PM
RE: PC-1211, PC-1250, etc. TVM - dm319 - 06-06-2024, 11:02 PM
RE: PC-1211, PC-1250, etc. TVM - dm319 - 06-08-2024, 06:19 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-08-2024, 09:21 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-09-2024, 12:06 AM
RE: PC-1211, PC-1250, etc. TVM - rprosperi - 06-09-2024, 01:22 PM
RE: PC-1211, PC-1250, etc. TVM - nickapos - 06-12-2024, 05:20 AM
RE: PC-1211, PC-1250, etc. TVM - dm319 - 06-06-2024, 11:34 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-07-2024, 02:30 AM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-08-2024, 08:38 PM
RE: PC-1211, PC-1250, etc. TVM - dm319 - 06-09-2024, 10:12 AM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-11-2024, 07:13 PM
RE: PC-1211, PC-1250, etc. TVM - dm319 - 06-11-2024, 10:32 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-12-2024, 12:29 AM
RE: PC-1211, PC-1250, etc. TVM - dm319 - 06-12-2024, 12:45 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-12-2024, 04:58 PM
RE: PC-1211, PC-1250, etc. TVM - dm319 - 06-22-2024, 12:12 PM
RE: PC-1211, PC-1250, etc. TVM - robve - 06-22-2024, 08:39 PM



User(s) browsing this thread: 8 Guest(s)