TKnwIRR Description

TKnwIRR Description

Top  Previous  Next

TKnwIRR is a non-visual, data aware component that may be connected to a table or data set that contains dates and corresponding cash flow columns. Once connected, when the Execute method is called, TKnwIRR loads the cash flow into memory and computes an approximate annualized internal rate of return ("IRR") of a project or investment. Features include:

Unlike Dephi's InternalRateOfReturn function (Math namespace), TKnwIRR does not require cash flow amounts to occur at regular intervals. TKnwIRR provides solutions like Excel's XIRR function.

Unlike TurboPower SysTools' excellent NonperiodicIRR function which uses the Newton method of convergence , TKnwIRR provides two solution methods as options.

TKnwIRR handles loading of the cash flow data from a dataset at run time.

If a salvage value is not included in the cash flow data, one can be added.

The IRR may be calculated for a portion of the cash flows, e.g., if the cash flows encompass a number of years, an IRR for a single year may be calculated by providing starting and ending values.

IRR may be defined as the interest rate at which the net present value ("NPV") of all the cash flows (both positive and negative) from a project or investment equal zero. See Wikipedia's discussion of Internal Rate of Return for further information. However, an acceptable approximation will not normally require iterating until the NPV is actually zero. Therefore, an IRRPrecision property is provided to avoid unnecessary and excessive iterations.

Solving for an IRR is an iterative process which can be quite tedious when performed manually. TKnwIRR provides two solution methods: (i) the secant method* and (ii) a more brute force approach, the bisection method. The secant method is usually much faster, obtaining a satisfactory solution in the fewest iterations. However, it occasionally refuses to converge or arrives at a false convergence.

TKnwIRR will raise errors when problems arise in achieving a solution, providing an opportunity for the programmer to switch solution methods or take other steps to resolve the problem.

 

* The secant method used in this component was inspired by a Thomas E. Cook article that appeared in the August 15, 1988, issue of Chemical Engineering.