numpy.irr () in Python

NumPy | Python Methods and Functions

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:

# Python program explaining
# irr ( ) function

 

import numpy as np 

“” ”
Question:

 

Investmnt = 500

Pickup at regular intervals: 50, 31, 3, 11

"" "

  

Solu tion = np.irr ([ - 500 , 50 , 31 , 3 , 11 ])

 

print ( "Solution - Internal Rate of Return:" , Solution) 

Exit :

 Solution - Internal Rate of Return: -0.5296447721512683 




Get Solution for free from DataCamp guru