numpy.irr() in Python

numpy.irr(values) : This financial function helps user to compute IRR Value i.e. Internal Rate of Return ie. “average” periodically compounded rate of return.

Parameters :
values : [array-like] Input cash flows per time period. net “deposits” are negative and net “withdrawals” are positive



Return : Internal Rate of Return for periodic input values.

Code:

filter_none

edit
close

play_arrow

link
brightness_4
code

# Python program explaining 
# irr() function 
  
import numpy as np 
''' 
Question : 
  
    Investmnt = 500
    Withdrawls at regular interval : 50, 31, 3, 11
'''
  
Solution = np.irr([-500, 50, 31, 3, 11])
  
print("Solution - Internal Rate of Return : ", Solution) 

chevron_right


Output:

Solution - Internal Rate of Return :  -0.5296447721512683


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.