Internal Rate of Return (IRR)

irr(values[, guess, tol, maxiter])

Return the Internal Rate of Return (IRR).

syse.irr(values, guess=0.1, tol=1e-12, maxiter=100)

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.

decimal.Decimal type is not supported.

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.

  • guess (float, optional) – Initial guess of the IRR for the iterative solver. If no guess is given an initial guess of 0.1 (i.e. 10%) is assumed instead.

  • tol (float, optional) – Required tolerance to accept solution. Default is 1e-12.

  • maxiter (int, optional) – Maximum iterations to perform in finding a solution. Default is 100.

Returns:

Internal Rate of Return for periodic input values.

Return type:

float

Example 1:

Stone Sour, Inc. has a project with the following cash flows:

Year | Cash Flows ($)

0 | -30,000

1 | 18,500

2 | 10,200

3 | 9,200

The company evaluates all projects by applying the IRR Rule. If the appropriate interest rate is 9%, should the company accept this project?

import numpy as np
import syse as syse

IRR = syse.irr([-30000, 18500, 10200, 9200])

print(f"IRR = {IRR:.4f}")

IRR = 0.1465

With a rate of 14.65% the company should accept this project because 14.65% is greater than the required cost of capital (COC) of 9%.