Saturday, November 15, 2025
HomeLanguagesnumpy.mirr() in Python

numpy.mirr() in Python

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: 

Python3




# 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

 

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32399 POSTS0 COMMENTS
Milvus
95 POSTS0 COMMENTS
Nango Kala
6765 POSTS0 COMMENTS
Nicole Veronica
11917 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11984 POSTS0 COMMENTS
Shaida Kate Naidoo
6890 POSTS0 COMMENTS
Ted Musemwa
7143 POSTS0 COMMENTS
Thapelo Manthata
6838 POSTS0 COMMENTS
Umr Jansen
6840 POSTS0 COMMENTS