From RAD Studio API Documentation
Jump to: navigation, search


function InternalRateOfReturn(const Guess: Extended; const CashFlows: array of Double): Extended;


extern DELPHI_PACKAGE System::Extended __fastcall InternalRateOfReturn(const System::Extended Guess, const double *CashFlows, const int CashFlows_High);


Type Visibility Source Unit Parent
function public
System.Math System.Math


Calculates the internal rate of return for an investment.

InternalRateOfReturn determines the internal rate of return on an investment. It references an array that contains cash flow information and uses the supplied internal rate of return estimate to calculate results.

Before using this function, define an array containing expected cash flow amounts over a period of time. It is assumed that the amounts are received at regular intervals. Negative amounts are interpreted as cash outflows, and positive amounts as inflows. The first amount must be a negative number, to reflect the initial investment. The following amounts can all be the same for each time period, or they can be different (including a mixture of negatives, positives, or zeros).

Specify the estimated rate of return as the Guess parameter. Pass the array of expected cash flow amounts as the CashFlows parameter. In C++, the CashFlows_Size parameter gives the index of the last entry in CashFlows (one less than the number of entries).

See Also