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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。