numpy.fv(rate,nper,pmt,pv,when='end')[source]¶Compute the future value.
nper periods| Parameters: | rate : scalar or array_like of shape(M, )
nper : scalar or array_like of shape(M, )
pmt : scalar or array_like of shape(M, )
pv : scalar or array_like of shape(M, )
when : {{‘begin’, 1}, {‘end’, 0}}, {string, int}, optional
|
|---|---|
| Returns: | out : ndarray
|
Notes
The future value is computed by solving the equation:
fv+pv*(1+rate)**nper+pmt*(1+rate*when)/rate*((1+rate)**nper-1)==0
or, whenrate==0:
fv+pv+pmt*nper==0
References
| [WRW] | 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 InformationStandards (OASIS). Billerica, MA, USA. [ODT Document].Available:http://www.oasis-open.org/committees/documents.php?wg_abbrev=office-formulaOpenDocument-formula-20090508.odt |
Examples
What is the future value after 10 years of saving $100 now, withan additional monthly savings of $100. Assume the interest rate is5% (annually) compounded monthly?
>>>np.fv(0.05/12,10*12,-100,-100)15692.928894335748
By convention, the negative sign represents cash flow out (i.e. money notavailable today). Thus, saving $100 a month at 5% annual interest leadsto $15,692.93 available to spend in 10 years.
If any input is array_like, returns an array of equal shape. Let’scompare different interest rates from the example above.
>>>a=np.array((0.05,0.06,0.07))/12>>>np.fv(a,10*12,-100,-100)array([ 15692.92889434, 16569.87435405, 17509.44688102])