Logo

EFFECT

Updated 2023-10-10 22:21:02.297000

Syntax

SELECT [westclintech].[wct].[EFFECT] (
   <@Nominal_rate, float,>
 ,<@Npery, int,>)

Description

Use the scalar function EFFECT to calculate the effective annual interest rate.

Arguments

@Npery

the number of times per year that @Nominal_rate is paid. @Npery is an expression of type float or of a type that can be implicitly converted to float.

@Nominal_rate

the stated rate of interest. @Nominal_rate is an expression of type float or of a type that can be implicitly converted to float.

Return Type

float

Remarks

@Npery is truncated to an integer.

If @Nominal_rate <= 0 or if @Npery <= 0 then EFFECT returns an error.

EFFECT is calculated using the following formula:

EFFECT = ((1+@Nominal_rate/@Npery)^@Npery)-1

Examples

SELECT wct.EFFECT(0.04, 12);

Here is the result set.

{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"0.0407415429197906"}]}