TBILLEQ
Returns the bond-equivalent yield for a treasury bill.
Syntax
expression.TBILLEQ(arg1, arg2, arg3);
expression
- A variable that represents a ApiWorksheetFunction class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | number | The settlement date of the Treasury bill, expressed as a serial date number. | |
arg2 | Required | ApiRange | ApiName | number | The maturity date of the Treasury bill, expressed as a serial date number. | |
arg3 | Required | ApiRange | ApiName | number | The discount rate of the Treasury bill. |
Returns
number
Example
This example shows how to return the bond-equivalent yield for a treasury bill.
- Code
- Result
// How to return the bond-equivalent yield for a treasury bill.
// Use a function to calculate the bond-equivalent yield.
let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.TBILLEQ("1/1/2018", "11/20/2018", "8.00%"));