numpy.mirr(values,finance_rate,reinvest_rate):此财务函数可帮助用户计算修改后的IRR值,即修改后的内部收益率,即“average”定期复合收益率
内部收益率等于-
参数:
values : [array-like] Input cash flows per time period. net “deposits” are negative and net “withdrawals” are positive
finance_rate : Interest paid on cash amounts.
reinvest_rate: Interest recieved on cash amounts.
返回: Modified Internal Rate of Return for periodic input values ie. considering interest values.
代码:
# Python program explaining
# mirr() function
import numpy as np
'''
Question:
Investmnt = 500
Withdrawls at regular interval:50, 31, 3, 11
'''
Solution = np.mirr([-500, 50, 31, 3, 11], .34, .21)
print("Solution - Modified Internal Rate of Return:", Solution)
输出:
Solution - Modified Internal Rate of Return: -0.26165615714437973
相关用法
注:本文由纯净天空筛选整理自Mohit Gupta_OMG 大神的英文原创作品 numpy.mirr() in Python。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。