TBILLEQ
Updated 2023-10-05 19:45:40.707000
Syntax
SELECT [westclintech].[wct].[TBILLEQ] (
<@Settlement, datetime,>
,<@Maturity, datetime,>
,<@Discount, float,>)
Description
Use the scalar function TBILLEQ to calculate the bond-equivalent yield for a Treasury bill.
Arguments
@Settlement
the settlement date of the security. @Settlement is an expression that returns a datetime or smalldatetime value, or a character string in date format.
@Discount
the security’s discount rate. @Discount is an expression of type float or of a type that can be implicitly converted to float.
@Maturity
the maturity date of the security. @Maturity is an expression that returns a datetime or smalldatetime value, or a character string in date format.
Return Type
float
Remarks
If @Discount < 0 TBILLEQ returns an error.
If @Settlement > @Maturity TBILLEQ returns an error.
If @Maturity is more than 1 year after @Settlement TBILLEQ returns an error.
The following formula is used :TBILLEQ = (365*@Discount)/(360-(@Discount*DSM))
WhereDSM is the number of days from @Settlement to @Maturity
Examples
SELECT wct.TBILLEQ('2/1/2008', '6/1/2008', .048);
Here is the result set.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"0.04946469711343"}]}