Post Reply 
(17B/19B) GPM: initial payment
05-22-2024, 11:39 AM
Post: #1
(17B/19B) GPM: initial payment
An excerpt from The Graduated Payment Mortgage: Solving the Initial Payment Enigma, , Journal of Real Estate Practice and Education, vol. 1, no. 1, 1998, pp. 67-79 73

APPLICATION OF THE GPM GENERALIZED EQUATION
The generalized GPM equation given in equation (9) is best implemented using a programmable calculator such as the Hewlett Packard (HP) 17B (or HP19B) or a spreadsheet such as Lotus 1-2-3 or Microsoft Excel. For the HP 17B, the user needs to enter into the equation solver in the main menu (SOLVE) and create the following new equation (NEW) as one line (spaces are ignored by SOLVE):
GPM = PV ÷ ((∑(T:1:N-1:1:SPFV(G:T) ÷ SPFV(I:12XT))+1)X
                     USPV((I:12) + SPFV(G:N) ÷ SPFV(I:12XN)X
                     USPV(I:(12XM) - (12XN)))

Once entered correctly, the user should press CALC in the SOLVE menu to verify the equation. The user then enters PV, N, G, i, and M. It should be noted that N and M are in years, G is annual interest rate, and i is a monthly interest rate. As an alternative to the one-step approach, the user can define the term in parentheses as the graduated annuity interest factor (GAIF) and then do a second equation that defines the GPM as PV/GAIF; the HP 17B and HP 19B automatically store the GAIF value from the first step. The advantage of the two-step approach is that the GAIF can be used separately, for example, to find the present value of a loan.

BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
05-24-2024, 07:13 AM (This post was last modified: 05-24-2024 02:41 PM by Werner.)
Post: #2
RE: (17B/19B) GPM: initial payment
[Updated to correct an embarrassing error, that still made the first example work ;-)]
Actually, the summation can also be represented in terms of the 'standard' financial functions.
This is what I came up with, on a real machine should be a lot faster to execute:

PV of 1 year of PMT: PMTY = PMT*USPV(I%/12,12)
First N years: PVN = PMTY + PMTY*(G/F) + PMTY*(G/F)^2 + .. PMTY*(G/F)^(N-1)
  G = 1 + G%/100
  F = 1 + F%/100 effective annual rate = (1 + I%/1200)^12, F% = USFV(I%/12,12)*I%/12
  K = 1 + K%/100 = G/F -> K% = (G% - F%)/F
  then PVN = PMTY*USFV(K%,N)
Remaining M-N years PMTY*(G/F)^N*(1 + 1/F + 1/F^2 + .. 1/F^(M-N-1))
  (G/F)^N = SPFV(K%,N)
  1 + 1/F + .. 1/F^(M-N-1) = USPV(F%,M-N)*F

All combined:

T := USFV(I%/12,12);
F% := T*I%/12;
F := 1 + F%/100;
K% := (G% - F%)/F;
PV := PMT*USPV(I%/12,12)*(USFV(K%,N) + SPFV(K%,N)*USPV(F%,M-N)*F);

remark that

             (1+I%/100)^N - 1
USFV(I%,N) = ----------------
                I%/100

             1 - (1+I%/100)^-N
USPV(I%,N) = ----------------
                I%/100


so USPV(I%,N) = USFV(I%,N)/(1+I%/100)^N

given that F = (1+I%/1200)^12
then USPV(I%/12,12) = T/F
and

PV := PMT*T*(USFV(K%,N)/F + SPFV(K%,N)*USPV(F%,M-N));

or, as a 17BII/Plus42 equation, and using the sign convention:
Code:
GPM:0×L(F:1+L(F%:L(T:USFV(I%÷12:12))×I%÷12)÷100)×L(K%:(G%-G(F%))÷G(F))+PV+PMT×G(T)×(USFV(G(K%):N)÷G(F)+SPFV(G(K%):N)×USPV(G(F%):M-N))

Enter
12 I%
7.5 G%
60000 PV
5 N
30 M
PMT -> -474.83 is the initial payment

3 I%
2 G%
300000 PV
PMT -> -1161.50

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
05-24-2024, 02:48 PM
Post: #3
RE: (17B/19B) GPM: initial payment
(05-22-2024 11:39 AM)SlideRule Wrote:  GPM = PV ÷ ((∑(T:1:N-1:1:SPFV(G:T) ÷ SPFV(I:12XT))+1)X
                     USPV((I:12) + SPFV(G:N) ÷ SPFV(I:12XN)X
                     USPV(I:(12XM) - (12XN)))

Once entered correctly, [...]
Ironically, the red parenthesis has no match and must be removed for the equation to be correct.
Remark also that here, I is the monthly rate (so annual rate divided by 12).
Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
05-25-2024, 12:17 PM (This post was last modified: 05-25-2024 03:29 PM by Gil.)
Post: #4
RE: HP48-HP50G TVM-GPM: initial payment
Introduction

As I could not fully, clearly understand the formulae given in the above posts, discovering here the GMT concept, I tried to formulate the exposed idea on my own way, based on the same example data:

PV+
{PMT×1.075^0 × [(v^12-1)/i /(1.01^12)^0)] +
PMT×1.075^1 × [(v^12-1)/i /((1.01^12)^1)] +
PMT×1.075^2 × [(v^12-1)/i /(1.01^12)^2)] +
PMT×1.075^3 × [(v^12-1)/i /(1.01^12)^3)] +
PMT×1.075^4 × [(v^12-1)/i /(1.01^12)^4)] +
PMT×1.075^5 × [(v^(360-12*5)-1)/i /(1.01^12)^5)]
} =0

PV+
{PMT×(v^12-1)/i ×[Sum, (1.075/1.01)^j, j=0..(5-1)] +
PMT×[v^(360-12×5)-1)/i]×(1.075/1.01^12)^5
}=0,
with v=1/1.01, i=0.01

and of course we find then PMT=-474.825.



Transposition to a more general TVM-Growth HP48-50G Solver program


I transposed the corresponding program, letting it have equally the more usual case without growing payments (I.Growing%=0 or number of Years for the Growing payments YG=0).

To check the case/example of Albert Chan and Karinne in another post, I included the possibility of having the number of compoundings/year, C.Y, ≠ number of payments/year, P.Y.

Besides, I added here the choice of the payments being made at the end of each period (variable END10=1) or at the beginning of each period (variable END10=0).

Finally, I gave also the possibility of having a remaining global amount FV to be still paid at the very end of the process, ie at the end of YTOT.


Use

Launch the Sover program by pressing its name TVM.G.

Enter, in the Solver, your values followed by the corresponding variable names as follows: 30 YTOT 12 I%Y 12 P.Y 12 C.Y 7.5 IG%Y NEXT-key 60000 PV 0 FV 1 END10.

Then press, always in the Solver, LeftShift P1 to get the value of the payments during the first year.

The following years, the payments will be increased (or not) according to your indications (the several calculations are not included in the result here) until reaching (or not) a constant value P.CST (LeftShift P.CST or RightShift P.CST).

Code:

\<<
  \<< YTOT I%Y + C.Y + P.Y + YG + IG%Y + PV + FV + END10 + DUP - I%Y 100. / C.Y / 1. + C.Y ^ P.Y INV \->NUM ^ DUP INV IG%Y 100. / 1. + \-> r v rg
    \<< YG IG%Y * 0. ==
      IF
      THEN YTOT 'YG' STO 1. 'rg' STO
      END PV + FV v P.Y ^ YTOT ^ * + 1. v P.Y ^ - r 1. - / 0. 0. YG 1. -
      FOR j rg r P.Y ^ / j ^ +
      NEXT * 1. v YTOT YG - P.Y * ^ - r 1. - / rg r P.Y ^ / YG ^ * + END10 1. == 1. r IFTE * P1 * + P1 rg YG ^ * 'P.CST' STO
    \>>
  \>> STEQ 30. MENU
\>>


Attached File(s)
.hp  TVM.G.hp (Size: 596 bytes / Downloads: 0)
Find all posts by this user
Quote this message in a reply
05-25-2024, 03:16 PM (This post was last modified: 05-25-2024 08:40 PM by Werner.)
Post: #5
RE: (17B/19B) GPM: initial payment
Taking the original equation, we can make it simpler:

Code:
GPM:PV+PMTxΣ(T:0:N:1:USPV(I%/12:12xIF(T<N:1:M-N))xSPFV(G%:T)/SPFV(I%/12:Tx12))

rationale, shown for N=5:
PMTx
T
0 USPV(I%/12,12)*SPFV(G%,0)/SPFV(I%/12,0)
1 USPV(I%/12,12)*SPFV(G%,1)/SPFV(I%/12,12)
2 USPV(I%/12,12)*SPFV(G%,2)/SPFV(I%/12,24)
3 USPV(I%/12,12)*SPFV(G%,3)/SPFV(I%/12,36)
4 USPV(I%/12,12)*SPFV(G%,4)/SPFV(I%/12,48)
5 USPV(I%/12,(M-N)x12)*SPFV(G%,5)/SPFV(I%/12,60)

USPV compounds the payments made, either 12 or 12*(M-N)
xSPFV G% multiplies by G% every year
/SPFV I%/12 brings it to the present

drawback is that it recalculates USPV(I%/12,12) N-1 times, so execution will be slower.

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
05-25-2024, 04:05 PM
Post: #6
RE: (17B/19B) GPM: initial payment
I indeed did not look at the efficiency, but just tried to replicate the given result with the explanations and see if I understood correctly what was asked.

Just added for completion the cases a) C/Yr ≠ P/Yr, b) payments choice at the beginning/end of period, c) constant instead increasing PMTs.

Regards,
Gil
Find all posts by this user
Quote this message in a reply
05-25-2024, 08:22 PM (This post was last modified: 05-26-2024 11:35 AM by Gil.)
Post: #7
RE: (17B/19B) GPM: initial payment
Just changed the case when no payment increase/Growth

(IG%Y=0 or #Yrs of payments Growth, YG, =0).

Instead of writing
IF
THEN YTOT 'YG' STO 1. 'rg' STO
END

I put now
IF
THEN 1 'YG' STO 1. 'rg' STO 0 'IG%Y' STO
END

Code:

\<<
  \<< YTOT I%Y + C.Y + P.Y + YG + IG%Y + PV + FV + END10 + DUP - I%Y 100. / C.Y / 1. + C.Y ^ P.Y INV \->NUM ^ DUP INV IG%Y 100. / 1. + \-> r v rg
    \<< YG IG%Y * 0. ==
      IF
      THEN 1 'YG' STO 0 'IG%Y' STO 1. 'rg' STO
      END PV + FV v P.Y ^ YTOT ^ * + 1. v P.Y ^ - r 1. - / 0. 0. YG 1. -
      FOR j rg r P.Y ^ / j ^ +
      NEXT * 1. v YTOT YG - P.Y * ^ - r 1. - / rg r P.Y ^ / YG ^ * + END10 1. == 1. r IFTE * P1 * + P1 rg YG ^ * 'P.CST' STO
    \>>
  \>> STEQ 30. MENU
\>>


Attached File(s)
.hp  TVM.G.VER03.hp (Size: 609 bytes / Downloads: 0)
Find all posts by this user
Quote this message in a reply
05-25-2024, 08:40 PM (This post was last modified: 05-29-2024 10:28 PM by Albert Chan.)
Post: #8
RE: (17B/19B) GPM: initial payment
Look at Graduated Payment Problem in time reversed order, this is simple, without needing a solver.

Let dn = i/((1+i)^n-1), cn = dn + i

Year 6 to Year 30: 25*12 = 300 months

c300 * pv6 + d300 * (fv=0) + pmt*s^5 = 0      → pv6/pmt = -s^5 / c300

pv6 is previous year future value (signed flipped, to honor sign convention)
All we need is to calculate pv(k)/pmt ratio, until reached pv1 --> pmt = pv1 / ratio

Code:
c12 * pv5 + d12 * -pv6 + pmt*s^4 = 0
c12 * pv4 + d12 * -pv5 + pmt*s^3 = 0
c12 * pv3 + d12 * -pv4 + pmt*s^2 = 0
c12 * pv2 + d12 * -pv3 + pmt*s^1 = 0
c12 * pv1 + d12 * -pv2 + pmt     = 0

lua> s, i, pv = 1.075, 0.01, 6e4
lua> d12 = i / expm1(log1p(i)*12)
lua> c12 = d12 + i
lua> c300 = i / expm1(log1p(i)*300) + i

lua> r = -s^5 / c300 -- = pv6/pmt
lua> for p=4,0,-1 do r = (d12*r - s^p) / c12 end
lua> pmt = pv / r
lua> pmt
-474.82512976281373

Another way is let r = pv(k) / pmt(k), eliminated the need for s^p

lua> r = -1 / c300 -- = pv6/pmt6
lua> for loops=1,5 do r = (d12*r*s - 1) / c12 end
lua> pv / r -- = pmt
-474.82512976281373

Equivalently, with USPV(i,n) = 1 / cn

lua> USPV = fn'i,n: -expm1(log1p(i)*-n)/i'
lua> k = -USPV(i,12)
lua> r = -USPV(i,300)
lua> for loops=1,5 do r=r*s; r=r+k*(1+r*i) end
lua> pv/r -- = pmt
-474.82512976281384


This is a dangerous setup, with initial payments not even cover interest!
First 5 years, we owe more and more to the bank.

lua> tvm(12, i, pv, pmt, nil) -- year 1
-61587.530668959655
lua> tvm(12, i, -_, pmt*s, nil) -- year 2
-62924.75212742366
lua> tvm(12, i, -_, pmt*s^2, nil) -- year 3
-63946.045314571944
lua> tvm(12, i, -_, pmt*s^3, nil) -- year 4
-64574.92851114446
lua> tvm(12, i, -_, pmt*s^4, nil) -- year 5
-64722.489143526655
lua> tvm(300, i, -_, pmt*s^5, nil) -- year 6 to 30
-3.4924596548080444e-10
Find all posts by this user
Quote this message in a reply
05-25-2024, 09:12 PM (This post was last modified: 05-25-2024 10:28 PM by Gil.)
Post: #9
RE: (17B/19B) GPM: initial payment
My program, with the solver, enables the person to choose the variable to be solved, and not only PMT (in which case a simple division solves the problem).
1) The person might, for instance, decide to accept a more expensive bank, starting paying back monthly 480 for 12 months, then 480×1.075 during the next 12 months, etc., and try to calculate the charged annual interest rate I%Y. With the solver, the answer is straightforward here:12.1345% (effective 12.8327%).
2) Or, at the same bank, the person can only pay back 400 the first 12 months, then an increasing amount every year during 5 years. How much should the client paid back monthly in the second year? Press then the Solver for IG%Y (G for Growth), to find 12.7759% —> monthly payments during the 2nd year = 400×1.127759 = 451.1037.
3) I could decide not to have any Growth payment (IG%=0 snd/or #of years of Growing payments, YG, = 0), and have C/YR = 3 (or 6, 2, 1...) and P/YR = 12 (or 6,2,1...), FV≠0, and calculate the monthly PMT to be paid.
Find all posts by this user
Quote this message in a reply
05-25-2024, 11:17 PM (This post was last modified: 05-27-2024 10:27 AM by Albert Chan.)
Post: #10
RE: (17B/19B) GPM: initial payment
Here is a way to solve GPM with TVM, by getting ratio, r = pv(k) / pmt

lua> s, i, pv = 1.075, 0.01, 6e4
lua> tvm(300, i, nil, s^5, 0)
-136.3080534003266
lua> tvm(12, i, nil, s^4, -_)
-135.99728502870335
lua> tvm(12, i, nil, s^3, -_)
-134.6728328100799
lua> tvm(12, i, nil, s^2, -_)
-132.52195004686465
lua> tvm(12, i, nil, s^1, -_)
-129.7057101837134
lua> tvm(12, i, nil, s^0, -_)
-126.36230948848763
lua> pv / _ -- = pmt
-474.825129762814



Another way, with r = pv(k) / pmt(k)

lua> tvm(300, i, nil, 1, 0)    -- = pv6 / pmt6
-94.94655125483813
lua> tvm(12, i, nil, 1, -s*_) -- = pv5 / pmt5
-101.83483907764173
lua> tvm(12, i, nil, 1, -s*_) -- = pv4 / pmt4
-108.40632019627348
lua> tvm(12, i, nil, 1, -s*_) -- = pv3 / pmt3
-114.67556521091589
lua> tvm(12, i, nil, 1, -s*_) -- = pv2 / pmt2
-120.65647458950086
lua> tvm(12, i, nil, 1, -s*_) -- = pv / pmt
-126.36230948848765
lua> pv / _ -- = pmt
-474.8251297628139

This has the advantage of knowing first 5 years does not paid off anything.
Payments not enough to even cover mortgage interest.

Only last edge rate = -pmt6/pv6 ≈ 1/94.95 > 1/100 = i

Comment: this is how the chain of tvm's work.

tvm(300, i, nil, 1, 0) = tvm(300, i, nil, pmt6, 0) / pmt6 = pv6 / pmt6
tvm(12, i, nil, 1, -pv6/pmt5) = tvm(12, i, nil, pmt5, -pv6) / pmt5 = pv5 / pmt5
...
Find all posts by this user
Quote this message in a reply
05-25-2024, 11:52 PM
Post: #11
RE: (17B/19B) GPM: initial payment
To solve PMT with growing payments we have:

PV+
{PMT×(v^12-1)/i ×[Sum, (1.075/1.01)^j, j=0..(5-1)] +
PMT×[v^(360-12×5)-1)/i]×(1.075/1.01^12)^5
}=0,
with v=1/1.01, i=0.01

Then
PV+PMT×
{(v^12-1)/i ×[Sum, (1.075/1.01)^j, j=0..(5-1)] +
[v^(360-12×5)-1)/i]×(1.075/1.01^12)^5
}=0,
with v=1/1.01, i=0.01

Then
PMT=-PV /{(v^12-1)/i ×[Sum, (1.075/1.01)^j, j=0..(5-1)] +
[v^(360-12×5)-1)/i]×(1.075/1.01^12)^5}

That's plain and easy. Trickier is to find i.
Find all posts by this user
Quote this message in a reply
05-27-2024, 11:29 AM (This post was last modified: 05-27-2024 11:30 AM by SlideRule.)
Post: #12
RE: (17B/19B) GPM: initial payment
Real Estate Finance, Everything You Need To Know About The Dollars & Sense Of Financing Real Estate, © 1988, deploys BASIC code "to provide accurate and authoritative information in regard to the subject matter covered", with chapters dedicated specifically to Graduated Payment.

                        CONTENTS

CHAPTER
  8 Graduated Payment Mortgages                                      61-66
12 Graduated Payment Adjustable Mortgage Loans              85-88

APPENDIX
8 A Graduated Payment Mortgage Program - Sample Run   313-316
9 A Graduated Payment Mortgage Program                       317-322

                        INTRODUCTION
     There are several good books on real estate finance. These books describe the nonquantitative aspects of real estate finance quite well. However, many of them do not stress the quantitative aspects, presumably because the authors do not wish to burden readers with formulas and other mathematical presentations. As a result, the reader who wishes to learn about and use the various formulas and quantitative procedures used in real estate finance is left without a clear guide that he or she can turn to.
     The purpose of this book is to integrate the quantitative and descriptive aspects of real estate finance in a way that can be clearly understood and used. It covers the primary and secondary mortgage markets and the financing of residential and commercial properties.



Professional Real Estate Problem Solving Using the HP 12C {2e}, © 1993, 1997, deploys RPN code … with chapters dedicated specifically to Graduated Payment.

                        TABLE OF CONTENTS

GRADUATED PAYMENT MORTGAGES (GPMs)                                                 177
MANUAL PROCEDURE FOR COMPUTING PAYMENT SCHEDULE                         179
COMPUTING THE PAYMENT SCHEDULE, PRICE, AND YIELD                            182
PROGRAM FOR COMPUTING GRADUATED PAYMENT MORTGAGE SCHEDULE     185
COMPUTING A GPM SCHEDULE BY PROGRAM                                               187
SOLVING FOR PRICE AND YIELD OF A GPM                                                  188
PROGRAM FOR AMORTIZING THE GPM                                                        190
PROBLEM                                                                                                  192
PROBLEM                                                                                                  194


BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
05-27-2024, 01:50 PM
Post: #13
RE: (17B/19B) GPM: initial payment
(05-27-2024 11:29 AM)SlideRule Wrote:  Professional Real Estate Problem Solving Using the HP 12C {2e}, © 1993, 1997
THAT is a real treasure trove!
Thanks, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
05-27-2024, 02:23 PM
Post: #14
RE: (17B/19B) GPM: initial payment
(05-25-2024 08:40 PM)Albert Chan Wrote:  Another way is let r = pv(k) / pmt(k), eliminated the need for s^p

lua> r = -1 / c300 -- = pv6/pmt6
lua> for k=1,5 do r = (d12*r*s - 1) / c12 end
lua> pv / r -- = pmt
-474.82512976281373

We can remove loops, and get direct formula for pv/pmt

Let q = s*d12/c12 = s / (1+i)^12

r6 = -1/c300
r5 = q*r6 - 1/c12
r4 = q^2*r6 - (1 + q) / c12
r3 = q^3*r6 - (1 + q + q^2) / c12
r2 = q^4*r6 - (1 + q + q^2 + q^3) / c12
r1 = q^5*r6 - (1 + q + q^2 + q^3 + q^4) / c12

--> pv/pmt = -q^5 / c300 - (q^5-1)/(q-1) / c12

This matched Gil's formula (sign convention and typo corrected)

PV/PMT = (v^(360-12*5)-1)/i * (s*v^12)^5 + (v^12-1)/i * sum((s*v^12)^j, j=0..(5-1))

where s = 1.075, i = 0.01, v = 1/(1+i)
Find all posts by this user
Quote this message in a reply
05-27-2024, 07:58 PM
Post: #15
RE: (17B/19B) GPM: initial payment
Albert Chan Wrote:This matched Gil's formula (sign convention and typo corrected)

note: typo is in the source document

BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
05-27-2024, 08:38 PM (This post was last modified: 05-28-2024 09:51 PM by Albert Chan.)
Post: #16
RE: (17B/19B) GPM: initial payment
(05-27-2024 02:23 PM)Albert Chan Wrote:  We can remove loops, and get direct formula for pv/pmt

Let q = s*d12/c12 = s / (1+i)^12
...
--> pv/pmt = -q^5 / c300 - (q^5-1)/(q-1) / c12

There is a simpler way to show this, without too much math.
Let t = (1+i)^-12      --> q = s*t

Year 6 to 30: c300/t^5 * pv6' + s^5 * pmt = 0      --> pv6' / pmt = -q^5/c300
Year 5:            c12/t^4 * pv5' + s^4 * pmt = 0      --> pv5' / pmt = -q^4/c12

--> pv4' / pmt = -q^3/c12
--> pv3' / pmt = -q^2/c12
--> pv2' / pmt = -q/c12
--> pv1' / pmt = -1/c12

All the pv(k)' is "pulled" to the beginning of loan --> pv = Σ pv(k)'

pv/pmt = -1/c12 - q/c12 - q^2/c12 - q^3/c12 - q^4/c12 - q^5/c300



This setup break the connection between years, making analysis simple.
We could do Year 6 to Year 30 individually, combine them, and get same result.

Year 6: c12/t^5 * pv6' + s^5 * pmt = 0      --> pv6'/pmt = -q^5/c12
Year 7: c12/t^6 * pv7' + s^5 * pmt = 0      --> pv7'/pmt = -q^5/c12 * t
Year 8: c12/t^7 * pv8' + s^5 * pmt = 0      --> pv8'/pmt = -q^5/c12 * t^2
...

c12 = i / (1 - (1+i)^-12) = i / (1 - t)

Σ(pv(k)', k=6 .. 30) / pmt
= -q^5 * (1 - t) / i * (1 + t + t^2 + ... + t^(30-6))
= -q^5 * (1 - t^25) / i
= -q^5 / c300
Find all posts by this user
Quote this message in a reply
05-28-2024, 05:56 AM (This post was last modified: 05-28-2024 11:38 AM by Werner.)
Post: #17
RE: (17B/19B) GPM: initial payment
(05-27-2024 02:23 PM)Albert Chan Wrote:  We can remove loops, and get direct formula for pv/pmt
--> pv/pmt = -q^5 / c300 - (q^5-1)/(q-1) / c12

Hi Albert,
that is literally what I did in the very first reply to Sliderule's original post.
The only difference is that I tried to make use of the ('standard',high-precision) financial functions USPV,USFV etc and so I had to find the q% if q = 1 + q%/100 in your formula.
This is my latest concoction, no local variables:

Code:
GPM:PV+(USPV(I%÷12:12)×USFV((G%-USFV(I%÷12:12)×I%÷12)÷SPFV(I%÷12:12):N)+USPV(I%÷12:(M-N)×12)×SPFV(G%:N)÷SPFV(I%÷12:N×12))×PMT

or, with a bit of comments:

Code:
GPM:PV+
 (                                                      -- first N terms:
    USPV(I%÷12:12)                                      --   PV of 12 PMTs
   ×USFV((G%-USFV(I%÷12:12)×I%÷12)÷SPFV(I%÷12:12):N)    --   1 + K + K^2 + .. K^N-1, K = G/F, F = (1 + (I%/12)/100)^12
   +                                                    -- last M-N terms:
    USPV(I%÷12:(M-N)×12)                                --   PV of (M-N)x12 PMTs
   ×SPFV(G%:N)                                          --   multiply by G^N
   ÷SPFV(I%÷12:N×12)                                    --   bring to PV, divide by F^N = (1 + (I%12)/100)^(12xN)
 )×PMT

(I put PMT at the end so that it's the last entry in the solver menu)

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
05-28-2024, 01:48 PM (This post was last modified: 05-28-2024 01:50 PM by Albert Chan.)
Post: #18
RE: (17B/19B) GPM: initial payment
(05-27-2024 08:38 PM)Albert Chan Wrote:  pv/pmt = -1/c12 - q/c12 - q^2/c12 - q^3/c12 - q^4/c12 - q^5/c300

Hi, Werner

Good tip about using (q-1) as rate.

Last term is FV of (N=5, I=q-1, PV=1/c300, PMT=0)
Others sum to FV of (N=5, I=q-1, PV=0, PMT=1/c12)

All terms have same sign, there is no cancellation issue.
We can combine them all in 1 TVM calculation.

q = s / (1+APY)
q-1 = ((s-1)-APY) / (1+APY)

lua> i, pv = 0.01, 6e4
lua> K = fn'i,n: expm1(log1p(i)*n)' -- = (1+i)^n - 1
lua> USPV = fn'i,n: -K(i,-n)/i'          -- = 1 / cn
lua> APY = K(i,12)
lua> tvm(5, (.075-APY)/(1+APY), USPV(i,300), USPV(i,12), nil) -- = pv/pmt
-126.3623094884877
lua> pv / _ -- = pmt
-474.82512976281373
Find all posts by this user
Quote this message in a reply
05-29-2024, 02:29 PM
Post: #19
RE: (17B/19B) GPM: initial payment
The Step-by-Step Solutions: Real Estate, Banking, and Leasing (17B/19B/27S) handbook on pg.48 has a Graduated Payment equation without loops, much like the ones I posted here.. and so does the 18C Real Estate handbook, maybe others as well.

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
05-29-2024, 07:08 PM (This post was last modified: 05-29-2024 09:53 PM by Gil.)
Post: #20
RE: (17B/19B) GPM: initial payment
I think the only 5 important things to know all about the above are:

0) Yearly shown interest I%YR by the bank is useless for the calculations —> 1+effective%YR×100=r=(1+I%YR/100/P.YR)^P.YR
1) 4 % during 2 years —> r=(1+4/100)*(1+4/100)=1.04²
2) a=1+r+r²+r³ —> ar=r+r²+r³+r⁴ —> a=(r⁴-1)/(r-1),
with r=r (or r=v=1/r for discounting to the present)
3) For graduated case, instead of only r,
we have PMT× g, PMT ×g², g being of the form of r above
4) PMT at the beginning = (PMT calculated at end of period)/r

The remaining formulae are "dangerous" to apply without understanding the logic of the above.

Regards,
Gil
Find all posts by this user
Quote this message in a reply
Post Reply 




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