17BII, 27S: doing TVM calculations inside solver equations
|
05-01-2019, 12:58 PM
(This post was last modified: 05-01-2019 01:02 PM by Dave Britten.)
Post: #5
|
|||
|
|||
RE: 17BII, 27S: doing TVM calculations inside solver equations
I'll explain the specific problem in more detail, in case there's an easier way to do it that doesn't involve TVM.
I'm trying to make a solver formula that will calculate the amount of interest saved over the remaining life of a loan if I were to make an extra principal pay-down of a given size. This is the general calculation process that I use: 1. Make sure N, I%, PV, PMT, and FV reflect the current (or opening) state of the loan. 2. Subtract the extra principal payment from PV, and update PV. 3. Recalculate N to determine the new number of payments remaining to pay off the reduced principal. This will probably be a non-integer value, i.e. an odd payment at the end. 4. Recalculate FV using FLOOR(N) to determine the remaining balance for the final odd period. 5. Calculate the total interest paid on the original principal using the original values in "N*PMT+PV" (gives a negative value representing total interest paid). 6. Calculate the total interest paid on the reduced principal, using the new values of N, PV, and FV in "PMT*FLOOR(N)+FV*(1+I%/100)+PV" (multiplies the payment amount by the number of full payments, and calculates the periodic interest on the final odd period). 7. Subtract the original interest (step 5) from the reduced interest (step 6) to obtain the total savings (a positive number). As an example, suppose you've got a loan with these properties: N=360 I%/YR=4.75% PV=141,000 PMT=-735.52 FV=0 The total interest payments on the loan would be ($123,788.19). If you paid an extra $1,000 in principal, then N becomes 354.41, and the total interest paid is ($120,679.83), giving a total savings of $3,108.36. Here's the program I have on my DM42 for calculating this. It relies on my TVM program, which isn't listed here, but it should be fairly obvious how it's used in this example: XEQ "N" and XEQ "FV" recalculate the respective TVM variables, updating the variable directly, and also leaving the new value in X, lifting the stack. Also, XEQ "SS" is a stack-save routine, and XEQ "R_YZTX" restores the saved stack, but keeps whatever value was in X at the time it's called (represented by the underscore), and puts the old value of X into L (so it's the same stack behavior you would see from single-argument functions like LN). I've added a few comments to the code. Code: 00 { 163-Byte Prgm } I have this algorithm implemented on many different calculators (DM42, HP 200LX solver, Casio fc-200, Casio fx-9860G - both as a program and a spreadsheet, and a version for any old Casio scientific with array memories, covering the fx-7000G through fx-9700GE, which also requires a TVM program I wrote), but it would be nice to have it on my 17BII since it's a financial calculator. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)