Showing posts with label finance. Show all posts
Showing posts with label finance. Show all posts

Sunday, July 13, 2025

fx-3900PV Programs: Finance Factors

fx-3900PV Programs: Finance Factors


I’m revisiting the fx-3900Pv, which seems to be a hit. The last set of programs from May 3 of this year: https://edspi31415.blogspot.com/2025/05/casio-fx-3900pv-linear-system-poisson.html


Remember: When using the ENT (enter/input) command, we must enter a valid number and then the next step. The number that precedes ENT is not counted as a step and is not recorded.


Example: x + 9


In LRN (learn) mode (Mode EXP):

ENT (enter any number)

+

9

=


Casio fx-3900Pv: Simple Interest


maturity amount = principal amount * (1 + 0.01 * I%) * N ÷ 360

interest accrued = maturity amount – principal amount


I% = annual interest rate

N = number of days


The Act/360 method is used.


Code (23 steps):

ENT # enter principal amount (PV)

Kin 1

×

(

1

+

.

0

1

×

ENT # enter interest rate

×

ENT # enter number of days

÷

3

6

0

)

=

HLT # pause, display maturity amount

-

Kout 1

= # display interest accrued, end program


Example 1:


Inputs:

Principal Amount: 1,000.00

Rate: 5%

Number of Days: 30


Output (rounded to 2 decimal places)

Maturity Amount: 1,004.17

Interest Accrued: 4.17


Example 2:


Inputs:

Principal Amount: 360.00

Rate: 8%

Number of Days: 90


Output (rounded to 2 decimal places)

Maturity Amount: 367.20

Interest Accrued: 7.20



Casio fx-3900Pv: Compound Interest Factor with Compounding Periods


The following program calculates the compound interest factor:


factor = (1 + I% ÷ PYR) ^ (YRS × PVR)


where

I% = annual interest rate

PYR = payments per year (compounding periods)

YRS = number of years (N)


The factor is used in simple compound interest problems:


FV = PV × factor


where:

FV = future value

PV = present value


Code (19 steps):

(

1

+

.

0

1

×

ENT # enter interest rate

÷

ENT # enter payments per year

Kin 1

)

x^y

(

ENT # enter number of years

×

Kout 1

)

=


Example:

Find the compound interest interest factor for: I% = 5%, 12 payments a year, 4 years


Factor: 1.220895351


If an investor expects a $5,000.00 payoff, what should the investor pay?

PV = FV ÷ X

Keys: (with the answer from program displayed: [ 1/x ] [ × ] 5000 [ = ])

PV (rounded): 4,0953.36



Casio fx-3900Pv: Loan Annuity Factor


The following program calculates the loan annuity factor:


factor = ( ( 1 - ( 1 + I% ÷ PYR ) ^ (-YRS × PYR) ) ÷ ( I% ÷ PYR )


where

I% = annual interest rate

PYR = payments per year (compounding periods)

YRS = number of years (N)


The factor is used in loan problems without balloon payments, and assume that the payments occur at the end of each period (ordinary annuity):


PV = PMT × factor


where:

PV = present value

PMT = periodical payments


Code (30 steps):

ENT # enter interest rate

÷

ENT # enter payments per year

Kin 2

×

.

0

1

=

Kin 1 # K1 = I% ÷ PYR

ENT # enter number of years

×

Kout 2

=

Kin 2 # K2 = YRS × PYR = N

(

1

-

(

1

+

Kout 1

)

x^y

Kout 2

+/-

)

÷

Kout 1

=


Example:

A student buys a car at $35,619 (after taxes and fees). The student gets a six year loan at 5.7% and pays at the end of each month. What is the payment?


PMT = PV ÷ factor

where PV = 35619, I% = 5.7, PYR = 12 (monthly payments), YRS = 6


Running the program with inputs 5.7, 12, 6: 60.85819003

Payment: [ 1/x ] [ × ] 35619 [ = ]: 585.28 (rounded)



Casio fx-3900Pv: Sinking Fund Factor (Savings Account)


The following program calculates the sinking factor (used for savings accounts):


factor = ( (1 + I% ÷ PYR) ^ (YRS × PYR) – 1 ) ÷ (I% ÷ PYR)


The factor is used in determining the future value of savings plans with regular deposits made at the end of each period:


FV = PMT × factor


Code (29 steps):

ENT # enter interest rate

÷

ENT # enter payments per year

Kin 2

×

.

0

1

=

Kin 1 # K1 = I% ÷ PYR

ENT # enter the number years

×

Kout 2

=

Kin 2 # K2 = YRS × PYR

(

(

1

+

Kout 1

)

x^y

Kout 2

-

1

)

÷

Kout 1

=


Example:


A child’s parents opens up an account on the child’s first birthday. The parents contribute $200.00 per month for the next 18 years. The account pays a fixed rate of 3% per month. What is the value of the fund when the child turns 18?


Note: The account is opened on the child’s first birthday, hence 17 years pass.


FV = PMT × factor

where PMT = 100, I% = 3, PYR = 12, YRS = 17


Running the program with inputs 3, 12, 17: 265.69267

Future Value: [ × ] 200 [ = ]: 53,138.54 (rounded)



Until next time, stay safe and sane,


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.


The content on this blog is 100% generated by humans. The author does not use AI engines and never will.



Saturday, June 14, 2025

RPN With DM32: Interest Conversions

RPN With DM32: Interest Conversions



Today’s edition of RPN will focus on the Swiss Micros DM32 and HP 32SII calculator family (32SII, 33s 35s). My plan is to expand the range of calculators used in the RPN series to include the HP 41C/DM41X, HP 42S/DM42(n), HP 11C in addition to the HP 32SII and HP 15C families.



Nominal Interest Rate (EFF/NOM) and Effective Interest Rate (EFF)


When loans, annuities, mortgage, and other time-valued financial instruments are executed, the interest rate typically given is known as the nominal interest rate (NOM), also known as the APR. In mortgages and auto loans where the payments typically take place every month (12 per year), the periodic interest rate is divided by 12 to come up with the periodic rate. The periodic rate is compounded every month.


For example, if a loan has an APR (nominal rate, NOM) of 6% and payments take place monthly, the periodic interest rate is:


6% / 12 = 0.5%


The effective interest (EFF) rate is the nominal interest rate calculated as if was compounded annually.


Paid in Arrears


Typically, payments are paid in arrears, meaning payments are made after the service or the use of associated goods were provided. An example is the mortgage payment for the month of June is paid in the beginning of July.


The effective rate for payments paid in arrears is:


EFF% = (1 + NOM% / PY) ^ PY - 1


EFF%: effective interest rate

NOM%: nominal interest rate, APR

PY: payments per year


The effective rate for a APR of 6%, compounded monthly, paid in arrears is:


EFF% = (1 + 6% / 12) ^ 12 – 1 = (1 + 0.06 / 12)^12 – 1 ≈ 0.06168 (6.168%)



Paid in Advance


Sometimes, payments are paid in advance, where payments are made before the service or use of associated goods are provided. For example, the mortgage payment for the month of June is paid at the beginning of June or the end of May. The mortgage is paid in advance.


The effective rate for payments paid in arrears is:


EFF% = (1 - NOM% / PY) ^ (-PY) - 1


EFF%: effective interest rate

NOM%: nominal interest rate, APR

PY: payments per year


The effective rate for a APR of 6%, compounded monthly, paid in advance is:


EFF% = (1 - 6% / 12) ^ (-12) – 1 = (1 - 0.06 / 12)^(-12) – 1 ≈ 0.06200 (6.2%)



Conversion Formulas


The conversion formulas are (see source):

Payments in Arrears


EFF% = (1 + NOM% / PY) ^ PY – 1

NOM% = PY * ((1 + EFF%) ^ (1 / PY) – 1)


Payments in Advance


EFF% = (1 – NOM% / PY) ^ (-PY) – 1

NOM% = PY * (1 – (1 + EFF%)^(-PY))



DM32: Two Ways to Solve


There are two approaches to converting interest rates: directly through a program and using the solver.


Direct Programs


LBL A: NOM to EFF, Payments in Arrears


LBL A
STO Z
÷
1
x<>y
%
+
RCL Z
y^x
1
-
2
10^x
×
RTN


Syntax:

Y: NOM

X: PY

XEQ A


(Y: 5, X: 12, XEQ A: 5.11619)



LBL B: NOM to EFF, Payment in Advance


LBL B
STO Z
÷
1
x<>y
%
-
RCL Z
+/-
y^x
1
-
2
10^x
×
RTN


Syntax:

Y: NOM

X: PY

XEQ B


(Y: 5, X: 12, XEQ B: 5.13809)



LBL C: EFF to NOM, Payments in Arrears


LBL C
STO Z
1/x
x<>y
1
x<>y
%
+
x<>y
y^x
1
-
RCL× Z
2
10^x
×
RTN


Syntax:

Y: EFF

X: PY

XEQ C


(Y: 5, X: 12, XEQ C: 4.88895)



LBL D: EFF to NOM, Payment in Advance


LBL D
STO Z
1/x
+/-
x<>y
1
x<>y
%
+
x<>y
y^x
1
x<>y
-
RCL× Z
2
10^x
×
RTN


Syntax:

Y: EFF

X: PY

XEQ D


(Y: 5, X: 12, XEQ D: 4.86911)



Using The Solver


The DM32, and by extension, the HP 32SII, HP 33s, and HP 35s, has a solver that can solve for any variable. The solver uses a program in the format:


LBL α

INPUT (var)

INPUT (var)

function(var) = 0

RTN


To solve the equation (DM32, HP 32SII):


1. Press [ blue shift/right shift ] [ XEQ ] (FN=). An FN= prompt appears asking for a label.

2. Press [ blue shift/right shift ] [ 7 ] (SOLVE). You will be prompted to enter the variable to be solved.

3. The calculator prompts for values for any of the values. Press [ R/S ] to accept.

4. The solution is shown. I think the values and solutions are stored in the solutions. It is the case for the DM32, HP 32SII, and HP 32S.


Notes:

* HP 32S has the FN= and SOLVE in the SOLVE/∫ menu ([orange shift ] [ 1 ]).

* The right shift turned lavender in later HP 32SII calculators (late 1990s/early 2000s).


LBL S: Solver

LBL S
INPUT E
INPUT M
INPUT N
1
RCL M
RCL÷ N
+
RCL N
y^x
1
-
RCL- E
RTN


The equation is:

E = (1 + M/N) ^ N – 1


E = EFF%

M = NOM% (or APR%)

N = payments per year


The EFF% and NOM% must be entered in decimal. For payments in arrears, enter N as positive. For payments in advance, enter N as negative.


Example


Set function as:


FN= S

NOM to EFF, pmts in arrears


Solve E


M = 5% = 0.05

N = 12


E = 0.05116

(5.116%)

NOM to EFF, pmts in advance


Solve E


M = 5% = 0.05

N = -12


E = 0.05138

(5.138%)

EFF to NOM,

pmts in arrears


Solve M


E = 5% = 0.05

N = 12


M = 0.04889

(4.889%)

EFF to NOM,

pmts in advance


Solve M


E = 5% = 0.05

N = -12


M = 0.04869

(4.869%)


Source


J.J. Rose and E.M. Reeves VALPAC: A Discounted Cash Flow Approach To Property Valuation. (user manual) The Incorporated Society of Valuers and Auctioneers. An HP 41C Pac.


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, February 15, 2025

HP Prime and fx-CG 50: Percentage of a Mortgage Paid

HP Prime and fx-CG 50: Percentage of a Mortgage Paid


Introduction


The program PERMORTGAGE for the HP Prime, and PERMORT for the Casio fx-CG 50 calculates the percentage of mortgage paid off any time during the mortgage’s term.


Inputs:

N = The length of the mortgage (or loan) in number of monthly payments. The payments are assumed to be made at the end of the month.

R = The annual rate of the mortgage. Assume that this loan is fixed.

L = The amount of the loan.

D = The number of payments already made.


Assume that there is no balloon payment.


The % of mortgage paid is calculated by the following steps:


Step 1: Let P by the monthly payment: P = PMT(N, R, L, 0, 12, 12)

(the last two arguments are payments per year and compounding periods per year, both set at 12)


Both calculators featured use the cash flow convention. That is, all cash inflows (receipts) are positive and cash outflows (payments) are negative. In this case, the monthly payment (P) and balance remaining (B) are negative.


Step 2: Let B be the approximate balance using the FV (future value) function:

B = FV(D, R, L, P, 12, 12)


Step 3: Calculate the % of mortgage paid:

T = (1 + B / L ) * 100%



HP Prime Program Code: PERMORTGAGE


Syntax: PERMORTGAGE( nterm, rate, loan, npaid )

nterm = number of monthly payments for the entire term. Example for a 30 year term, nterm = 360

rate = annual rate of a mortgage

loan = loan amount

npaid = number of payments made


Result: % of the principal paid


Code:


EXPORT PERMORTGAGE(nt,rate,loan,np)

BEGIN

// n term, rate, loan,,n paid

// Percent of a Mortgage Paid

// Monthly payments assumed, end mode assumed

// Assume no balloon payment

// EWS 2024-11-01


LOCAL pymt,prct,baln;

pymt:=Finance.TvmPMT(nt,rate,loan,0,12,12);

baln:=Finance.TvmFV(np,rate,loan,pymt,12,12);

// PMT and FV will be negative

prct:=(1+baln/loan)*100;

RETURN prct;

END;



Casio fx-CG 50 Program: PERMORT


The program asks for a single calculation or range of calculations which is stored in Matrix Mat A. (The first row is has two zeros, and is used as a “header”.) The first column is the number of payments made, the second is the percentage of mortgage (loan) paid.


Code:


PmtEnd

“N (TERM)”? → N

“RATE”? → R

“LOAN AMT”? → L

Menu “TYPE”,”SINGLE”,1,”RANGE”,2

Lbl 1

Cmpd_PMT(N,R,L,0,12,12) → P

Cmpd_FV(D,R,L,P,12,12) → B

(1+B÷L)×100 → T

“PERCENT PAID =”

T

Stop

Lbl 2

“N1”? → A

“N2”? → B

“STEP”? → C

[ [ 0 ] [ 0 ] ] → Mat A

For A → D To B Step C

Cmpd_PMT(N,R,L,0,12,12) → P

Cmpd_FV(D,R,L,P,12,12) → B

(1+B÷L)×100 → T

Augment(Mat A, [ [ D ] [ T ] ]) → Mat A

Next

Trn Mat A → Mat A

“IGNORE TOP ROW - “

“ [ N PER ]” ◢

Mat A

Stop



Example


$100,000 loan over 30 years (360 payments). Screen shots were taking with the HP Prime emulator.


Percent of Mortgage Paid Example


Note that the % paid takes on a curve, the later we get into the term, the more principal is paid off. This program can be a demonstration of how amortization works.


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 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.


Casio fx-991CW: Editing Variables

Casio fx-991CW: Editing Variables Introduction The newer set of Casio scientific calculators, better known as the Classwiz series, rev...