IFinance.Price

Syntax

Price(Settlement: DateTime; Maturity: DateTime; Rate: Double; YieldP: Double; Redemption: Double; Frequency: Integer; [Basis: Integer = 0]): Double;

Price(Settlement: System.DateTime; Maturity: System.DateTime; Rate: double; YieldP: double; Redemption: double; Frequency: integer; Basis: integer): double;

Parameters

Settlement. The payment day on securities. Must be greater than Issue.

Maturity. The security's maturity date. Must be greater than FirstCouponDate.

LastCouponDate. The date of the last coupon payment on securities. Must be less than Settlement.

Rate. The security's interest rate. Must be positive.

YieldP. The annual income on securities. Must be positive.

Redemption. The security's redemption value per $100 face value. Must be positive.

Frequency. The annual number of coupon payments. The parameter can take the following values:

Basis. The day calculation method used. Select a value from 0 to 4:

Description

The Price method returns the price for $100 of securities face value, for which periodic interest is paid.

Comments

To get yield of securities, by which regular interest payments are executed, use the IFinance.YieldF method.

Example

Add a link to the MathFin system assembly.

Sub UserProc;
Var
    r: Double;
Begin
    r := Finance.
Price(DateTime.ComposeDay(2007,01,01), DateTime.ComposeDay(2007,10,01), 0.050.35151010);
    Debug.WriteLine(r);
End Sub UserProc;

Imports Prognoz.Platform.Interop.MathFin;

Public Shared Sub Main(Params: StartParams);
Var
    r: double;
    Finance: FinanceClass = New FinanceClass();
    DateTime1, DateTime2: System.DateTime;
Begin
    DateTime1 := New DateTime(2007,01,01);
    DateTime2 := New DateTime(2007,10,01);
    r := Finance.Price(DateTime1, DateTime2, 0.050.35151010);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

After executing the example the console window displays a price for 100$ of securities face value equal to 1198.75.

See also:

IFinance