Saturday, January 18, 2025

BA-54: Real Estate Programs

BA-54: Real Estate Programs



BA-54:  Chris won this calculator at HHC 2024 and donated it to me.   Much appreciation as always.
BA-54:  Chris won this calculator at HHC 2024 and donated it to me.   Much appreciation as always. 



Background: The Texas Instruments BA-54 is a 1986 update of the BA-55 (not a typo) financial calculator. The BA-54 is a keystroke programming calculator which can hold up to 40 programming steps. However, it’s up to 40 programming steps or up to 5 memory registers (register 1 through 5). Programming mode only occurs in finance mode, though the BA-54 also has a cash flow mode and a statistics (linear regression) mode.


Because steps can add up quickly, limited memory registers are really available. Going beyond step 32 will leave no memory register to work with.


My review of the BA-55 from 2018: http://edspi31415.blogspot.com/2018/02/retro-review-texas-instruments-ba-55.html




APR (Annual Percentage Rate) with Fees


Inputs:

number of payments [ N ]

annual interest rate ÷ 12 = [ %i ]

gross loan amount [ PV ]

points (in %) [ STO ] 1


Operation:

[ 2nd ] (RST) [ R/S ] payment of the loan (PMT, shown as a positive number)

[ R/S ] APR of the rate when fees are considered


APR is based off the net loan amount (gross loan amount – points%)


Code:

KEY

STEP #

KEY CODE

CPT

00

12

PMT

01

23

R/S

02

13

1

03

01

-

04

75

RCL

05

71

1

06

01

%

07

52

=

08

95

×

09

65

RCL

10

71

PV

11

24

=

12

95

PV

13

24

CPT

14

12

%i

15

22

×

16

65

1

17

01

2

18

02

=

19

95

R/S

20

13

RST

21

37


Example


What is true APR on a 20 year loan when the loan amount is 58000 at 6.8% when the loan carries the cost of 3.5 points?


Inputs:

20 [ × ] 12 [ = ] [ N ]

6.8 [ ÷ ] 12 [ = ] [ %i ]

58000 [ PV ]

3.5 [ STO ] 1 (points)


Operation:

[ 2nd ] (RST) [ R/S ] 442.74 (payment)

[ R/S ] 7.26% (APR with points)


The true APR is 7.26%.


Source


Smith, Jon M. Financial Analysis & Business Decisions on the Pocket Calculator. John Wiley & Sons: New York. 1976. pp. 177-178. ISBN 0-471-80184-4



Time and Interest Saved by Paying off a Loan Early


Inputs:

number of payments [ N ]

annual interest rate ÷ 12 = [ %i ]

gross loan amount [ PV ]

points (in %) [ STO ] 1


Operation:

Compute the payment by pressing [ PMT ]. Press [ 2nd ] (RST) [ R/S ].

Result: estimated original interest paid

Enter the new payment [ R/S ]

Result: number of payments with the higher payment [ R/S ]

Result: estimated interest saved


It is assumed that there are no penalties for early payment.


Code:

KEY

STEP #

KEY CODE

RCL

00

71

PMT

01

23

×

02

65

RCL

03

71

N

04

21

-

05

75

RCL

06

71

PV

07

24

=

08

95

STO

09

61

1

10

01

R/S

11

13

PMT

12

23

CPT

13

12

N

14

21

R/S

15

13

×

16

65

RCL

17

71

PMT

18

23

-

19

75

RCL

20

71

PV

21

24

=

22

95

+/-

23

94

SUM

24

81

1

25

01

RCL

26

71

1

27

01

R/S

28

13

RST

29

37



Example


We have a 30-year loan (360 payments) of 176000. The interest rate is 9.6%. If the user pays 1500 a month, how much time and interest are saved?


Inputs:

360 [ N ]

8 ÷ 12 = [ %i ]

176000 [ PV ]


Operation:

[ PMT ] Result: 1291.42

[ R/S ] Total original interest paid: 288913.24

Enter 1500 [ R/S ]

Result: 229.40 (n ≈ 230 payments) [ R/S ]

Result: 120808.27 (interest saved)


By paying 1500 instead of 1291.42, the loan will be paid about 230 payments (19 years, 2 months). Interest saved will be 120808.27.



The Front End Qualification Test


A common method to test whether a potential buyer of a house qualifies is the 28/36 Rule. Simply:


28% of the buyer’s monthly gross income is the maximum amount that the payment with their mortgage with insurance and property taxes (PITI) can be.


36% of the buyer’s monthly gross income is the maximum amount that PITI plus regular monthly debts can be.


The 28% is referred to as the front end test, while the 36% is referred to as the back end test.


The program returns two results: the PITI and difference between 28% of the gross income and PITI. If the difference is positive, the buyer pass the 28% test.


Due to the structure of how memory is set up, I could only fit the front end while being allowed to use 1 additional memory register.


Inputs:

number of payments [ N ]

annual interest rate ÷ 12 = [ %i ]

gross loan amount [ PV ]

monthly tax and property insurance [ STO ] 1

monthly gross income [ STO ] 2


Operation:

Compute the payment by pressing [ PMT ]. Press [ 2nd ] (RST) [ R/S ].

Result: PITI. (principal, interest, taxes, interest).

Press [ R/S ].

Result: Difference between 28% of income minus PITI.


KEY

STEP #

KEY CODE

CPT

00

12

PMT

01

23

+

02

85

RCL

03

71

1

04

01

=

05

95

R/S

06

13

RCL

07

71

2

08

02

×

09

65

2

10

02

8

11

08

%

12

52

-

13

75

RCL

14

71

1

15

01

-

16

75

RCL

17

71

PMT

18

23

=

19

95

R/S

20

13

RST

21

37


Example


A potential buyer wants to finance a house with a 30 year term at 5%. The purchase price of 375000. The estimated monthly property and insurance is 250. The buyer earns a monthly income of 12000. Does the buyer qualify (at least pass the front test (28%))?


Inputs:

30 [ × ] 12 [ = ] [ N ]

5 ÷ 12 = [ %i ]

375000 [ PV ]

250 [ STO ] 1

12000 [ STO ] 2


Operation:

Compute the payment by pressing [ PMT ]. Press [ 2nd ] (RST) [ R/S ].

Result: 2263.08 (principal, interest, taxes, interest).

Press [ R/S ].

Result: 1096.92 (it is positive, so the buyer passes the 28% test)


Source


Probasco, Jim. “What is the 28/36 rule for home affordability?” Bankrate. 09 October 2023, https://www.bankrate.com/real-estate/what-is-the-28-36-rule/ Retrieved October 16, 2024.


Enjoy!


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


Saturday, January 11, 2025

RPN with HP 15C & DM32: Solving Simple Systems

RPN with HP 15C & DM32: Solving Simple Systems


Welcome to another edition of RPN with HP 15C & DM32.


Many Approaches to a Solving Problems


This blog covers two ways to solve the simple linear system of two equations:


x + y = a

x – y = b


In matrix form:


[ [ 1, 1 ] [ 1, - 1] ] * [ [ x ] [ y ] ] = [ [ a ] [ b ]


The inverse of the coefficient matrix [ [ 1, 1 ] [ 1, - 1] ]:


[ [ 1, 1 ] [ 1, - 1] ] ^-1 = [ [ 0.5, 0.5 ] [ -0.5, 0.5 ] ]


[ [ x ] [ y ] ] = [ [ 0.5, 0.5 ] [ -0.5, 0.5 ] ] * [ [ a ] [ b ] ]


The solution to the system is:


x = (a + b) / 2

y = (a – b) / 2



As far as keying the solutions in the calculator, we can address this two ways. The first, and probably the easier method, is to use memory registers. The second is to use stack operations such as swap (x<>y), roll up (R↑), roll down (R↓), enter (ENTER) as duplication, and the Last X function (LST x). Both the HP 15C and DM32 use a four-level stack.



The Memory Register Approach


Start with the stack as follows:


Y: a

X: b

The results are presented as:


Y: y

X: x


Memory Registers used:


HP 15C: R1 = a, R2 = b

DM32: A, B


HP 15C Code:


001

42, 21, 11

LBL A

002

44, 2

STO 2

003

34

X<>Y

004

44, 1

STO 1

005

30

-

006

16

CHS

007

2

2

008

10

÷

009

45, 2

RCL 2

010

45, 40, 1

RCL + 1

011

2

2

012

10

÷

013

43, 32

RTN



DM32 Code (31 bytes):


T01 LBL T

T02 STO B

T03 x<>y

T04 STO A

T05 -

T06 +/-

T07 2

T08 ÷

T09 RCL B

T10 RCL + A

T11 2

T12 ÷

T13 RTN


The Stack Approach


Start with the stack as follows:


Y: a

X: b

The results are presented as:


T : original contents of the z stack

Z: original contents of the z stack

Y: y

X: x


This time no memory registers are used


HP 15C Code:


001

42, 21, 12

LBL B

002

40

+

003

43, 36

LST x

004

2

2

005

20

×

006

34

X<>Y

007

36

ENTER

008

33

R↓

009

30

-

010

16

CHS

011

2

2

012

10

÷

013

43, 33

R↑

014

2

2

015

10

÷

016

43, 32

RTN



DM32 Code (24 bytes):


S01 LBL S

S02 +

S03 LAST x

S04 2

S05 ×

S06 x<>y

S07 ENTER

S08 R↓

S09 -

S10 +/-

S11 2

S12 ÷

S13 R↑

S14 2

S15 ÷

S16 RTN



Examples


Example 1:

x + y = 32

x – y = 16


32 ENTER 16 (run program)


Results: y = 8, x = 24


Example 2:

x + y = 9

x – y = -8


Results: y = 8.5, x = 0.5



Until next time,


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, January 4, 2025

Casio fx-CG 50: Pseudorandom Number Generator (PRNG) Stat Plot

Casio fx-CG 50: Pseudorandom Number Generator (PRNG) Stat Plot


Introduction


This program is an inspiration from a HHC 2024 talk given by Kuba Tatarkiewicz. Tatarkiewicz’s talk is about testing RNG (random number generators). You can see it here: https://www.youtube.com/watch?v=vSDfqCK-ENk



Premise of RANDGRPH: Generate a recursive sequence


r_n = frac( (A * r_n-1 + B) ^ C)


The program builds two lists and develops a scatter plot. I have the program set up to plot 60 points, but we can up to 999 points. The list starts with the initial point (0, seed). The program asks you whether to have the calculator provide the seed or you provide a seed (between 0 and 1).



Casio fx-CG 50 Code: RANDGRPH (252 bytes)


“RAN # GRAPH”

“(A×R+B)^C” ◢

“A”? → A

“B”? → B

“C”? → C

Menu “SEED?”, “RANDOM”, 1, “YOUR OWN”, 2

Lbl 1

Ran# → R

Goto 0

Lbl 2

“0≤R<1, SEED”? → R

Lbl 0

{0} → List 1

{R} → List 2

For 1 → I To 75

Augment(List 1, {R}) → List 1

Frac((A×R+B)^C) → R

Augment(List 2,{R}) → List 2

Next

S-Gph1 DrawOn, Scatter, List 1, List 2, 1, Dot, ColorLinkOff, Black, AxesOn

DrawStat



Examples


Example 1: r_n = frac(991 * r_n-1)


r_n = frac(991 * r_n-1)


Example 2: r_n = frac( (0.3 * r_n-1 + 1)^2 )


r_n = frac( (0.3 * r_n-1 + 1)^2 )


Example 3: r_n = frac( (r_n-1 + π)^5 )


r_n = frac( (r_n-1 + π)^5 )


Enjoy! Happy New Year, be safe, sane, strong, and take care. Forever grateful,


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

HP 32SII: Volume of a Square Frustum (Three Approaches in RPN)

HP 32SII: Volume of a Square Frustum (Three Approaches in RPN ) The volume of a square frustum is: v = height ÷ ...