Saturday, November 16, 2024
Google search engine
HomeLanguagesnumpy.irr() in Python

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: 

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 
RELATED ARTICLES

Most Popular

Recent Comments