Logo

PRICEDISC

Updated 2024-02-29 13:52:02.933000

Syntax

SELECT [westclintech].[wct].[PRICEDISC] (
  <@Settlement, datetime,>
 ,<@Maturity, datetime,>
 ,<@Discount, float,>
 ,<@Redemption, float,>
 ,<@Basis, nvarchar(4000),>)

Description

Use the scalar function PRICEDISC to calculate the price per 100 face value for a discounted security. The PRICEDISC formula is:

\rm{P=RV-DR\times{RV}\times\frac{DSM}{B}}

Where:B = Number of days in the yearDR = Discount RateDSM = Number of days from settlement date to maturity dateP = Price per 100 par valueRV = Redemption Value

Arguments

@Basis

is the type of day count to use. @Basis is an expression of the character string data type category.

{"columns":[{"field":"@Basis","width":313},{"field":"Day count basis","width":277}],"rows":[{"@Basis":"0 , 'BOND'","Day count basis":"US (NASD) 30/360"},{"@Basis":"1 , 'ACTUAL'","Day count basis":"Actual/Actual"},{"@Basis":"2 , 'A360'","Day count basis":"Actual/360"},{"@Basis":"3 , 'A365'","Day count basis":"Actual/365"},{"@Basis":"4 , '30E/360 (ISDA)' , '30E/360' , 'ISDA' , '30E/360 ISDA' , 'EBOND'","Day count basis":"European 30/360"},{"@Basis":"5 , '30/360' , '30/360 ISDA' , 'GERMAN'","Day count basis":"30/360 ISDA"},{"@Basis":"7 , 'NL/365'","Day count basis":"No Leap Year /365"},{"@Basis":"8 , 'NL/360'","Day count basis":"No Leap Year /360"},{"@Basis":"9 , 'A/364'","Day count basis":"Actual/364"},{"@Basis":"21 , 'Actual/ISDA'","Day count basis":"Actual/ISDA"}]}

@Discount

the security’s discount rate. @Discount is an expression of type float or of a type that can be implicitly converted to float.

@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.

@Redemption

the security’s redemption value per 100 face value. @Redemption is an expression of type float or of a type that can be implicitly converted to float.

Return Type

float

Remarks

If @Settlement IS NULL then @Settlement = GETDATE().

If @Basis is NULL then @Basis = 0.

If @Basis is invalid then PRICEDISC returns an error.

Examples

This is a security maturing on 2014-12-15 with a 100 redemption value and a discount rate of 1.5%. The discount rate is quoted using the Actual/365 day-count convention.

SELECT wct.PRICEDISC(   '2014-10-07', --@Settlement

                        '2014-12-15', --@Maturity

                        0.015,        --@Discount

                        100,          --@Redemption

                        3             --@Basis

                    ) as Price;

This produces the following result.

{"columns":[{"field":"","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"Price","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"":"","Price":"99.7164383561644"}]}

This is a security maturing on 2015-02-15 with a 10000 redemption value and a discount rate of 1.9%. The discount rate is quoted using the Actual/360 day-count convention.

SELECT wct.PRICEDISC(   '2014-10-07', --@Settlement

                        '2015-02-15', --@Maturity

                        0.019,        --@Discount

                        10000,        --@Redemption

                        2             --@Basis

                    ) as Price;

This produces the following result.

{"columns":[{"field":"","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"Price","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"":"","Price":"9930.86111111111"}]}

This is a security maturing on 2015-04-15 with a 1,000,000 redemption value and a discount rate of 5.5%. The discount rate is quoted using the Actual/364 day-count convention.

SELECT wct.PRICEDISC(   '2014-10-07', --@Settlement

                        '2015-04-15', --@Maturity

                        0.055,        --@Discount

                        1000000,      --@Redemption

                        9             --@Basis

                    ) as Price;

This produces the following result.

{"columns":[{"field":"","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"Price","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"":"","Price":"971291.208791209"}]}

See Also

DIS - Price, discount rate, and/or yield of a discount security

DISC - Discount rate of a discount security

DISFACTORS - Factors for the price calculation of a discount security

ODDFPRICE - Price of a security with an odd first coupon

ODDLPRICE - Price of a bond with an odd last coupon

OFLPRICE - Price of a security with an odd last coupon.

PRICE - Price of a bond paying regular periodic interest

PRICEMAT - Price of an interest-at-maturity security

PRICESTEP - Calculate the Price of a security with step-up rates

YIELDDISC - Discount rate of a discount security