NumPy has a number of financial functions:
fv()
function calculates the so-called future value. The future value gives the value of a financial instrument at a future date, based on certain assumptions.pv()
function computes the present value (see https://www.khanacademy.org/economics-finance-domain/core-finance/interest-tutorial/present-value/v/time-value-of-money). The present value is the value of an asset today.npv()
function returns the net present value. The net present value is defined as the sum of all the present value cash flows.pmt()
function computes the payment against loan principal plus interest.irr()
function calculates the internal rate of return. The internal rate of return is the effective interested rate, which does not take into account inflation.mirr()
function calculates the modified internal rate of return. The modified internal rate of return is an improved version of the internal rate of return.nper()
function returns the number of periodic payments.rate()
function calculates the rate of interest.