跳到主要内容

TBILLEQ

返回国库券的债券等价收益率。

语法

expression.TBILLEQ(arg1, arg2, arg3);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | number国库券的结算日期,以序列日期数字表示。
arg2必需ApiRange | ApiName | number国库券的到期日,以序列日期数字表示。
arg3必需ApiRange | ApiName | number国库券的贴现率。

返回值

number

示例

此示例演示如何返回国库券的债券等效收益率。

// 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.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.TBILLEQ("1/1/2018", "11/20/2018", "8.00%"));