✨ feat(tsl-api-reference): add class and framework API lookup
This commit is contained in:
+15
-13
@@ -70,7 +70,7 @@ return result_count;
|
||||
范例01:调用 OP_GetDaysMaturity
|
||||
|
||||
```tsl
|
||||
return OP_GetDaysMaturity(20150208T, 20150228T); // 0.6575
|
||||
return OP_GetDaysMaturity(20150208T, 20150228T); // 输出:0.6575
|
||||
```
|
||||
|
||||
## `op_getOptionChain(stock_id, end_t)`
|
||||
@@ -141,7 +141,7 @@ return op_getPutAndCallratio("cu", 20210514T);
|
||||
范例01:调用 OP_GetRiskFreeRate
|
||||
|
||||
```tsl
|
||||
return OP_GetRiskFreeRate(20150208T, 0); // 2.75
|
||||
return OP_GetRiskFreeRate(20150208T, 0); // 输出:2.75
|
||||
```
|
||||
|
||||
## `op_getUnderlyingSecurity()`
|
||||
@@ -187,7 +187,7 @@ return op_hv("SZ000002", 20210101T, -6);
|
||||
// 输出:25.790789
|
||||
```
|
||||
|
||||
## `op_ivGreeks(option_type, s, x, close, r, t, option_style, method)`
|
||||
## `op_ivGreeks(option_type, s, x, close, r, t, option_style, method, contract_type, rf)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -195,16 +195,18 @@ return op_hv("SZ000002", 20210101T, -6);
|
||||
|
||||
<!-- tags: 金融 期权 基本函数 隐含波动率 Greeks Delta Gamma Theta Vega Rho -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| -------------- | ------- | -------------------------------------------------- |
|
||||
| `option_type` | integer | 期权类型,0 为看涨期权,1 为看跌期权 |
|
||||
| `s` | real | 现货价格 |
|
||||
| `x` | real | 行权价 |
|
||||
| `close` | real | 期权交易价格 |
|
||||
| `r` | real | 无风险收益率百分比 |
|
||||
| `t` | real | 剩余期限月数 |
|
||||
| `option_style` | string | 可选。默认行权方式,支持 `欧式` 和 `美式` |
|
||||
| `method` | integer | 可选。默认定价方式,0 为默认,1 为 B_S,2 为二叉树 |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --------------- | ------- | ---------------------------------------------------- |
|
||||
| `option_type` | integer | 期权类型,0 为看涨期权,1 为看跌期权 |
|
||||
| `s` | real | 现货价格 |
|
||||
| `x` | real | 行权价 |
|
||||
| `close` | real | 期权交易价格 |
|
||||
| `r` | real | 无风险收益率百分比 |
|
||||
| `t` | real | 剩余期限月数 |
|
||||
| `option_style` | string | 可选。默认行权方式,支持 `欧式` 和 `美式` |
|
||||
| `method` | integer | 可选。默认定价方式,0 为默认,1 为 B_S,2 为二叉树 |
|
||||
| `contract_type` | integer | 可选。默认 0;0 股票、1 指数、2 外汇、3 期货期权 |
|
||||
| `rf` | real | 可选。默认 0;标的资产年股息率或外币无风险年利率(%) |
|
||||
|
||||
返回:array
|
||||
|
||||
|
||||
Reference in New Issue
Block a user