Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orcaman/financial
think numpy's financial (npv, irr, etc.) but in go
https://github.com/orcaman/financial
Last synced: about 2 months ago
JSON representation
think numpy's financial (npv, irr, etc.) but in go
- Host: GitHub
- URL: https://github.com/orcaman/financial
- Owner: orcaman
- License: mit
- Created: 2017-06-02T18:24:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-09T14:02:17.000Z (over 7 years ago)
- Last Synced: 2024-10-20T17:23:51.176Z (2 months ago)
- Language: Go
- Size: 18.6 KB
- Stars: 136
- Watchers: 7
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# financial [![CircleCI](https://circleci.com/gh/orcaman/financial.svg?style=svg)](https://circleci.com/gh/orcaman/financial) [![GoDoc](https://godoc.org/github.com/orcaman/financial?status.svg)](https://godoc.org/github.com/orcaman/financial)
package `financial` features common financial functions, and is intended to be a golang version of [numpy's financial functions](https://docs.scipy.org/doc/numpy/reference/routines.financial.html).
## Supported Functions:
- NPV(r, values): returns the NPV (Net Present Value) of a cash flow series given an interest rate r, or an error. See [usage example](https://godoc.org/github.com/orcaman/financial#example-NPV).
- IRR(values): returns the Internal Rate of Return (using newton raphson approximation). See [usage example](https://godoc.org/github.com/orcaman/financial#example-IRR).
- FV(pv, r, compoundedAnnually, n): gets the present value, the interest rate (compounded annually if needed) and the number of periods and returns the future value. See [usage example](https://godoc.org/github.com/orcaman/financial#example-fv).## TODO:
- pv(rate, nper, pmt[, fv, when]) Compute the present value.
- pmt(rate, nper, pv[, fv, when]) Compute the payment against loan principal plus interest.
- ppmt(rate, per, nper, pv[, fv, when]) Compute the payment against loan principal.
- ipmt(rate, per, nper, pv[, fv, when]) Compute the interest portion of a payment.
- mirr(values, finance_rate, reinvest_rate) Modified internal rate of return.
- nper(rate, pmt, pv[, fv, when]) Compute the number of periodic payments.
- rate(nper, pmt, pv, fv[, when, guess, tol, ...]) Compute the rate of interest per period.