CS 1173 Compound and payments

This handout discusses the formulas for on bank accounts and reduction in load balances for mortgages. Both the amount in a bank account and the balance on a mortgage can be calculated in terms of the value in the previous payment period. Such a relationship is called an update equation. Chemical reactions, populations of species, growth of trees, medication in the bloodstream, and electrical potential in neurons are all systems that can be modeled in terms of update equations. Lessons 19 and 20 use account balances and mortgages to illustrate MATLAB loops and selection.

1. Compound interest: When you deposit money in a bank account, the bank pays interest based on the amount of the deposit. If you redeposit the interest, the bank will have to pay interest on a greater amount at the end of the next interest period. This phenomenon is often called the power of compounding.

Update equation for compound interest: Suppose Pt is the amount in the account at time t, and Pt+1 is the amount in the account at the end of the next interest period , (t+1). Here, t is in units of the interest period, which we assume to be years. Let r be the annual rate of interest. Interest is reinvested.

+ = +rPPP tt1t or

+ = t1t + )r1(PP This equation is an example of a discrete‐time dynamical system (DTDS). The equation is discrete‐time because t goes in discrete steps (e.g., 0, 1, 2 ...). The equation is a dynamical system, because the variable, Pt, changes with time and its value at the next time depends on its past history. Traditionally, time starts with t=0. P0 is called the initial condition, because it indicates the starting state of the system.

If we plot Pt versus Pt+1, we'll get a straight line with slope (1+r) and zero intercept. However, usually we want to follow the growth of Pt as a function of time (i.e., we want to plot Pt versus t rather than Pt versus Pt+1).

Example 1: The following is a table of account values at a bank. How would you determine whether all of these accounts are receiving the same interest? If the is the same for all accounts, how would you determine it? Assume the interest period is one year.

Account Balance at end of 2007 Balance at end of 2008 2043‐36213‐5321 $ 10,034 $ 10,536 2043‐36241‐0934 50,329 52,751 2043‐36233‐3342 8,203 8,613 2043‐36236‐1537 703 738 2043‐36265‐3104 20,354 21,371 2043‐36213‐8294 $99,987 $104,986

To solve this problem, plot the 2007 balance versus the 2008 balance on a scatter plot and see if the values fall on a straight line. If they do, then perform a linear fit. The slope of the line can be interpreted as 1+r.

Example 2: Calculate the amount in an account after each of 4 years. The initial deposit is $10,000, and the annual interest rate is 3.5%. Assume annual compounding, and round each calculation to the nearest cent.

Year Old balance Interest New balance 1 10000.00 10000*0.035 = 350.00 10350.00 2 10350.00 10350*0.035 = 362.25 10712.25 3 10712.25 10712.25*0.035 = 374.92875 = 374.93 11087.18 4 11087.18 11087.18*0.035 = 388.0513 = 388.05 11475.23

t Note: You will often see the principal after t years of compounding written as Pt = P0(1+r) . This formula works well if you only want to see the final value. The iterative (step‐by‐step) procedure using the update equation is useful if you want the values for all of the intermediate years too.

Account balances have a linear update equation:

+ α= PP t1t where +=α )r1( . The parameter α is the per capita production. As indicated above, this equation has t the solution PP 0t α= . That is, the account balance grows exponentially when >α 1 , which happens if the interest rate > 0r . When =α 1 , the interest rate is 0, and the amount in the account is constant. If <α 1 , the interest rate is negative and the account balance decays exponentially.

The interest rate r corresponds to the growth rate per capita: −PP α −PP + −PP)r1( rP + t1t = tt = tt t == r Pt Pt Pt Pt Note: For DTDS, the difference in time is always 1, so we don't have to divide by the difference in times to get growth rate in this case.

More frequent compounding: Usually banks compound more frequently than annually. If the number of times to compound within the year is n and the annual interest rate is r, then the amount in the account after m compounding periods is: m ⎛ r ⎞ ⎜1PP += ⎟ 0m ⎝ n⎠ There are m=nt compounding periods in t years. Monthly compounding has n = 12. Daily compounding has n = 365. You could also compute this iteratively using the update equation: ⎛ r ⎞ + ⎜1PP += ⎟ . m1m ⎝ n⎠

Continuous compounding refers to a situation in which the number of compounding subintervals, n, rt grows very large. In the limit as n becomes infinitely large, we get the formula: = 0t ePP , where e is the base of the . This is a result that you will probably see proved in your calculus course.

Example 3: Suppose Bank A pays 5% interest compounded monthly, Bank B pays 5% interest compounded daily, and Bank C pays 5% interest compounded continuously. What would be the difference in account balances after 2 years if $10,000 is initially deposited in each bank and interest is reinvested? 12*2 ⎛ 05.0 ⎞ ⎜110000A += ⎟ = 11049.41 ⎝ 12 ⎠ 365*2 ⎛ 05.0 ⎞ ⎜110000B += ⎟ = 11051.63 ⎝ 365 ⎠

= e10000C 2*05.0 = 11051.71

2. Mortgages and : Home mortgages are similar to bank accounts except that payments act to decrease the balance rather than increase it. Usually the interest period is in months, and the monthly interest rate is computed by dividing the annual interest rate by 12. The monthly payment must cover the interest on the loan and the amount that is put into escrow each month to pay taxes, , and other fees. Suppose A is the monthly payment, r is the annual interest rate, B0 is the initial loan balance, and a is the amount needed for the escrow deposit each month. The loan balance at the end of month t+1is Bt+1. Bt+1 can be expressed in terms of Bt , the loan balance at time t: ⎛ r ⎞ ⎛ r ⎞ + ⎜ aABB −−−= ⎟ ⎜1BB += ⎟ −+ Aa t1t ⎝ 12 ⎠ tt ⎝ 12 ⎠ The value of A must be large enough to make the right hand side of this equation less than 0, or the mortgage balance will grow rather than decrease. (This unfortunate circumstance happened recently to many homeowners with adjustable‐rate mortgages or ARMs for short.)

Example 4: Suppose initial loan is $80,000, the annual interest rate is 6%, the monthly payment is $800, and the monthly escrow amount is $370. What is loan balance after the first monthly payment? For this problem B0 = 80000, r = 0.06, a = 370, and A = 800. B1 = 80000(1 + 0.005) + 370 ‐ 800 = $79,970.

Mortgage balances have a linear update equation:

+ α= BB t1t +β where α and β are constants. Here =α + )nr1( and β = − Aa .

Limits on equations: The mortgage balance can never be negative, because when the balance reaches 0, the mortgage is paid off. To take this limiting condition into account, we must add a condition saying that if the balance is negative, set it to 0. The update equation for the mortgage balance becomes:

+ α= BB t1t +β if α t +β > 0B = 0 otherwise Another way to write this is:

+1t = α t +β )0,Bmax(B .