Open In App

numpy.irr() in Python

Improve
Improve
Like Article
Like
Save
Share
Report

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: 

Python3




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


Output: 

Solution - Internal Rate of Return :  -0.5296447721512683 

Last Updated : 05 Aug, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads