Login    Register

XLeratorDB/financial Documentation

PRICEDISC


PRICEDISC
 
Updated: 5 August 2010
Use PRICEDISC to calculate the price per $100 face value for a discounted security.
 
Syntax
SELECT [westclintech].[wct].[PRICEDISC] (
   <@Settlement, datetime,>
 ,<@Maturity, datetime,>
 ,<@Discount, 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. 
@Discount
the security’s discount rate. @Discount 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 @Discount <= 0 or if @Redemption <= 0, PRICEDISC returns an error
·         If @Settlement >= @Maturity, PRICEDISC returns an error
·         If @Basis < 0 or @Basis > 4, PRICEDISC returns an error
Examples
 
SELECT wct.PRICEDISC('1/25/2007'
,'6/15/2007'
,0.0524202127659576
,100
,3)
 
Here is the result set
----------------------
97.975


  Comments
Add Comment
No Comments Yet


 |  View Topic History  |
Copyright 2010 WestClinTech LLC         Privacy Policy        Terms of Service