Looking for TVM contributions
|
06-13-2024, 09:28 PM
(This post was last modified: 06-25-2024 10:32 PM by Albert Chan.)
Post: #40
|
|||
|
|||
RE: Looking for TVM contributions
(06-12-2024 08:48 PM)robve Wrote: | 11 | robve | 60x24x365 | 1/6% → ? | 0 | -0.01 | ?→ FV | =N | yes | (06-12-2024 11:56 PM)dm319 Wrote: Very interesting! Weird how they can be similar and so different, and what is going on with 11?! Initial guess (hard coded?) may be too high for the problem. Edge guess is not the best, but will converge without issue. Plus42 does not allow user-input rate guess on purpose! lua> n = 365*24*60 -- = 525600 lua> i = 1/(600*n) -- = 3.1709791983764586e-09 lua> fv = tvm(n,i,0,-1,nil) lua> fv -- unit = cents 526038.2426000326 lua> tvm(n,nil,0,-1,fv) * n -- APR 0.0016666666666665247 Or, we can use a quickie formula (04-09-2022 05:47 PM)Albert Chan Wrote: \(\displaystyle I ≈ \frac{1}{P} - \frac{P}{N^2}\) P = -PV/PMT, so we apply time reversal, to FV/PMT. (negated N make no difference here) 1/P is edge rate, time reversal simply switched to other edge. lua> p = -fv lua> n/p - p/n -- APR estimate 0.001666895167500626 What if we supply a guess, say 0.1% ? lua> tvm(n,1e-3,0,-1,fv, true) 0.001 -1 -5.137033888903107e+219 -nan -nan -nan false Why does it fail? Because we use Newton's method from the wrong edge! The other edge = pmt/-pv = ∞, but 1e-3 is just as bad. (technically, ∞ is not an edge) (06-11-2024 03:32 PM)Albert Chan Wrote: For extreme rate, npmt(i) is basically linear, slope = (pv if n>0 else -fv) With pv=0, npmt(i) look like L shape. Guess must be from the left of L tvm() rate guess = pmt/fv ≈ -2e-6 For plots, I dropped fractional cents --> fv = 526038 This is what npmt look like from the left, and the right npmt = ((pv+fv)/((1+x)^n-1) + pv)*x + pmt plot 526038*x/((1+x)^525600-1)-1, x=-2e-6 .. 2e-6 plot 526038*x/((1+x)^525600-1)-1, x = 0 .. 1e-3 NPV is not the same as npmt, but same kind of issue apply. NPV = (fv-pmt/x) * ((1+x)^-n-1) + (pv+fv) plot (526038+1/x) * ((1+x)^-525600-1) + 526038, x = -2e-6 .. 2e-6 plot (526038+1/x) * ((1+x)^-525600-1) + 526038, x = 0 .. 1e-3 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)