Login     Register

        Contact Us     Search

XLeratorDB/financial Documentation

SQL Server TBILLPRICE function


TBILLPRICE
 
Updated: 5 August 2010
Use TBILLPRICE to calculate the price per $100 face value for a Treasury bill.
Syntax
SELECT [westclintech].[wct].[TBILLPRICE] (
   <@Settlement, datetime,>
 ,<@Maturity, datetime,>
 ,<@Discount, float,>)
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. 
@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. 
@Discount
the security’s discount rate. @Discount is an expression of type float or of a type that can be implicitly converted to float.
Return Type
float
Remarks
·         If @Discount < 0 TBILLPRICE returns an error
·         If @Settlement > @Maturity TBILLPRICE returns an error
·         If @Maturity is more than 1 year after @Settlement TBILLPRICE returns an error
·         The following formula is used :
TBILLPRICE = 100*(1-(@discount*DSM/360))
Where DSM is the number of days from @Settlement to @Maturity
 
Example
SELECT wct.TBILLPRICE('2/1/2008'
,'6/1/2008'
,.048)
Here is the result set
----------------------

98.3866666666667



Copyright 2008-2013 WestClinTech LLC         Privacy Policy        Terms of Service