Files
playbook/skills/tsl-api-reference/references/codegen/module/recent-updates-17617.md
T

51 lines
2.0 KiB
Markdown

# 应用专题 / 衍生品分析 / 期权专项
## `op_getiVXByDay(op_type, return_type)`
声明:function
求某一时点的的 iVX 或中间变量,与当前标的代码,时间,周期相关
<!-- tags: 时间处理 日期时间 期权 指数 -->
| 参数 | 类型 | 说明 |
| ------------- | ------- | -------------------------------------- |
| `op_type` | any | 控制计算方法、数据口径或返回格式的选项 |
| `return_type` | integer | 控制计算方法、数据口径或返回格式的选项 |
返回:any
## `op_getiVXByDays(stock_id, begt, endt, cycle, op_type, return_type)`
声明:function
根据给定周期 cycle,计算标的 StockID 从 begt 到 endt 一段时间的 iVX,可以选择纳入计算范
<!-- tags: 筛选 时间处理 日期时间 期权 指数 -->
| 参数 | 类型 | 说明 |
| ------------- | -------- | -------------------------------------- |
| `stock_id` | string | 目标证券、指数、基金或对象的代码标识 |
| `begt` | datetime | 计算或查询区间的开始日期 |
| `endt` | datetime | 计算或查询区间的结束日期 |
| `cycle` | string | 计算或行情数据使用的周期 |
| `op_type` | any | 控制计算方法、数据口径或返回格式的选项 |
| `return_type` | integer | 控制计算方法、数据口径或返回格式的选项 |
返回:any
## `op_getUnderlyingIdByType(underlying_type, if_delisted_option)`
声明:function
根据期权标的类型,获取对应的标的代码
<!-- tags: 查询 期权合约 期权 指数 -->
| 参数 | 类型 | 说明 |
| -------------------- | ------- | -------------------------------------- |
| `underlying_type` | any | 控制计算方法、数据口径或返回格式的选项 |
| `if_delisted_option` | boolean | 控制该项处理是否启用 |
返回:any