Skip to main content

INTRATE

Returns the interest rate for a fully invested security.

Syntax

expression.INTRATE(arg1, arg2, arg3, arg4, arg6);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe security settlement date, expressed as a serial date number.
arg2RequiredApiRange | ApiName | numberThe maturity date of the security, expressed as a serial date number.
arg3RequiredApiRange | ApiName | numberThe amount invested in the security.
arg4RequiredApiRange | ApiName | numberThe amount to be received at maturity.
arg6OptionalApiRange | ApiName | numberThe day count basis to use: 0 or omitted - US (NASD) 30/360; 1 - Actual/actual; 2 - Actual/360; 3 - Actual/365; 4 - European 30/360.

Returns

number

Example

This example shows how to return an interest rate for a fully invested security.

// How to calculate an interest rate for a fully invested security.

// Use a function to get a fully invested security's interest rate.

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.INTRATE("1/1/2018", "11/12/2018", 1000, 1050, 2));