numpy.rate

numpy.rate(nper, pmt, pv, fv, when='end', guess=0.10000000000000001, tol=9.9999999999999995e-07, maxiter=100)

Compute the rate of interest per period.

Parameters:

nper : array_like

Number of compounding periods

pmt : array_like

Payment

pv : array_like

Present value

fv : array_like

Future value

when : {{‘begin’, 1}, {‘end’, 0}}, {string, int}, optional

When payments are due (‘begin’ (1) or ‘end’ (0))

guess : float, optional

Starting guess for solving the rate of interest

tol : float, optional

Required tolerance for the solution

maxiter : int, optional

Maximum iterations in finding the solution

Notes

The rate of interest rate is computed by solving the equation:

fv + pv*(1+rate)**nper + pmt*(1+rate*when)/rate * ((1+rate)**nper - 1) = 0

or, if rate = 0:

fv + pv + pmt * nper = 0

Previous topic

numpy.nper

Next topic

Set routines

This Page

Quick search