# numpy.irr¶

numpy.irr(values)[source]

Return the Internal Rate of Return (IRR).

This is the “average” periodically compounded rate of return that gives a net present value of 0.0; for a more complete explanation, see Notes below.

Parameters: values : array_like, shape(N,) Input cash flows per time period. By convention, net “deposits” are negative and net “withdrawals” are positive. Thus, for example, at least the first element of values, which represents the initial investment, will typically be negative. out : float Internal Rate of Return for periodic input values.

Notes

The IRR is perhaps best understood through an example (illustrated using np.irr in the Examples section below). Suppose one invests 100 units and then makes the following withdrawals at regular (fixed) intervals: 39, 59, 55, 20. Assuming the ending value is 0, one’s 100 unit investment yields 173 units; however, due to the combination of compounding and the periodic withdrawals, the “average” rate of return is neither simply 0.73/4 nor (1.73)^0.25-1. Rather, it is the solution (for ) of the equation: In general, for values , irr is the solution of the equation: [G32] References

 [G32] (1, 2) L. J. Gitman, “Principles of Managerial Finance, Brief,” 3rd ed., Addison-Wesley, 2003, pg. 348.

Examples

>>> round(irr([-100, 39, 59, 55, 20]), 5)
0.28095
>>> round(irr([-100, 0, 0, 74]), 5)
-0.0955
>>> round(irr([-100, 100, 0, -7]), 5)
-0.0833
>>> round(irr([-100, 100, 0, 7]), 5)
0.06206
>>> round(irr([-5, 10.5, 1, -8, 1]), 5)
0.0886


(Compare with the Example given for numpy.lib.financial.npv)

numpy.ipmt

numpy.mirr
{"ft_lang_label":"__label__en","ft_lang_prob":0.7754457,"math_prob":0.99350137,"size":1588,"snap":"2019-13-2019-22","text_gpt3_token_len":475,"char_repetition_ratio":0.11237374,"word_repetition_ratio":0.0,"special_character_ratio":0.34193954,"punctuation_ratio":0.23943663,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99713296,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,1,null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-05-23T17:22:17Z\",\"WARC-Record-ID\":\"<urn:uuid:028bd3bf-aca1-4f52-89c4-05ffa2543eab>\",\"Content-Length\":\"10504\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9469481e-2668-4225-9a72-561079e0bf62>\",\"WARC-Concurrent-To\":\"<urn:uuid:69841f24-acef-4bcf-9d8b-149d24736770>\",\"WARC-IP-Address\":\"50.17.248.72\",\"WARC-Target-URI\":\"https://docs.scipy.org/doc/numpy-1.10.4/reference/generated/numpy.irr.html\",\"WARC-Payload-Digest\":\"sha1:4HH5VKIXAMCE7PVAFJYYCBP2S2DOFXX5\",\"WARC-Block-Digest\":\"sha1:GGCVMKOONO5ZZHFUB6HEIFDZA45UTPRL\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-22/CC-MAIN-2019-22_segments_1558232257316.10_warc_CC-MAIN-20190523164007-20190523190007-00209.warc.gz\"}"}