14.1 Problem

Sooner or later most of us ordinary folk end up taking a mortgage to buy an apartment or a house.

So here are two scenarios for you:

  1. you borrow $200,000 (principal) for 20 years at 6.49% (constant yearly interest rate)
  2. you borrow $200,000 (principal) for 30 years at 4.99% (constant yearly interest rate)

Write a Julia program that will tell you:

  1. How much money will you pay every month (installment) in both cases (assume fixed rate mortgage)?
  2. How much principal you will still owe to the bank at year 15 in each case?
  3. When will your debt be \(\le\) $100’000?
  4. Which of the two mortgages is more worth it for you (the smaller total cost and total interest you pay to the bank)?

Feel free to add some visual flair to your solution.

BTW. You may read about mortgages, e.g. here.



CC BY-NC-SA 4.0 Bartlomiej Lukaszuk