Login     Register

        Contact Us     Search

XLeratorDB/financial Documentation

SQL Server COUPNCD function


COUPNCD
 
Updated: 5 August 2010

Use COUPNCD to calculate the next coupon date after the settlement date.
 
Syntax
SELECT [westclintech].[wct].[COUPNCD] (
  <@Settlement, datetime,>
 ,<@Maturity, datetime,>
 ,<@Frequency, float,>
 ,<@Basis, nvarchar(4000),>)
Arguments
@Settlement
the settlement date occurring within the coupon period 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 instrument. @Maturity is an expression that returns a datetime or smalldatetime value, or a character string in date format. 
@Frequency
the number of coupon payments per year. For annual payments, @Frequency = 1; for semi-annual @Frequency = 2; for quarterly, @Frequency = 4; for monthly, @Frequency = 12. @Frequency 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
datetime
Remarks
·         A settlement date occurs in the coupon period where the settlement date is greater than or equal to start date of the coupon period and less than the end date of the coupon period (as the end date of one period is the start date of the next period)
·         If the @Frequency is any number other than 1, 2, 4, or 12, COUPNCD returns an error
·         If @Basis < 0 or @Basis > 4, COUPNCD returns an error
·         If @Settlement > @Maturity, COUPNCD returns an error
·         If @Maturity is the end of the month, then COUPNCD always calculates the next coupon dates as the last of the month.
 
Example 
SELECT wct.COUPNCD('12/16/2007'
,'3/1/2027'
,2
,1)
Here is the result set
-----------------------

2008-03-01 00:00:00.000

 

See Also

 



Copyright 2008-2017 Westclintech LLC         Privacy Policy        Terms of Service