numpy.npv(汇率,价值):此财务函数可帮助用户计算现金流量系列的NPV(净现值)。
参数:
rate : [scalar] Rate of discount value : [array_like, shape(M,)] value of cash flows time series. The (fixed) time interval between cash flow “events” must be the same as that for given rate is given. By convention, investments or “deposits” are -ve, income or “withdrawals” are +ve
返回:
present value as per given parameters.
求解方程:
代码1:工作
## Python program explaining pv() function
import numpy as np
# rate values
a = np.npv(0.281,[-100, 19, 49, 58, 200])
print("Net Present Value(npv) : ", a)
输出:
Net Present Value(npv) : 46.5579792365
参考文献:
https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.npv.html
。
相关用法
注:本文由纯净天空筛选整理自Mohit Gupta_OMG 大神的英文原创作品 numpy.npv() in Python。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。