Page 1 of 1

Amortization program (with source)

Posted: Sat Apr 05, 2014 10:40 pm
by blueb
Here's a small amortization program I wrote that includes source.
It can probably be modified for non-windows use.

https://www.dropbox.com/s/q1p9p1zean6x340/Amortize.zip

blueb

Re: Amortization program (with source)

Posted: Mon Apr 07, 2014 1:01 am
by netmaestro
In Canada, most home mortgage loans are paid monthly but compounded semi-anually. I don't see where I can choose compounds per year with your program (which is quite nice btw). If you would like to add compounds/year to it, this is the math I use, sample data provided should yield a monthly payment of $650.81:

Code: Select all

p=60000      ; Principal
j.f=0.1275   ; Interest rate
y=25         ; Years of loan
f=12         ; frequency of payments per year (12 for monthly, 52 for weekly, etc.)
m=2          ; compounds per year

a.d =  p * (Pow(1+j/m, m/f) - 1) / (1 - Pow(1+j/m,-y*m))

Debug StrD(a,2)
Your program yields $665.43, which means you're always compounding monthly.

Re: Amortization program (with source)

Posted: Mon Apr 07, 2014 3:33 pm
by blueb
I forgot to allow for our beloved Canadians, who are probably waiting for spring to arrive, and who are as sharp as tacks. :mrgreen:

Yes, I'll work on a maple leaf version.

Actually there may be situations where it's feasible to have:
- blended quarterly payments
- blended semi-annual payments (Canada)
- blended annual payments

So the program works for part of the world, until I can make some adjustments.

Funny, I double-checked my results with:
"Loan Payments Handbook" that I've owned forever.
publisher: Computofacts
address: Willowdale, Ontario, Canada :wink: