× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



the trick to this is when to round, at what decimal, and perhaps truncate with no rounding.
There are State and perhaps Federal rules to this if you are using it for
business purposes.
I did this in the early 90's for insurance in the state of Florida. The state auditors had to approve an amortization before it could be used to calc
finance contracts (of insurance).
Jim Franz


----- Original Message ----- From: "Shannon ODonnell" <sodonnell@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: "'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, December 04, 2008 5:32 PM
Subject: RE: Creating an Amortization Schedule


This sounds like a school assignment.

Calculating an amortization schedule is a pretty basic formula:

This will get you your monthly payment:

M = P * ( J / (1 - (1 + J) ** -N))

Where:

P = Principal
I = Interest
J = Monthly Interest in decimal form: I(12 x 100)
N = Number of months of loan
M = Monthly Payment Amount

To create the amortization table, create a loop in your program and follow
these steps:


Step 1: Calculate H = P x J, this is your current monthly interest

Step 2: Calculate C = M - H, this is your monthly payment minus your monthly
interest, so it is the amount of principal you pay for that month

Step 3: Calculate Q = P - C, this is the new balance of your principal of
your loan.

Step 4: Set P equal to Q and go back to Step 1: You thusly loop around until
the value Q (and hence P) goes to zero.


You can probably find the algorithm in an old RPG II textbook too. I
remember doing this same thing in RPG, COBOL and in C in school.

HTH


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mike
Sent: Thursday, December 04, 2008 4:15 PM
To: RPG programming on the AS400 / iSeries
Subject: Creating an Amortization Schedule

I have been tasked with creating a program that will generate an
amortization schedule. I have only done a bit of research so far, but I need
to calculate out payments, interest per payment and principle per payment.
Can any one point me in the right direction to figure this out?

--
Mike Wills
Midrange Programmer/Analyst
http://whois.mikewills.name/
http://www.linkedin.com/in/mikewills
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.