跳到主要内容

PRICEDISC

返回折价有价证券每 $100 面值的价格。

语法

expression.PRICEDISC(arg1, arg2, arg3, arg4, arg5);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | number证券的结算日期,以序列日期数字表示。
arg2必需ApiRange | ApiName | number证券的到期日,以序列日期数字表示。
arg3必需ApiRange | ApiName | number证券的贴现率。
arg4必需ApiRange | ApiName | number证券的赎回价值,按每 100 美元面值计。
arg5可选ApiRange | ApiName | number要使用的日计数基准:0 或省略 - 美国 (NASD) 30/360;1 - 实际/实际;2 - 实际/360;3 - 实际/365;4 - 欧洲 30/360。

返回值

number

示例

此示例演示如何返回贴现证券的每 100 美元面值价格。

// How to return the price per $100 face value for a discounted security.

// Use a function to return the price per $100 face value for a discounted security.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.PRICEDISC("1/1/2017", "6/1/2019", 0.05, 105, 1));