numpy.fv(rate,nper,pmt,pv,when ='end'):此财务函数可帮助用户计算未来价值。
参数:
-
rate : [标量或(M,)数组]每个周期的利率为十进制(不是百分比)
nper : [标量或(M,)数组]总复利期
pmt : [标量或(M,)array]固定付款
pv : [标量或(M,)数组]现值
when : 在每个期间的开始(当= {'开始',1}时)或结束(当= {'结束',0}时)。默认值为{‘end’,0}
返回:
value at the end of nper periods
求解方程:
fv + pv*(1+rate)**nper + pmt*(1 + rate*when)/rate*((1 + rate)**nper - 1) == 0
或当费率== 0
fv + pv + pmt * nper == 0
代码1:工作
# Python program explaining fv() function
import numpy as np
'''
Question :
Future value after 10 years of saving $100 now,
with an additional monthly savings of $100.
Assume the interest rate is 5% (annually)
compounded monthly ?
'''
# rate np pmt pv
Solution = np.fv(0.05/12, 10*12, -100, -100)
print("Solution : ", Solution)
输出:
Solution : 15692.9288943
参考文献:
https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.fv.html#numpy.fv
。
相关用法
注:本文由纯净天空筛选整理自Mohit Gupta_OMG 大神的英文原创作品 numpy.fv() in Python。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。