Post Reply 
PC-1211, PC-1250, etc. TVM
06-08-2024, 11:47 PM (This post was last modified: 06-11-2024 10:59 PM by Albert Chan.)
Post: #34
RE: PC-1211, PC-1250, etc. TVM
(06-08-2024 09:21 PM)robve Wrote:  If you want another bewildering TVM problem:
B=1 (begin mode)
N=40
PV=900
PMT=1000
FV=-1000
What's the interest rate?

lua> n, pv, pmt, fv = 40, 900, 1000, -1000
lua> pv, fv = pv+pmt, fv-pmt -- Now, b=0
lua> pv, pmt, fv
1900      1000      -2000

Solve with split loan method
f(x) = x + (pv+fv) / ((1+i)^n-1), where i = pmt / (x-pv)
Code:
Loan:  n  pv    pmt  fv
#1:    n  pv-x  pmt  x-pv      --> i = pmt / (x-pv)
#2:    n  x     0    (pv+fv)-x --> x = -(pv+fv) / ((1+i)^n-1)

lua> i = pmt / fv -- "smallest" edge rate = -0.5

With negative i and positive n, ((1+i)^n-1) --> -1, may lose many significant digits
So, we flip for time-reversed setup.

lua> n, pv, fv = -n, -fv, -pv
lua> x = -(pv+fv) / expm1(log1p(i)*n)
lua> x
-9.094947017737554e-11

i = pmt / (x - pv) = (-pmt/pv) / (1 - (x/pv)) ≈ (-pmt/pv) * (1 + (x/pv))

Since -pv was fv before time-reversal, first term is just old i = -0.5
It also mean old x = 0. No more iteration necessary.

lua> i .. ' + ' .. i*(x/pv)
-0.5 + 2.2737367544343885e-14

rate (%) = -49.9999999999977262632455656115



Equivalent way, tvm() to get x*i, divide by pv to get i error

lua> n,i,pv,pmt,fv
-40      -0.5      2000      1000      -1900
lua> tvm(n, i, 0, nil, pv+fv) / pv
2.2737367544343885e-14
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 - 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 - Albert Chan - 06-08-2024 11:47 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: 1 Guest(s)