numpy.mirr () in Python

NumPy | Python Methods and Functions

IRR is —

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:

# Python program explaining
# mirr () function

 

import numpy as np 

"" "
Question:

 

Investmnt = 500

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

"" "

  

Solution = np .mirr ([ - 500 , 50 , 31 , 3 , 11 ],. 34 ,. 21 )

 

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

Exit :

 Solution - Modified Internal Rate of Return: -0.26165615714437973 




Get Solution for free from DataCamp guru