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 recieved on cash amounts.



Return : Modified Internal Rate of Return for periodic input values ie. considering interest values.

Code:

filter_none

edit
close

play_arrow

link
brightness_4
code

# 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) 

chevron_right


Output:

Solution - Modified Internal Rate of Return :  -0.26165615714437973


My Personal Notes arrow_drop_up

Aspire to Inspire before I expire

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.