[can.general] Canadian vs American Mortgage Calculations

gergely@dreacad.UUCP (gergely) (11/06/84)

WARNING:  This is a long detailed message with my address at the end.


I am not sure how American mortgages are calculated.  Most programs that
claim to do mortgages base their calculations on a fixed monthly payment
done 12 times a year.  True bank mortgages are calculated similarly but
using the number of days in the month as their basis.  Local banks and their
regional offices do not know of the formulae because their head offices have
them implemented in their computers.

The first group of formulae are the general ones based on compound interest
calculations.  Afterwards the exact formulae for calculating the mortgages
in Canada will be presented.  These exact ones match the calculations of 5
major banks, 2 major trust companies, and 1 credit union (contact me
personally for the specific ones).  Note:  The formulae are based on
hierarchial mathematical calculation mode (i.e., innermost parens are
calculated first), with "**" being the exponentiation operator.


To calculate the "relative" interest:
------------------------------------

Let i(x) be the relative interest, with x being "y" for yearly, "m" for
monthly, and "d" for daily.

	i(x) = ((1.0 + (i% / (q * 100))) ** (q * z)) - 1.0	[Formula 1]

		with  	i%  being the yearly interest as a percentage
			q     "   the compounding frequency, normally q=2.
			z     "   a special scaling number with the value:
					1	if x=y, for yearly
					m/12	for m months, normally m=1
					d/365 or d/366	for d days, normally
							d=1.  The denominator
							is the number of days
							in the corresponding
							year.

To calculate your monthly payment:
---------------------------------


	p(m) = (PV * i(m)) / (1.0 - ((1.0 + i(m)) ** (-n)))	[Formula 2]

		where	i(m)	is the relative monthly interest using
					formula 1 with z=1/12, and q=2.
			p(m)	is the monthly payment
			PV	is the present value (the amount of
					mortgaging)
			n	is the term in months 
					(e.g. 5 years = 60 months).

There is a problem, though.  The banks then truncate p(m) to the penny.
But, then there may be something left to pay on the mortgage at the end of
term.  Solution:  Invert the formula to calculate PV given the truncated
p(m).  Loop until the calculated PV is just greater than the original PV by
adding 0.01 to p(m) each time.  The final p(m) should correspond to the
monthly payment in the amortization tables.

To calculate Monthly Interest:
-----------------------------

	Monthly Interest = Opening Monthly Balance * MIF

	MIF = ((1.0 + i(d)) ** NDAYS) - 1.0

	    = ((1.0 + (i% / 200.0)) ** ((2.0 * NDAYS) / 365.0)) - 1.0

		with	i(d)	being the daily interest from formula 1,
					with q=2, and z=1.0/365.0.
			NDAYS	being the number of days since your last
				payment (i.e., the number of days in the
				last month, or otherwise).

	Payment on the Capital = Monthly payment - Monthly interest

Notes:
	1.  The monthly interest is either truncated or rounded to the
nearest penny (depending on the bank, and machine).  Note that it is
recalculated for each payment.  NDAYS is the number of physical days between
payments not banking days.  If today was 1 Aug, and your last payment was 1
July then NDAYS = 31.

	2.  A major dispute is what to do about Feb. 29 in a leap year.
Most banks ignore it, but trust companies don't.  The possibilities are (for
discussion sake, assume the last payment was on 1 Feb, and today is 1 Mar).
	A.  Using 1/366 for z in formula 1. for the whole year, or replacing
		the 365.0 above by 366.
	B.  Using 29.0 / 366.0 in the formula above for only this payment
	C.  Using 28.0 / 365.0 in the formula above for this payment.
		This seems to be what normally is done by the banks.
		In other words, they ignore it.
	D.  Using 29.0 / 365.0 in the formula above for this payment.
		This is robbery, and seems to be done by the trust companies.


All of the above formulae, have been incorporated into an amortization
program written in SAIL for a DEC20.

If there are any questions, or comments please feel free to contact me.

		Peter J. Gergely

	mail:	Defence Research Establishment Atlantic
		P.O. Box 1012, or 9 Grove Street
		Dartmouth, N.S.   B2Y 3Z7
		phone:	1(902) 426-3100

	uucp:	...!{dalcs,garfield,utcsrgv}!dreacad!gergely
	arpa:	G.GERGELY@SU-SCORE