IFinance.TBillYield

Fore Syntax

TBillYield(Settlement: DateTime; Maturity: DateTime; Price: Double): Double;

Fore.NET Syntax

TBillYield(Settlement: System.DateTime; Maturity: System.DateTime; Price: double): double;

Parameters

Parameters Description Constraints
Settlement Date of settlement of a treasury bill. Must be less than Maturity.
Maturity Treasurer's bill maturity date. Must be greater than Settlement.
Price Discount for a treasurer's bill. Must be positive.

Description

The TBillYield method returns yield for a treasury bill.

Comments

TBillYield is calculated using the following formula:

Where DSM - the number of days from settlement to maturity date, excluding the maturity date, which is more than one calendar year more than the settlement date.

Fore Example

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

Sub UserProc;
Var
    r: Double;
Begin
    r := Finance.
TBillYield(DateTime.ComposeDay(2007,01,01), DateTime.ComposeDay(2008,09,01), 87.79);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the yield equal to 0.0834.

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();
    DateTime1, DateTime2: System.DateTime;
Begin
    DateTime1 := New DateTime(2007,01,01);
    DateTime2 := New DateTime(2008,09,01);
    r := Finance.TBillYield(DateTime1, DateTime2, 87.79);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IFinance