IFinance.NPer

Fore Syntax

NPer(Rate: Double;

PeriodPayment; Double;

PresentValue: Double;

FutureValue: Double;

Type: Integer): Double;

Fore.NET Syntax

NPer(Rate: double;

PeriodPayment; double;

PresentValue: double;

FutureValue: double;

Type: integer): double;

Parameters

Parameters Description Constraints
Rate Interest rate for a period. Cannot be negative.
PeriodPayment The payment, made each period; this value cannot change during the whole payments period. The payment usually consists of the primary payment and the interest payment, and does not include taxes.  
PresentValue Present net value or the total sum, which is currently equal to the set of future payments.  
FutureValue The required value of future cost, or the remainder after the last payment.  
Type Selecting time of payment:
0 - in the end of the period.
1 - in the beginning of the period.
Must take the value 0 or 1.

Description

The NPer method returns the number of periods of payment for investments based on periodic regular payments and constant interest rate.

Comments

NPer is calculated using the following formula:

Fore Example

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

Sub UserProc;
Var
    r: Double;
Begin
    r := Finance.
NPer(0.011, -100, -80050000);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the total number of settlement periods equal to 32.35.

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();
Begin
    r := Finance.NPer(0.011, -100, -80050000);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IFinance