Financial formula for calculating adjustable rate mortgages?

How can I calculate a fixed payment amount over a loan period that has two different interest rates based on how long the loan has been open?

+4
source share
4 answers

It gets a little ugly, so please bear with me.

Definition:

  • g1 = Starting monthly rate (for 3%, g = 0.03 / 12.)
  • g2 = second monthly rate.
  • T1 = Term for the initial rate (T1 = 3 for 3 months).
  • T2 = Term for subsequent bet.
  • u1 = 1 / (1 + g1)
  • u2 = 1 / (1 + g2)

Then:

  • payment = g1 * g2 / (g1 * u1 ^ T1 * (1 - u2 ^ T2) + g2 * (1 - u1 ^ T1))

Of course, I might have made a mistake, but that seems right.

+4
source

This is a fairly complex calculation, which is usually part of the company's intellectual property. Therefore, I doubt someone will send the code. I went along this road, and it requires enormous trials, depending on how far you decide to go with it.

You might want to check out the following document. It has a lot of math on how to get there.

Plotting depreciation

change
Just add a couple of things. When performing calculations in code, it is extremely important to use a data type, such as Decimal, instead of floating point types, such as double. A decimal value has been explicitly created for these types of cash settlements. Floating-point types will cause a lot of rounding errors, which will cause the calculated values ​​to be disabled by unacceptable sums.

Further, the mortgage calculators that you find on the Internet are of high quality. When testing your method, it will be useful to find out what online calculators came up with, but in no case do not consider them more accurate than yours. As a rule, they can clearly see if you are in the right chalet, but they can be turned off by 0.1% per year of the loan term.

Final note
Ok, this is the last edit. You might want to purchase a library from a company, such as Math Corp, instead of collapsing your own. I am sure it will be accurate and much cheaper than dev / qa time to get your right.

+3
source

Loan contracts are very complex. If you do not want to plunge into complexity, you need to make some simplifying assumptions. Here are some of the variables you need to consider:

  • What is the base rate? Does the prime loan pay? Libor? SMT?
  • What is the limit above the base rate?
  • How often is the base speed reset?
  • What happens if the reset date falls on a holiday? Weekends?
  • Are there ceilings or floors at the base rate?
  • Is there an initial period when the base rate is fixed until the first reset? How long is this period?
  • Is there an initial margin discount that is later adjusted (teaser speed)?
  • What is the term of the mortgage?
  • Is this a negative depreciation mortgage? What is the stop period for negative depreciation payments?
  • Is it a fully amortized mortgage?
  • Is it a balloon installment?
  • Is interest a mere interest or an aggravated interest? If the latter, then what is the frequency of compaction?

As you can see, if you have not indicated enough of the problem you are trying to solve, even begin to come up with a solution.

If you are not an expert in the field of ARM or financial products in general, I highly recommend that you find someone who is.

0
source

The pmt function is based on this math: Payment = Amount of the loan at the current time / (1 - (1 / (1+ current rate) ^ remaining numbers))

Finding out the loan amount at the current time (i.e. after five years of making a payment with a different rate) is the difficult part.

0
source

Source: https://habr.com/ru/post/1300418/


All Articles