Post Reply 
TVM solve for interest rate, revisited
06-21-2024, 03:11 PM (This post was last modified: 06-21-2024 08:42 PM by Albert Chan.)
Post: #50
RE: TVM solve for interest rate, revisited
Last example, if we set P=0.01, big edge = 100%, center about 50%
Both guesses will cause S=EXPM1(LOGP1(I)*N) to overflow.
This does not mean algorithm is wrong ... we just need a better FNF, for big rate.

FNF=((P+F)/S+P)*I+M --> S=inf --> FNF=P*I+M

< 40 S=EXPM1(LOGP1(I)*N)
> 40 S=EXPM1(LOGP1(I)*N) @ IF S>9E499 THEN D=P @ FNF=D*I+M @ END

>run
B,N,P,M,F? 0,365*24*60,0.01,-0.01,5260.382426
Code:
 49.9999049499       WRN L40:Overflow
-5.00000950501E-3
WRN L40:Overflow
 100                  0
WRN L40:Overflow
 100                  0

How do I remove WRN L40:Overflow?
Is there exception handling (like Python), for HP71B?



100% rate? Yes! Every period, 1 penny loan doubled to 2, paid back 1

With exact 100% rate, we still owe 1 penny at the end (fv = -0.01)
But we have credit balance instead --> rate i = 1 - ε, ε>0

Split loan
Code:
    PV      PMT     FV
#1  0.01+x  -0.01   -0.01-x         // i = 0.01/(0.01+x)
#2  -x      0       5260.392426+x   // x*(1+i)^n = 5260.392426+x --> x = 5260.392426/((1+i)^n-1)

#1: x=0 --> i = 1
#2: i=1 --> x = 5260.392426/(2^525600-1) ≈ 2^-525587.64

i = 0.01/(0.01+x) = 1/(1+100x) ≈ 1 - 100x ≈ 1 - 2^-525581
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: TVM solve for interest rate, revisited - Albert Chan - 06-21-2024 03:11 PM



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