Mortgage%20Calculation - PowerPoint PPT Presentation

About This Presentation
Title:

Mortgage%20Calculation

Description:

Mortgage Calculation. Using z-transforms. Setup the Original Equation ... This formula was used in the mortgage program that is included here. ... – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 10
Provided by: ITT155
Category:

less

Transcript and Presenter's Notes

Title: Mortgage%20Calculation


1
Mortgage Calculation
  • Using z-transforms

2
Setup the Original Equation
  • Let kmonth number 0,1,2,3 etc.
  • Let y(k)loan balance in month k
  • Let u(k)payment during month k
  • Let iinterest rate as a proportion
  • Let mmonthly payment and Pamount of loan
  • The loan balance then at month k1 is
  • Y(k1)y(k)(1i/12) u(k)
  • If a(1i/12) then
  • Y(k1)ay(k) u(k) (no z transforms yet!!)

3
Z-transform Each Term
  • Z(y(k1))aYz Uz but u(k) was a steady
    unit amount each month, so to find Uz look it up
    in the table Uzmz/(z-1)Z(u(k))
  • And using the shift theorem
  • Z(y(k1))zYz zy(0)
  • Note initial values like y(0) are in most cases
    ignored but cant be in this example (my bad).
  • Final z-transformed equation
  • zYz zy(0) aYz -mz/(z-1)

4
Next Solve for Yz Algebraically
  • zYz zy(0) aYz -mz/(z-1)
  • zYz - aYz zy(0) -mz/(z-1)
  • Yz(z a) zy(0) -mz/(z-1)
  • Yz zy(0) /(z a) -mz/((z-1) (z a) )

5
Begin the inverse z-transform
  • Yz zy(0) /(z a) - mz/((z-1) (z a) )
  • The term zy(0) /(z a) can be looked up in
    the table but the second half must be expanded
    using partial fractions
  • Notice a trick, multiplying by
    z
  • K1z/(z-1) k2z/(z-a)-mz/((z-1) (z a) )
  • Or
  • K1/(z-1) k2/(z-a)-m/((z-1) (z a) )
  • Solving gives K1-m/(1-a)m/(a-1)
    k2-m/(a-1)
  • Substituting back
    gives
  • Yzzy(0)/(z a) m/(a-1) (z/(z-1)) -m/(a-1)
    (z/(z a) )
  • Ready, get set, magic happens

6
Solving for Y(k)
  • Yzzy(0)/(z a) m/(a-1) (z/(z-1)) -m/(a-1)
    (z/(z a) )
  • Y(k)y(0)ak m/(a-1) m/(a-1 )ak
  • Or factoring
  • Y(k)y(0)ak m(1- ak )/(a-1)
  • If at end of k months the loan is paid off,
    Y(k)0 then solve for needed monthly payment m
  • 0y(0)ak m(1- ak )/(a-1)
  • m(1- ak )/(a-1) -y(0) ak but if Py(0) then
  • m -y(0) ak (a-1)/(1- ak )-P(a-1)/(a-k
    1) or

7
Final answer
  • Final Answer (fanfare do to do to do to do )
  • mP(1-a)/(a-k 1) but recall a1i/12
  • mP(-i/12)/((1i/12)-k 1) or
  • mP(i/12)/(1 - (1i/12)-k) or
  • mP(i/12)(1i/12)k/((1i/12)k - 1)
  • In C and assuming Ji/12 you could write
  • M P J( (pow(1.0 J,n))/(pow(1.0J,n) - 1.0))

8
Example
  • 20 year mortgage, 11 interest, 30000 house
  • mP(-i/12)/((1i/12)-k 1)
  • m30000(-.11/12)/((1.11/12)-240 1)
  • m30000(-.0091666)/(-.88808)309.65
  • Rent it for 600/month utilities
  • and begin the joys of landlord/lady
  • ownership.

9
Banking Mania 2008
  • This formula was used in the mortgage program
    that is included here. However, the reason for
    using this formula was never obvious to me. I
    had simply copied it from a book and I was
    amazed, when I started to learn about
    z-transforms, at their power to do this
    calculation. I had found other non transform
    methods on the internet for accomplishing this
    but they too were complex.
Write a Comment
User Comments (0)
About PowerShow.com