Is there any accurate implementation of IRR and PMT function in JavaScript?
I'm developing a new web-based financial application for our company that provides online real-time non-post-back calculation of IRR, and PMT. So,开发者_StackOverflow社区 I'm looking for the implementation/library which provides the IRR and PMT functionality in JavaScript. Please kindly suggest.
Thanks
William
IRR: I just had a poke around and found the class org.apache.poi.ss.formula.functions.Irr, and there is a listing of it here.
Just make sure that you can abide by the license.
That library doesn't appear to have a direct implementation of PMT.
About PMT,you can simply implement by yourself. The detail for PMT(rate, nper, pv): rate is monthly rate, means annual rate/12. nper is the loan terms,like 12,24,36. pv means loan amount.
fv=pv * pow((1 + rate), nper);
PMT=(fv * rate) / (pow((1 + rate), nper) - 1);
There is a gem in Ruby called Exonio: https://github.com/Noverde/exonio.
This gem implements some of the Excel financial formulas.
You can take a look at this gem and converts the calculations to Javascript.
check out: https://formulajs.info/
I was able to use this library to perform the built in Microsoft excel functions (such as IRR) needed
精彩评论