IFinance.MIrr

Fore Syntax

MIrr(Values: Array; FinanceRate: Double; ReinvestRate: Double): Double;

Fore.NET Syntax

MIrr(Values: System.Array; FinanceRate: double; ReinvestRate: double): double;

Parameters

Parameters Description Constraints
Values An array, containing the numbers, for which internal rate of return has to be calculated. It is required to use an array of the Double type.
FinanceRate Interest rate for money used in cash flows. Cannot be equal to 0.
ReinvestRate Interest rate for cash flows in case of their reinvestment.  

Description

The Mirr method returns modified internal rate or return for a set of periodic cash flows.

Comments

Values must contain at least one positive and one negative value.

Mirr is calculated using the following formula:

Where:

Fore Example

To execute the example, add a link to the MathFin system assembly.

Sub UserProc;
Var
    r: Double;
    Arr: Array[3Of Double;
Begin
    Arr[0] := -1;
    Arr[1] := 1.5;
    Arr[2] := 2.5;
    r := Finance.MIrr(Arr, 
0.15, 0.1);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays modified internal rate of return equal to 1.0372.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.MathFin;

Public Shared Sub Main(Params: StartParams);
Var
    r: double;
    Finance: FinanceClass = New FinanceClass();
    Arr: Array[3Of Double;
Begin
    Arr[0] := -1;
    Arr[1] := 1.5;
    Arr[2] := 2.5;
    r := Finance.MIrr(Arr, 0.15, 0.1);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IFinance