wct.DISC
Updated: 30 September 2008
Use wct.DISC to calculate the discount rate for a security.
Syntax
SELECT [westclintech].[wct].[DISC] (
<@Settlement, datetime,>
,<@Maturity, datetime,>
,<@Pr, float,>
,<@Redemption, float,>
,<@Basis, nvarchar(4000),>)
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.
@Pr
The security’s price per 100 face value. @Pr is an expression of type float or of a type that can be implicitly converted to float.
@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.
@Basis
is the type of day count to use. @Basis is an expression of the character string data type category.
|
Basis
|
Day count basis
|
|
0 or omitted
|
US (NASD) 30/360
|
|
1
|
Actual/Actual
|
|
2
|
Actual/360
|
|
3
|
Actual/365
|
|
4
|
European 30/360
|
Return Type
float
Remarks
· If @Pr <= 0 or if @redemption <= 0, wct.DISC returns an error
· If @Settlement >= @maturity, wct.DISC returns an error
· If @Basis < 0 or @Basis > 4, wct.DISC returns an error
Examples
SELECT wct.DISC('1/25/2007'
,'6/15/2007'
,97.975
,100
,3)
Here is the result set
----------------------
0.0524202127659576
|
View Topic History
|