2
我需要一個公式來計算利率支付涉及利率,其他相關公式如下:如何找到支付
FV = (PMT * k/ip) - Math.pow((1 + ip), N) * (PV + PMT * k/ip);
PV = (PMT * k/ip - FV) * 1/Math.pow(1 + ip, N) - PMT * k/ip;
PMT = (PV + ((PV+FV)/(Math.pow((1+ip),N)-1))) * ((-ip)/k);
ip = ????
Where:
PV = Present Value
ip = Interest Rate per period
N = Number of periods
PMT = Payment
k = 1 if payment is made at the end of the period; 1 + ip if made at the beginning of the period
FV = Future Value
有人曾問上Calculate interest rate in Java (TVM)同樣的問題,但仍然無法找到正確答案。
提出的解決方案是將替換所有已知的變量到下面的公式,然後選擇IP一系列的值,直到表達式等於零:
0 = (PV * Math.pow(1 + ip, N)) + ((PMT * k) * (Math.pow(1 + ip, N) - 1)/ip) + FV
如何創建一個函數來完成這樣的迭代或有沒有簡單的公式來解決這個問題?
我不知道你的公式是正確的。你在哪裏得到它們?無論如何,這些方程不能明確地解決'ip'問題。一種方法是用你想要的任何方程來使用牛頓的方法。 – Teepeemm
這些公式經過測試和正確,它來自http://www.getobjects.com/Components/Finance/TVM/formulas.html – xpw