📦 deps(tsl): sync tsl-playbook from a71480a4

Source-Commit: a71480a4ae
This commit is contained in:
ci[bot]
2026-08-12 08:38:08 +08:00
parent 683f83d17c
commit 670ba950a6
1496 changed files with 292667 additions and 220122 deletions
@@ -0,0 +1,93 @@
# 金融 / 期权 / 期权基本函数
## `op_getBidAskData(ret)`
声明:function
获取期权实时的买卖盘数据,选择当前未退市的期权代码
<!-- tags: 金融 期权 期权基本函数 获取 查询 -->
| 参数 | 类型 | 说明 |
| ----- | ----- | ------------------------------------------------------------------------------ |
| `ret` | array | 二维数组 数据表中必须有代码字段,字段中是期权代码;例:array(("代码":"CU2106")) |
返回:array
### 示例
范例01:调用 OP_GetBidAskData
```tsl
ret := array(("代码":"CU2106"),
("代码":"IF2106"),
("代码":"PG2106"), );
return OP_GetBidAskData(ret);
```
## `op_getDaysMaturity(end_t, ex_endt)`
声明:function
计算剩余期限(月)
<!-- tags: 金融 期权 期权基本函数 计算 求解 -->
| 参数 | 类型 | 说明 |
| --------- | -------- | ------------- |
| `end_t` | datetime | Date 现在日期 |
| `ex_endt` | datetime | Date 到期日 |
返回:float
### 示例
范例01:调用 OP_GetDaysMaturity
```tsl
return OP_GetDaysMaturity(20150208T, 20150228T); // 0.6575
```
## `op_getRiskFreeRate(end_t, rate_type)`
声明:function
获取 指定日时刻的无风险利率
<!-- tags: 金融 期权 期权基本函数 获取 查询 -->
| 参数 | 类型 | 说明 |
| ----------- | -------- | ----------------------------------------------------------- |
| `end_t` | datetime | Date 截止日 |
| `rate_type` | int | Int 无风险利率种类 此参数缺省为 0 表示:一年期存贷款基准利率 |
返回:float
### 示例
范例01:调用 OP_GetRiskFreeRate
```tsl
return OP_GetRiskFreeRate(20150208T, 0); // 2.75
```
## `op_getUnderlyingSecurity()`
声明:function
获取当前期权所有标的序列
<!-- tags: 金融 期权 期权基本函数 获取 查询 -->
返回:array
### 示例
范例01:调用 OP_GetUnderlyingSecurity
```tsl
return OP_GetUnderlyingSecurity();
```