Post Reply 
17BII, 27S: doing TVM calculations inside solver equations
04-30-2019, 03:04 PM
Post: #1
17BII, 27S: doing TVM calculations inside solver equations
For whatever reason, the 17BII and 27S don't seem to have solver functions for calculating TVM variables, while the 19BII has N(), I%YR(), PV(), PMT(), and FV().

Is there any good way to mimic those functions inside a solver equation on the models that don't have them? I have a formula where I need to be able to calculate both N (where FV=0; PV, PMT, and I% are nonzero), and subsequently FV (using a new value for N) as part of the intermediate results. Do I just need to rearrange the TVM formula given in the manual's appendix?
Visit this user's website Find all posts by this user
Quote this message in a reply
04-30-2019, 07:44 PM
Post: #2
RE: 17BII, 27S: doing TVM calculations inside solver equations
(04-30-2019 03:04 PM)Dave Britten Wrote:  Do I just need to rearrange the TVM formula given in the manual's appendix?

Probably the best way is just that. Access to the TVM functions in the solver is the key feature that separates the 19B/19BII (don' recall about 18C, but probably it has them too) from all the 17's and 27S. I suppose the Memo function (and truly much easier to use alpha keyboard) is generally seen as the 19B family 'killer app' but only until you try to use it much.

IIRC, even using the provided formulas will produce slightly different results than manually using the built-in TVM, probably because the TVM code has some twekas for corner cases, and preserves accuracy in iterative calculations.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
04-30-2019, 08:21 PM
Post: #3
RE: 17BII, 27S: doing TVM calculations inside solver equations
(04-30-2019 07:44 PM)rprosperi Wrote:  IIRC, even using the provided formulas will produce slightly different results than manually using the built-in TVM, probably because the TVM code has some twekas for corner cases, and preserves accuracy in iterative calculations.

The main issue would be trying to solve for n, since the TVM formula uses USPV(i%:n) and SPPV(i%:n) internally. I'm thinking it's probably more trouble than it's worth to make this work on a 27S, and I'm better off sticking to true programmable financial calculators - like my DM42 or Casio fc-200 - for this kind of interest savings problem.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-30-2019, 08:32 PM (This post was last modified: 04-30-2019 08:32 PM by Csaba Tizedes.)
Post: #4
RE: 17BII, 27S: doing TVM calculations inside solver equations
1.) If you solve the TVM equation for N and your FV is zero why the FV will change when you calculated FV using the new N?
2.) I do not really understand your question:
(04-30-2019 03:04 PM)Dave Britten Wrote:  ... calculating TVM variables ... OR ... mimic those functions?
Because 17BII has TVM functions in Solver and the Appendix B of Manual TVM section includes the calculation (with USPV and SPPV). Type in the Solver and use it - or use the TVM menu.

(I guess I do not understand something - an example here, please!)

Csaba
Find all posts by this user
Quote this message in a reply
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 }
01▸LBL "PAYDOWN"
02 STO "_A" {Save the pay-down amount}
03 XEQ "SS" {Save the stack}
04 RCL "PV"
05 STO "_PV" {Save the old value of PV}
06 X<>Y {Subtract the pay-down amount from PV...}
07 -
08 STO "PV" {...and update PV}
09 RCL "N"
10 STO "_N" {Save the old value of N...}
11 XEQ "N" {...and recalculate N with the new lower balance}
12 IP
13 STO "N" {Only keep the number of whole payments}
14 RCL "FV"
15 STO "_FV" {Save the old value of FV...}
16 XEQ "FV" {...and recalculate FV with the smaller principal and number of payments}
17 RCL "PMT"
18 RCL× "_N" {Calculate total amount paid on the old loan balance}
19 RCL "PMT"
20 RCL× "N"
21 RCL+ "FV"
22 RCL "FV"
23 RCL× "I%YR"
24 RCL÷ "P/YR"
25 100
26 ÷
27 +
28 RCL- "_A" {Calculate total amount paid on the new loan balance}
29 - {Take the difference between the two totals}
30 RCL "_PV" {Restore all the TVM variables' original values}
31 STO "PV"
32 R↓
33 RCL "_FV"
34 STO "FV"
35 R↓
36 RCL "_N"
37 STO "N"
38 R↓
39 CLV "_N" {Clear temp variables}
40 CLV "_PV"
41 CLV "_FV"
42 CLV "_A"
43 XEQ "R_YZTX" {Restore the stack (leave X alone, put old X in L)}
44 END

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.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-01-2019, 02:28 PM (This post was last modified: 05-01-2019 02:36 PM by Csaba Tizedes.)
Post: #6
RE: 17BII, 27S: doing TVM calculations inside solver equations
(05-01-2019 12:58 PM)Dave Britten Wrote:  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.

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.

Two notes to this:
  1. This is total same what I programmed approx 2 months before on my 12C, except your point 3.), because:
  2. In Hungary if you change the number of periods (which is written in your contract) you must to make a new contract (contract modification) - but you have a possibility to pay principal as prepayment. This will reduce your PV but not your N. Of course, your PMT also reduced.


Therefore in real life the good solution to calculate the required periods to reduce the PV below your monthly payment, and then you can pay the whole PV.
So, you need to make a table: 1st Coloumn: Your prepayment (eg. in every 6 periods or every 12 periods), 2nd Coloumn: The required N for reducing PV<=PMT

With this table you can easily decide what is the preferred prepayment or N for you.

Csaba
Find all posts by this user
Quote this message in a reply
05-01-2019, 03:36 PM
Post: #7
RE: 17BII, 27S: doing TVM calculations inside solver equations
(05-01-2019 02:28 PM)Csaba Tizedes Wrote:  Two notes to this:
  1. This is total same what I programmed approx 2 months before on my 12C, except your point 3.), because:
  2. In Hungary if you change the number of periods (which is written in your contract) you must to make a new contract (contract modification) - but you have a possibility to pay principal as prepayment. This will reduce your PV but not your N. Of course, your PMT also reduced.


Therefore in real life the good solution to calculate the required periods to reduce the PV below your monthly payment, and then you can pay the whole PV.
So, you need to make a table: 1st Coloumn: Your prepayment (eg. in every 6 periods or every 12 periods), 2nd Coloumn: The required N for reducing PV<=PMT

With this table you can easily decide what is the preferred prepayment or N for you.

Csaba

Sounds like loans are handled a bit differently between Hungary and the US, then. Whenever I make an extra principal-only payment (which I've done a couple of times), the outstanding balance is directly reduced, but the payment amount doesn't change. This means that the loan will be paid in full sooner, and thus collect less total interest.

When I did this for my mortgage, I had the option of having the loan reamortized to the same length, which would have lowered the monthly payment, but would not have reduced the total interest paid by as much as leaving the payment amount at its original higher value, and settling the loan earlier.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-01-2019, 03:45 PM
Post: #8
RE: 17BII, 27S: doing TVM calculations inside solver equations
(05-01-2019 03:36 PM)Dave Britten Wrote:  Sounds like loans are handled a bit differently between Hungary and the US, then [...]
Yes, but when you prepayed your debt (in Hungary) the remaining loan recalculated and the interest also reduced!
And if your principal is small enough to pay the whole in one amount, the remaining periods interest is zero, of course, no need to pay.

Csaba
Find all posts by this user
Quote this message in a reply
07-06-2019, 01:00 AM
Post: #9
RE: 17BII, 27S: doing TVM calculations inside solver equations
Dave,

wouldn't it be easier to use some of the existing SOLVER examples for Wrap-Around Loans or Extra Payments - or Skipped Lease Payments - as inspirating starting points? (All programs are in the support docs on the Museum DVDs)

Then you can use any point in time during the life of the loan to add an extra payment an calculate your total interest savings.

Best regards,
Peter

(05-01-2019 12:58 PM)Dave Britten Wrote:  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.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-06-2019, 01:53 PM
Post: #10
RE: 17BII, 27S: doing TVM calculations inside solver equations
(07-06-2019 01:00 AM)Peter A. Gebhardt Wrote:  Dave,

wouldn't it be easier to use some of the existing SOLVER examples for Wrap-Around Loans or Extra Payments - or Skipped Lease Payments - as inspirating starting points? (All programs are in the support docs on the Museum DVDs)

Then you can use any point in time during the life of the loan to add an extra payment an calculate your total interest savings.

Best regards,
Peter

That's a good idea, maybe I'll dig into those books and see how they approached it.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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