| Contents | Index |
Return = xirr(CashFlow, CashFlowDates)
Return = xirr(CashFlow, CashFlowDates, Guess, MaxIterations,
Basis)
Return = xirr(CashFlow, CashFlowDates) returns the internal rate of return for a schedule of nonperiodic cash flows.
Return = xirr(CashFlow, CashFlowDates, Guess, MaxIterations, Basis) returns the internal rate of return for a schedule of nonperiodic cash flows with optional inputs.
CashFlow |
A vector or matrix of cash flows. If CashFlow is a matrix, each column represents a separate stream of cash flows whose internal rate of return is calculated. The first cash flow of each stream is the initial investment, entered as a negative number. |
CashFlowDates |
(Required) A vector or matrix of serial date numbers the same size as CashFlow, or a cell array of date strings the same size as CashFlow. Each column of CashFlowDate represents the dates of the corresponding column of CashFlow. |
Guess |
The initial estimate of the internal rate of return. Guess is a scalar applied to all streams, or a vector the same length as the number of streams. Default: 0.1 (10%) |
MaxIterations |
The positive integer number of iterations used by Newton's method to solve the internal rate of return. MaxIterations is a scalar applied to all streams, or a vector the same length as the number of streams. Default: 50 |
Basis |
Day-count basis of the instrument. A vector of integers.
For more information, see basis. Default: 0 |
Return |
Vector of the annualized internal rate of return of each cash flow stream. A NaN indicates that a solution is not found. |
Find the internal rate of return for an investment of $10,000 that returns the following nonperiodic cash flow. The original investment is the first cash flow and is a negative number.
Cash Flow | Dates |
|---|---|
($10000) | January 12, 2007 |
$2500 | February 14, 2008 |
$2000 | March 3, 2008 |
$3000 | June 14, 2008 |
$4000 | December 1, 2008 |
Calculate the internal rate of return for this nonperiodic cash flow:
CashFlow = [-10000, 2500, 2000, 3000, 4000];
CashFlowDates = ['01/12/2007'
'02/14/2008'
'03/03/2008'
'06/14/2008'
'12/01/2008'];
Return = xirr(CashFlow, CashFlowDates)
This returns:
Return =
0.1006 (or 10.0644% per annum)Brealey and Myers, Principles of Corporate Finance, McGraw-Hill Higher Education, Chapter 5, 2003.
Sharpe, William F., and Gordon J. Alexander, Investments. Englewood Cliffs, NJ: Prentice-Hall. 4th ed., 1990.
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |