numpy.mirr(values, finance_rate, reinvest_rate) : This financial function helps user to compute modified IRR Value i.e. Modified Internal Rate of Return ie. âaverageâ periodically compounded rate of return
IRR equals to -Â

Parameters :Â
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 received on cash amounts.
Return : Modified Internal Rate of Return for periodic input values ie. considering interest values.
Code:Â
# Python program explaining
# mirr() function
import numpy as np
'''
Question :
Investment = 500
Withdrawals 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)
Output:Â
Solution - Modified Internal Rate of Return : -0.26165615714437973
Â