IFinance.YieldF

Syntax

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

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

Parameters

Settlement. The payment day on securities. Must be less than Maturity

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

Rate. Annual interest rate for coupons on securities. Must be positive.

Price. The security's price per $100 face value. Must be positive.

Redemption. The security's redemption price 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 YieldF method returns yield for securities, for which interest is paid regularly.

Comments

If only one or less coupon periods fit until the maturity date, the YieldF function is calculated, using the following formula:

,

where:

Fore Example

Add a link to the MathFin system assembly.

Sub UserProc;
Var
    r: Double;
Begin
    r := Finance.YieldF(DateTime.ComposeDay(2008,01,01), DateTime.ComposeDay(2008,06,01), 0.1514515010
);
    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(2008,01,01);
    DateTime2 := New DateTime(2008,06,01);
    r := Finance.YieldF(DateTime1, DateTime2, 0.1514515010);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

After executing the example the console window displays the securities profitability equal to 0.1756.

See also:

IFinance