numpy.
rate
Compute the rate of interest per period.
Deprecated since version 1.18: rate is deprecated; for details, see NEP 32 [1]. Use the corresponding function in the numpy-financial library, https://pypi.org/project/numpy-financial.
Number of compounding periods
Payment
Present value
Future value
When payments are due (‘begin’ (1) or ‘end’ (0))
Starting guess for solving the rate of interest, default 0.1
Required tolerance for the solution, default 1e-6
Maximum iterations in finding the solution
Notes
The rate of interest is computed by iteratively solving the (non-linear) equation:
fv + pv*(1+rate)**nper + pmt*(1+rate*when)/rate * ((1+rate)**nper - 1) = 0
for rate.
References
NumPy Enhancement Proposal (NEP) 32, https://numpy.org/neps/nep-0032-remove-financial-functions.html
Wheeler, D. A., E. Rathke, and R. Weir (Eds.) (2009, May). Open Document Format for Office Applications (OpenDocument)v1.2, Part 2: Recalculated Formula (OpenFormula) Format - Annotated Version, Pre-Draft 12. Organization for the Advancement of Structured Information Standards (OASIS). Billerica, MA, USA. [ODT Document]. Available: http://www.oasis-open.org/committees/documents.php?wg_abbrev=office-formula OpenDocument-formula-20090508.odt