home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1995 / ARCHIVE95.iso / discs / pipeline / 4_06 / Iteration / ReadMe < prev   
Text File  |  1991-02-17  |  4KB  |  80 lines

  1. %OP%JUN
  2. %OP%DP0
  3. %OP%DFT
  4. %OP%PL0
  5. %OP%HM0
  6. %OP%FM0
  7. %OP%BM0
  8. %OP%LM4
  9. %OP%RIY
  10. %CO:A,72,72%
  11. %C%Lump Sums & Monthly Payments
  12. %C%by Malcolm Brown
  13.  
  14. [Note from Gerald L Fitton: PipeDream does have financial functions 
  15. (have a look at pages 157 to 160 of the user guide) which could have 
  16. been used to solve Malcolm's problem more elegantly.  However, I have 
  17. included his contribution because I believe it to be an example of the 
  18. use of PipeDream's iteration facility which is neither too simple to be 
  19. useful nor too difficult to understand what is happening.  Generally, 
  20. mathematicians use iteration only if a formula contains the wanted 
  21. variable 'implicitly' in such a way that the formula can not be 
  22. 'inverted' (solved) to obtain an 'explicit' solution for the wanted 
  23. variable.  Quadratic equations can be solved 'explicitly' but quintics 
  24. can not.  If you send me a solution to Malcolm's 'Amortisation Annuity' 
  25. problem using PipeDream's built in financial functions then I will 
  26. include in on one of the quarterly PipeLine discs.  A 'Repayment 
  27. Schedule' (showing just how much is still owed at any time) could be 
  28. useful for working out unfinished 'Hire Purchase' calculations. - GLF]
  29.  
  30. It recently occured that two related problems presented themselves 
  31. which may reappear and so a computer solution seemed worthwhile.  A 
  32. family member was in need of a loan and money was available.  It seemed 
  33. sensible to make the loan through the family. But...
  34.  
  35. The sum, if it were to remain in the bank would attract interest.  The 
  36. loan would be repaid in monthly instalments which presumably would not 
  37. acrue so much interest.  We simply wanted to break even - assuming a 
  38. static interest rate.
  39.  
  40. The requirement, therefore, was simply to calculate what monthly 
  41. repayment would be required to match the (principle + interest) at the 
  42. end of the term.  [This is the classic 'Amortisation Annuity' problem - 
  43. Have you an elegant solution for publication? - GLF]
  44.  
  45. The first problem was to calculate the compound interest (A10 on the 
  46. loan file).  Why don't spreadsheets have a built in function for this 
  47. formula?  I remember calculating this at school 30 years ago but I 
  48. could not remember the formula and it took some prising out of the 
  49. local library. 
  50.  
  51. The second was how to calculate the monthly repayment (B10) so that the 
  52. value (C10) equaled the return (A10).  So that at the end of the loan 
  53. period the bank balance would look exactly as it would have done if 
  54. nothing had happened.  What a frustration!  Iteration is not the 
  55. easiest process to get right - the thing would not move at all or 
  56. diverged violently.  Eventually I abandoned all my principles and read 
  57. the manual.  There it was - page 266 - the solving of simultaneous 
  58. equations.  And so (B10) and (F12) check each other until they come to 
  59. some amicable arrangement.  I had to use the SGN (F10) as the modifier; 
  60. just using the 'Variance' (E10) brought violent fluctuations.  It 
  61. worked, but it took hours, 5000 iterations.  This was no good - I could 
  62. do it on paper quicker!  Some sort of guess would have to be made.
  63.  
  64. The third problem was what figure to put in.  Eventualy I settled on 
  65. calculating the simple (interest + principle) and dividing by the term 
  66. in months - (E8).  I hope this does not reveal some ghastly flaw but 
  67. this proved too high, so the whole thing is multiplied by 0.94 to get a 
  68. near guess for all variations.
  69.  
  70. Out of interest - pun intended - the amount paid by the borrower, their 
  71. saving and interest paid is also calculated.
  72.  
  73. What a lot of words for 15 cells of calculation.
  74.  
  75. The lump sum versus monthly payments calculation only needed an answer 
  76. to the nearest year and so did not need to be so sophisticated.  It 
  77. could be made more sophistaced by computing the actual break-even 
  78. figure and then calculating the time, or, even better, exporting it to 
  79. PresenterII (which I haven't got) and producing a graph.
  80.