Math 132

Loans and First-Order Finite Difference Models

 by S. R.. Lubkin, based on work by R. White

Application

This lesson deals with the time value of money and compound interest. We will examine loans with monthly payments. What should our monthly payments be in order to pay the loan off after a certain number of months?

Math Model

Definitions

Always be clear what your definitions are. We will use the symbol := to indicate a definition, since that is Maple's notation.

t := time (units are integers)
yt :=  amount owed in month t (units are $)
P := monthly payment (units are $)
I := annual interest rate

Note that  yt is also called the principal.

Dynamical System

Let's begin with our word equation. The dynamics of the loan are as follows: The amount you owe each month is based on the amount you owed in the previous month, plus interest, minus the amount you have paid back. In a word equation this looks like:
(amount owed this month) = (amount owed last month) + (interest on last month's principal) - (monthly payment)
We need to make a further model of one of the terms, the interest, noting that the interest is based on what you owed:
(interest on last month's principal) = (amount owed last month)*(annual interest rate)/12
Now we can translate. We replace our words with symbols, and combine the two word equations above to get
yt = yt-1 + yt-1*I/12 -P
Or, simplifying,
yt = (1 + I/12)*yt-1 - P
The above equation is called a finite difference model. It is an example of a dynamical system, which is a mathematical model of some process in time.

Notice that the finite difference model could easily be rewritten as

yt+1 = (1 + I/12)*yt - P
just by adding 1 to t, that is, going one month ahead.

Solution of the Model

What is a "solution" of a finite difference model? So far, we have yt as a function of yt-1, but what we want is yt as a function of t.
There are two main ways to solve the model, iteration and algebra.

Iterative method:

We begin at the beginning. If we start with an initial balance of y0 at time 0, then we can find the balance in month 1 by plugging y0 into our finite difference equation. Then we can find y2 by plugging y1 into the finite difference equation, and so on.
We have y0. Then
y1 = (1 + I/12)*y0 - P
gives us y1.
y2 = (1+ I/12)*y1 - P
gives us y2. Repeat as necessary. You could see that this might be tedious unless we used a computer. Unfortunately, the iterative method is not as powerful as the

Algebraic method:

This is kind of interesting. We want to find some formula which will give us yt in terms of t directly, without having to compute each monthly balance in between. Let's begin with a simpler finite difference model,
yt+1 = a*yt + b
Then
yt+1  = a*yt + b
          = a*(a*yt-1 + b) + b
          = a*(a*(a*yt-2 + b) + b) + b
etc. until we are all the way back to y0
          = at+1*y0 + b*(at + ... + a + 1)
or, rearranging,
yt+1 = at+1*y0 + b*(1-at+1)/(1-a)
or, if you prefer yt in terms of t, which was what we were trying to find in the first place,
yt = at*y0 + b*(1-at)/(1-a)
This is nice, because we only have one formula to compute to find, say, y100, instead of 100 formulas with the iterative method.
The tidy result we just derived can be stated in the form of a theorem.
 
Theorem: For a finite difference equation of the form
yt+1 = a*yt + b
the solution yt is given by
yt = at*y0 + b*(1-at)/(1-a)
Applying the theorem to the specific example of our loan means that we have a = (1 + I/12) and b = -P. (Careful of that minus sign!) That gives
yt = (1 + I/12)t*y0 - P*(1-(1+ I/12)t)/(-I/12)

Example

Suppose we want to buy a car. Suppose we want to buy a $10,000 car. This time Dear Aunt Martha is not feeling so generous, so we decide to take out a loan for the entire amount. We get a loan for the annual rate of 6%. If our payment is $150 a month, how long will we have to be paying the loan off? For that matter, suppose we want to have the car paid off in exactly 2 years. What does our payment need to be each month in order to pay the loan off in 24 months?

Solution:

Using our finite difference model for the example above gives us a finite difference equation of
yt = (1 + .06/12)*yt-1 - 150
with an initial condition of y0 = 10,000. We will implement the iterative method in Excel and check it against the formula from the theorem.

Implementation in Excel:

Open a spreadsheet. What should the payment be in order to pay off the loan in 24 months? We need to use the algebraic method. The algebraic solution in general is
yt = (1 + I/12)t*y0 - P*(1-(1+ I/12)t)/(-I/12)
and in our case, our numbers give since at t=24 we want yt to be zero! How do we solve this for P? We can do it by hand (tedious and error-prone) or we can use Maple.

Implementation in Maple:

In the linked worksheet we see that $150 payments really won't pay it off in 24 months. We have to pay $443.21 per month. OK, but when I check it in my spreadsheet at that payment level, I have overpaid by $0.10 by the end of 24 months. Why? Because in the real world you have to round payments to the nearest penny.