Files
playbook/skills/tsl-api-reference/references/codegen/dotnet/financial/option-option_basic_functions.md
T
csh 9010829c6d feat(tsl-api-reference): expand and reorganize api catalog
Flatten builtin pages, add third-party and platform scopes, and import financial and data warehouse references.

Keep the existing generated index without rebuilding after signature normalization.
2026-08-10 18:26:24 +08:00

1.9 KiB

金融 / 期权 / 期权基本函数

op_getBidAskData(ret)

声明:function

得到期权实时的买卖盘数据,选择当前未退市的期权代码

参数 类型 说明
ret array 二维数组 数据表中必须有代码字段,字段中是期权代码;例:array(("代码":"CU2106"))

返回:array

示例

范例01:调用 OP_GetBidAskData

ret := array(("代码":"CU2106"),

    ("代码":"IF2106"),

    ("代码":"PG2106"), );

return OP_GetBidAskData(ret);

op_getDaysMaturity(end_t, ex_endt)

声明:function

计算剩余期限(月)

参数 类型 说明
end_t datetime Date 现在日期
ex_endt datetime Date 到期日

返回:float

示例

范例01:调用 OP_GetDaysMaturity

return OP_GetDaysMaturity(20150208T, 20150228T); // 0.6575

op_getRiskFreeRate(end_t, rate_type)

声明:function

得到 指定日时刻的无风险利率

参数 类型 说明
end_t datetime Date 截止日
rate_type int Int 无风险利率种类 此参数缺省为 0 表示:一年期存贷款基准利率

返回:float

示例

范例01:调用 OP_GetRiskFreeRate

return OP_GetRiskFreeRate(20150208T, 0); // 2.75

op_getUnderlyingSecurity()

声明:function

取得当前期权所有标的序列

返回:array

示例

范例01:调用 OP_GetUnderlyingSecurity

return OP_GetUnderlyingSecurity();