Copyright (C) 2002 Glen Kilpatrick
Distributed under GNU General Public License
This program is supplied without representation or warranty of any kind. The author and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.
Hewlett Packard's implementation of the Time Value of Money relies upon the following principles:
The sign convention is that money received is positive, and money paid out is negative. Thus when you borrow money, that's positive, and your payments are negative. The same problem from the borrower's point of view would have the loan be a negative outlay, and the payments received positive.
The time interval between the Present Value and the Future Value must be divided into one or more periods of equal size.
Periodic payments must be of equal size, the same sign, and all occur at either the beginning or the end of the payment period.
If payments are not all equal to each other, then one has a cash flow problem, and this program won't help (but an HP Financial calculator might).
If some payments occur at the beginning of the payment period, and some at the end, or alternately, the time intervals are of unequal size, these problems aren't described by any implementation I know of, and you might require even more than an HP calculator....
This program computes the Time Value of Money on an HP-15C, and contains logic for a payment at the beginning or end of the period. It has a "user interface" similar to that of the HP-12C in that a single push of one of the TVM keys will store the X-register to the TVM variable, and two consecutive pushes will first store a guess, then compute a new value based upon that guess and other previously stored variables.
"FI" Formulae from [HP-41] PPC ROM User's Manual, pgs. 159-163. If anyone can advise who to seek permission from for this, please do so, as I can only give attribution (where attribution's due) when I can determine who to give it to :).
{A|B|C|D|E} stores value of {N|%I|PV|PMT|FV} in 1X1 matrices {A|B|C|D|E}
{RCL A|B|C|D|E} recalls {N|%I|PV|PMT|FV}
{AA|BB|CC|DD|EE} first stores the X-register as a guess, then computes {N|%I|PV|PMT|FV} based on previously stored values.
Flag 7 toggles PMT @ period BEGIN (T=>RAD) or END (F=>{DEG}, invisible), must be toggled via LBL0 {R/S after either initialization (fPRGM,R/S) or {A|B|C|D|E}, store or compute}.
A flashing response to a request to compute I(PMT<>0) merely indicates SOLVE couldn't, not to ten digits, so the function was either relatively flat there, or the problem was ill-conditioned (~CF9 before proceeding). Note this is a general comment on SOLVE; I've never seen this behavior with this application.
Alas, I haven't had an HP-15C for many years. I could supply examples from many sources, but not be certain that any would show you exactly what you'd see IRL (in real life :). However, something official might suffice....
An example derived from the HP-10B's Owner's Manual (Edition 6, Part Number 00010-90037, November 1994), "5: Time Value of Money Calculations", page 53 (modified as to format, and to show key sequences on the HP-15C):
Example: A Car Loan. You are financing a new car with a three year loan at 10.5% annual nominal interest, compounded monthly. The price of the car is $7,250. Your down payment is $1,500. Part 1. What are your monthly payments at 10.5% interest? (Assume your payments start one month after the purchase or at the end of the first period.) f FIX 2 ---> only to match example f PRGM R/S ---> repeat until RAD is set then unset, to set END mode (payment at then end of the period) 3 ENTER 12 * A ---> stores 3 years 10.5 ENTER 12 / B ---> stores 10.5% per year nominal interest 7250 ENTER 1500 - C ---> stores loan amount (present value) 0 E ---> stores future value (no balloon payment) D D ---> computes monthly payment of -186.89 Part 2. At a price of $7,250.00, what interest rate is necesary to lower your payment by $10.00, to -176.89? RCL D ---> recalls monthly payment to the stack 10 + D ---> decreases it by $10 to -176.89, then stores RCL B B B ---> computes annual nominal interest of 6.75% (the RCL B may not be necessary, but I'm not sure that an initial interest rate of less than zero would be a reasonable guess, and I can't test it myself :) Part 3. If interest is 10.5%, what is the maximum you can spend on the car to lower your payment to $175,00? 10.5 B ---> (re)stores 10.5% annual nominal interest 175 +/- D ---> stores preferred monthly payment RCL C C C ---> computes maximum loan of 5384.21 (likewise) 1500 + ---> adds down payment for maximum purchase price, 6,884.21
where
Read and enter program from left to right, line by line:
000- [comment] MAT0 1 ENTER DIMA DIMB DIMC DIMD DIME STOgA FIX2 MAT1 [F7 toggle/display] LBL0 F?7 SF9 SF7 F?9 CF7 CF9 DEG F?7 RAD R/S GTO0 [N] LBLA STOA R/S GTO0 LBLA GSB3 ENTER RCL-E X<>Y [<> <=> swap] RCL+C / LN EEX 2 CHS RCL*B 1 + LN / GTOA [%I] LBLB STOB R/S GTO0 LBLB RCLD TEST0 GTO4 RCLE RCL/C CHS RCLA 1/X Y^X 1 - EEX 2 * GTOB [PV] LBLC STOC R/S GTO0 LBLC GSB3 GSB1 * RCL+E 1 LSTX + / CHS GTOC [PMT] LBLD STOD R/S GTO0 LBLD GSB2 GSB1 * LSTX 1 + RCL*C RCL+E CHS X<>Y / GTOD [FV] LBLE STOE R/S GTO0 LBLE GSB3 RCL+C GSB1 * RCL+C CHS GTOE [A] LBL1 EEX 2 CHS RCL*B 1 + RCLA Y^X 1 - RTN [B] LBL2 0 F?7 1 RCL*B EEX 2 + RCL/B RTN [C] LBL3 GSB2 RCL*D RTN [I0/100] LBL4 RCLC ABS RCLE ABS + RCLD X<>Y / LSTX RCLA 3 Y^X RCL*D / ABS X<>Y ABS + ENTER SF9 SOLVE5 CF9 EEX 2 * GTOB [I,PMT<>0] LBL5 EEX 2 * STOB GSB3 RCL+C GSB1 * RCL+C RCL+E [load_check:__172-45,40,15<=>gMEM=...29-0] [gak(C)22AUG86]
Labels A->E&0->5; Flags 7&9 (user should ~CF9 before all program requests); Memories 0&1 (=1 at all times); matrices A->E; trig. indicator (display only, user may reset at any time).
Go back to the software library
Go back to the main exhibit hall