RECEIVED
Updated 2023-10-05 14:38:42.210000
Syntax
SELECT [westclintech].[wct].[RECEIVED] (
<@Settlement, datetime,>
,<@Maturity, datetime,>
,<@Investment, float,>
,<@Discount, float,>
,<@Basis, nvarchar(4000),>)
Description
Use the scalar function RECEIVED to calculate the amount received at maturity for a fully invested security.
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":139},{"field":"Day count basis","width":174}],"rows":[{"@Basis":"0 or omitted","Day count basis":"US (NASD) 30/360"},{"@Basis":"1","Day count basis":"Actual/Actual"},{"@Basis":"2","Day count basis":"Actual/360"},{"@Basis":"3","Day count basis":"Actual/365"},{"@Basis":"4","Day count basis":"European 30/360"}]}
@Investment
the amount invested in the security. @Investment is an expression of type float or of a type that can be implicitly converted to float.
@Discount
the security’s discount rate. @Redemption 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.
Return Type
float
Remarks
If @Investment <= 0 or @Discount <= 0, RECEIVED returns an error.
If @Settlement >= @Maturity, RECEIVED returns an error.
If @Basis < 0 or @Basis > 4, RECEIVED returns an error.
RECEIVED performs the following calculation:
RECEIVED = @investment/(1-(@Discount*DSM/b))
Whereb = the number of days in the year depending on the year basisDSM = the number of days from settlement to maturity
Examples
SELECT wct.RECEIVED('2/1/2008', '5/2/2008', 98975, 0.0475, 0);
Here is the result se t .
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"100177.829634992"}]}