Skip to content

Feature Parity with numpy-financial? #27

@alecloudenback

Description

@alecloudenback

Numpy-financial functions:

  • fv(rate, nper, pmt, pv[, when]) | Compute the future value.
  • ipmt(rate, per, nper, pv[, fv, when]) | Compute the interest portion of a payment.
  • irr(values) | Return the Internal Rate of Return (IRR).
  • mirr(values, finance_rate, reinvest_rate) | Modified internal rate of return.
  • nper(rate, pmt, pv[, fv, when]) | Compute the number of periodic payments.
  • npv(rate, values) | Returns the NPV (Net Present Value) of a cash flow series.
  • 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.
  • pv(rate, nper, pmt[, fv, when]) | Compute the present value.
  • rate(nper, pmt, pv, fv[, when, guess, tol, …]) | Compute the rate of interest per period.

Not sure that we actually want to have all of these. ActuaryUtilities provides a more flexible interface, I think?

E.g. for present value, the above definition restricts you:

  • npv you can have a vector of rates, but not specify the timepoints. And the rate needs to be constant
  • pv is the old calculator bond formula. Great for doing a super simple bond calc, but for everything else...?

In contrast, with ActuaryUtilities present_value(rate,cfs,times) or pv:

  • rate can be a constant or a curve
  • cfs can vary
  • times lets you specify when cashflows occur and they can be of varying magnitude and at uneven times

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    New features

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions