numpy.mirr() in Python
numpy.mirr(values, finance_rate, reinvest_rate) : This financial function helps user to compute modified IRR Value i.e. Modified Internal Rate of Return ie. “average” periodically compounded rate of return
IRR equals to –

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 Withdrawls at regular interval : 50, 31, 3, 11 ''' Solution = np.mirr([-500, 50, 31, 3, 11], .34, .21) print("Solution - Modified Internal Rate of Return : ", Solution) |
Output:
Solution - Modified Internal Rate of Return : -0.26165615714437973
Recommended Posts:
- Python | Index of Non-Zero elements in Python list
- Python | Convert list to Python array
- Important differences between Python 2.x and Python 3.x with examples
- Python | Merge Python key values to list
- Reading Python File-Like Objects from C | Python
- Python | Set 4 (Dictionary, Keywords in Python)
- Python | Add Logging to Python Libraries
- Python | Sort Python Dictionaries by Key or Value
- Python | Add Logging to a Python Script
- Python | Visualizing O(n) using Python
- JavaScript vs Python : Can Python Overtop JavaScript by 2020?
- Python | a += b is not always a = a + b
- abs() in Python
- pow() in Python
- Python vs PHP
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.



