Calculates the internal rate of return for a series of cash flows. The cash
flows do not have to be even, as they would be for an annuity. However, the
cash flows must occur at regular intervals, such as monthly or annually. The
internal rate of return is the interest rate received for an investment
consisting of payments (negative values) and income (positive values) that
occur at regular periods.
Remarks:
Uses an iterative technique for calculating the internal rate of return.
Starting with guess, this function cycles through the calculation until
the result is accurate within a small absolute threshold. If this function
can't find a result that works after 100 tries, a RangeError is thrown.
This function is closely related to calculateNetPresentValue(), the net
present value function. The rate of return calculated by this function is
the interest rate corresponding to a 0 (zero) net present value.
Parameters
options: InternalRateOfReturnOptions
The internal rate of return
calculation options.
Returns number
The internal rate of return.
Throws
When inputs are invalid or the algorithm cannot
converge.
Calculates the internal rate of return for a series of cash flows. The cash flows do not have to be even, as they would be for an annuity. However, the cash flows must occur at regular intervals, such as monthly or annually. The internal rate of return is the interest rate received for an investment consisting of payments (negative values) and income (positive values) that occur at regular periods.
Remarks:
guess, this function cycles through the calculation until the result is accurate within a small absolute threshold. If this function can't find a result that works after 100 tries, a RangeError is thrown.calculateNetPresentValue(), the net present value function. The rate of return calculated by this function is the interest rate corresponding to a 0 (zero) net present value.