home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e004 / 1.img / MORTGAGE.MCD < prev    next >
Encoding:
Text File  |  1987-10-23  |  2.8 KB  |  152 lines

  1. .MCD 20000 60
  2. .CMD PLOTFORMAT logs=0,0 subdivs=1,1 size=5,15 type=l
  3. .CMD FORMAT  rd=d ct=10 im=i et=12 zt=15 pr=2 mass length time charge
  4. .CMD SET ORIGIN 0
  5. .CMD SET TOL 0.001000
  6. .CMD MARGIN 0
  7. .CMD LINELENGTH 78
  8. .CMD SET PRNCOLWIDTH 8
  9. .CMD SET PRNPRECISION 4
  10. .TXT 1 4 1 29 
  11. a1,28,26,27
  12. HOME MORTGAGE CALCULATIONS
  13. .TXT 3 0 3 20 
  14. a3,20,18,50
  15. First, define some 
  16. convenient 
  17. abbreviations ...
  18. .EQN 0 26 1 9 
  19. mo:1
  20. .EQN 0 11 1 13 
  21. yr:12*mo
  22. .TXT 4 -37 2 19 
  23. a2,19,17,31
  24. Set up parameters 
  25. of loan ...
  26. .EQN 0 26 1 23 
  27. House_price:120000
  28. .EQN 0 23 1 19 
  29. Down_pmt:20000
  30. .EQN 2 -23 1 39 
  31. Loan_amount:House_price-Down_pmt
  32. .EQN 2 0 1 12 
  33. last:15
  34. .TXT 0 20 1 19 
  35. a1,19,17,18
  36. (number of years)
  37. .EQN 2 -20 1 14 
  38. N:last*yr
  39. .TXT 0 20 1 16 
  40. a1,16,14,15
  41. (term of loan)
  42. .EQN 2 -20 3 12 
  43. i:10*%/yr
  44. .TXT 1 20 1 17 
  45. a1,17,15,16
  46. (interest rate)
  47. .EQN 2 -20 5 39 
  48. payment:Loan_amount*i*(1+i)^N/((1+i)^N-1)
  49. .TXT 1 -26 3 17 
  50. a3,17,15,35
  51. Compute the 
  52. monthly  
  53. payment ...
  54. .EQN 4 26 1 21 
  55. payment=?
  56. .TXT 2 -26 3 15 
  57. a3,15,13,38
  58. Now compute a 
  59. table of 
  60. payments ...
  61. .EQN 0 26 1 12 
  62. j:1;N
  63. .TXT 0 17 2 18 
  64. a2,18,16,32
  65. Payments through 
  66. term of loan.
  67. .TXT 3 -17 3 40 
  68. a3,40,38,100
  69. To compute monthly balance, start with 
  70. Loan amount and each month add 
  71. interest, subtract payment.
  72. .EQN 4 0 2 25 
  73. balance[0:Loan_amount
  74. .EQN 3 0 2 42 
  75. balance[j:balance[(j-1)*(1+i)-payment
  76. .TXT 3 0 2 45 
  77. a2,45,43,54
  78. Also compute principal and interest in each 
  79. payment.
  80. .EQN 3 0 2 22 
  81. int[j:balance[(j-1)*i
  82. .EQN 0 25 2 22 
  83. p[j:payment-int[j
  84. .EQN 3 -25 2 35 
  85. equity[j:House_price-balance[j
  86. .TXT 3 -30 1 1 
  87. x1,1,0,0
  88. .TXT 1 30 1 41 
  89. a1,41,39,40
  90. Choose eight sample months in the loan:
  91. .EQN 2 0 1 15 
  92. samp:1;8
  93. .EQN 0 20 10 15 
  94. MO[samp:1,2,1*yr,1*yr+1,2*yr,2*yr+1,last*yr-1,last*yr
  95. .TXT 11 -43 1 46 
  96. a1,46,44,45
  97. Table of values for the eight sample months:
  98. .TXT 2 -1 2 72 
  99. a2,72,70,142
  100. MONTH     BALANCE AT END   EQUITY      INTEREST PAID   PRINCIPAL PAID  
  101. -----     --------------   ------      -------------   --------------
  102. .EQN 2 11 11 15 
  103. balance[(MO[samp)=
  104. .EQN 0 16 11 14 
  105. equity[(MO[samp)=
  106. .EQN 0 14 11 11 
  107. int[(MO[samp)=
  108. .EQN 0 16 11 11 
  109. p[(MO[samp)=
  110. .EQN 1 -56 10 8 
  111. MO[samp=
  112. .TXT 12 -4 3 17 
  113. a3,17,15,45
  114. Plot equity and 
  115. loan balance 
  116. over time ...
  117. .EQN 0 28 9 49 
  118. House_price&0&equity[j,balance[j{1,1,8,30,l}@last*yr&0&j
  119. .TXT 9 -27 2 17 
  120. a2,17,15,24
  121. Compute 
  122. summations ...
  123. .TXT 1 25 1 13 
  124. a1,12,10,11
  125. First year
  126. .TXT 0 25 1 17 
  127. a1,16,14,15
  128. Whole mortgage
  129. .EQN 2 -28 1 15 
  130. k:1;1*yr
  131. .EQN 2 0 4 27 
  132. k$payment=?
  133. .EQN 0 27 4 28 
  134. j$payment=?
  135. .TXT 1 -49 1 16 
  136. a1,15,13,14
  137. All payments:
  138. .EQN 4 22 4 21 
  139. k$p[k=?
  140. .EQN 0 27 4 20 
  141. j$p[j=?
  142. .TXT 1 -49 1 18 
  143. a1,17,15,16
  144. Principal only:
  145. .EQN 4 22 4 23 
  146. k$int[k=?
  147. .EQN 0 27 4 24 
  148. j$int[j=?
  149. .TXT 1 -49 1 17 
  150. a1,16,14,15
  151. Interest only:
  152.