A library to calculate effective interest rate. Also know as XIRR or effective APR.
github.com/Nyholm/effective-interest-rate-js
Nyholm/effective-interest-rate-js