Pv(
Rate: Double;
PeriodCount: Integer;
PeriodPayment: Double;
FutureValue: Double;
Type: Integer): Double;
Pv(
Rate: double;
PeriodCount: integer;
PeriodPayment: double;
FutureValue: double;
Type: integer): double;
Parameters | Description | Constraints |
Rate | Loan interest rate. | Cannot be negative. |
PeriodCount | Total number of annuity payment periods. | Must be positive. |
PeriodPayment | A payment, done every period, which does not change over the time of paying the rent. Payments usually include primary payments and interest payments, but do not include taxes. | |
FutureValue | The required value of future cost, or the remainder after the last payment. If the argument is missing, it is supposed to be equal to 0 (future value of a loan, for example, is equal to 0). | |
Type | Selecting time of payment: 0 - in the end of the period. 1 - in the beginning of the period. |
Must take the values 0 or 1. |
The Pv method returns net present (at the current moment) value of investment.
Investment value is calculated based on the calculation of the following equations:
If the rate is 0,
If the rate is not 0,
To execute the example, add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Double;
Begin
r := Finance.Pv(0.15, 12, 122, 12000, 1);
Debug.WriteLine(r);
End Sub UserProc;
After executing the example the console window displays the investment value equal to 3003.399.
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.Pv(0.15, 12, 122, 12000, 1);
System.Diagnostics.Debug.WriteLine(r);
End Sub;
See also: