开发者

How to calculate compound interest by days?

开发者 https://www.devze.com 2023-01-29 23:31 出处:网络
I am writing a Java application to calculate interest. The formu开发者_如何学Golas for Simple, Compound, and Continuously Compounded interest use years to calculate the amount accumulated, but I want

I am writing a Java application to calculate interest. The formu开发者_如何学Golas for Simple, Compound, and Continuously Compounded interest use years to calculate the amount accumulated, but I want to use days so that my software updates more frequently. What formulas should I use? This is an Android project with JodaTime implemented for handling dates.


Compound Interest Multiple = [1+(Annual Interest in decimals/365)]^(number of days).

(The above assumes interest is applied or earned daily.)

Although not asked as a part of your question...if you want CONTINUOUS compounding,

Compound Interest Multiple = e^(Annual Interest in decimals*Time (as a fraction of years))

(The above assumes interest is applied or earned continuously.)


In finance, interests follow a yield curve, so the interest waries base don the number of days in the period. e.g. http://en.wikipedia.org/wiki/Yield_curve you can see even for US rates (for the US dollar) it varies from day to day. http://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield

Another compilcation is that there are different ways to calculate daily rates. One way to calculate rates is to assume there are 365 days in the year (even for leap years), but 360 is more common, some bonds only count working days. In short it all depends on the currency.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号