SQL Server ACCRINTM Function
Updated 2023-10-06 11:45:58.967000
Description
Use the scalar function ACCRINTM to calculate the accrued interest for a security that pays interest at maturity.
Syntax
SELECT [westclintech].[wct].[ACCRINTM] (
<@Issue, datetime,>
,<@Settlement, datetime,>
,<@Rate, float,>
,<@Par, float,>
,<@Basis, nvarchar(4000),>)
Arguments
@Issue
the issue date of the security. @Issue is an expression that returns a datetime or smalldatetime value, or a character string in date format.
@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.
@Rate
the coupon rate of the security expressed in decimal terms. @Rate is an expression of type float or of a type that can be implicitly converted to float.
@Par
the par value of the security. @Par 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
Remarks
If @Basis < 0 or @Basis > 4, ACCRINTM returns an error.
Examples
SELECT wct.ACCRINTM('04/01/2008', '06/15/2008', .1, 1000, 3);
Here is the result set
| column 1 |
|---|
| 20.5479452054795 |
See Also
ACCRINT - Calculate the accrued interest for a security that pays periodic interest.
AIFACTOR - Calculate the Accrued Interest Factor
AIFACTOR_IAM - Calculate the Accrued Interest Factor for an Interest-at-Maturity security
AIFACTOR_OFC - Calculate the Accrued Interest Factor for a bond during its odd first coupon period
AIFACTOR_OLC - Calculate the Accrued Interest Factor for a bond during its odd last coupon period
AIFACTOR_RPI - Calculate the Accrued Interest Factor for a Regular Periodic Interest period
BONDINT - Accrued interest on a bond paying regular, periodic interest
ODDFINT - Accrued interest for a bond with an odd first coupon
ODDLINT - Accrued interest for a bond with an odd last coupon