📜  Python中的 numpy.fv()

📅  最后修改于: 2022-05-13 01:54:50.493000             🧑  作者: Mango

Python中的 numpy.fv()

numpy.fv(rate, nper, pmt, pv, when = 'end') :此财务函数可帮助用户计算未来值。

参数 :

返回 :

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
.