Are there any Java APIs or built-in functions to solve annuity problems?

My boss asked me to create a module to calculate reverse compounds

The question is: if I want to achieve $1.000 in 24 months 000,00, the interest rate is 18% / year (or 1.5% / month) How much do I save every month?

I searched the Internet, but I found nothing except that people mentioned excel formula Do you know what the mathematical formula of this case is?

I use Java in this module Is there a Java library or API?

Solution

Let's say you invest d dollars at the beginning of each month to earn monthly compound interest rate for m months We will set I = R / 12 At the end of m months, you will have

D * (1 + i)^M + D * (1 + i)^(M - 1) + D * (1 + i)^(M - 2) + ...
    D * (1 + i)

In your account This is because dollar D in the first month invested m months, dollar D in the second month invested M-1 months, and so on This is a geometric progression and is simplified to

D * (1 + i) * ((1 + i)^M - 1) / i.

Therefore, if you want to use X in your account at the end of m months, you need to solve it

X = D * (1 + i) * ((1 + i)^M - 1) / i

Obtained for D

D = X * i / ((1 + i) * ((1 + i)^M - 1)).

You don't need an API to solve this problem now, because you can see that the solution is very simple The concepts you might want to read are annuities

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>