RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Math.InternalRateOfReturn Function

Calculates the internal rate of return for an investment.

Pascal
function InternalRateOfReturn(const Guess: Extended; const CashFlows: array of Double): Extended;
C++
Extended InternalRateOfReturn(const Extended Guess, const array of Double CashFlows);

Math

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). 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!