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.
This commit is contained in:
csh
2026-08-10 18:26:24 +08:00
parent 2938300acb
commit 9010829c6d
1186 changed files with 243901 additions and 219769 deletions
@@ -0,0 +1,88 @@
# 金融 / 指数 / 财务指标
## `index_callFinancialItemPs(right_type, sample_select, criterion, value_type, r_date_type)`
声明:function
计算指数每股财务指标,与系统证券、时间相关
| 参数 | 类型 | 说明 |
| --------------- | ------- | -------------------------------------------------------- |
| `right_type` | integer | 加权方式,整型,取值如下 |
| `sample_select` | integer | 样本股选择,具体取值如下: |
| `criterion` | float | 实数,绩差股标准,和参数SampleSelect结合使用 |
| `value_type` | integer | 相应指标的ID号(如:ValueType = 0,时,取得指标为流动比率) |
| `r_date_type` | integer | 整型,报告期类型,具体取值如下: |
返回:float
### 示例
范例01:提取2023年7月31日沪深300,全部样本股、整体权重加权、TTM的每股收益
```tsl
// 提取2023年7月31日沪深300,全部样本股、整体权重加权、TTM的每股收益
setsysparam(pn_stock(), 'SH000300');
setsysparam(pn_date(), 20230731T);
return Index_CallFinancialItemPS (11, 0, 0, 0, 0);
// 输出:1.6313
```
范例02:提取2023年7月31日沪深300,全部样本股、直接法权重加权、TTM的每股主营收入
```tsl
// 提取2023年7月31日沪深300,全部样本股、直接法权重加权、TTM的每股主营收入
setsysparam(pn_stock(), 'SH000300');
setsysparam(pn_date(), 20230731T);
return Index_CallFinancialItemPS (13, 0, 0, 4, 0);
// 输出:27.9402
```
## `index_callRoe(right_type, sample_select, criterion, r_date_type)`
声明:function
计算指数ROE(%),与系统证券、时间相关
| 参数 | 类型 | 说明 |
| --------------- | ------- | -------------------------------------------- |
| `right_type` | integer | 加权方式,整型,取值如下 |
| `sample_select` | integer | 样本股选择,具体取值如下: |
| `criterion` | float | 实数,绩差股标准,和参数SampleSelect结合使用 |
| `r_date_type` | integer | 整型,报告期类型,具体取值如下: |
返回:float
### 示例
范例01:提取2023年7月31日沪深300,全部样本股、整体权重加权、TTM的ROE
```tsl
// 提取2023年7月31日沪深300,全部样本股、整体权重加权、TTM的ROE
setsysparam(pn_stock(), 'SH000300');
setsysparam(pn_date(), 20230731T);
return Index_CallROE(11, 0, 0, 0);
// 输出:12.3781
```
范例02:提取2023年7月31日沪深300,全部样本股、调和平均数权重加权、最新年度的ROE
```tsl
// 提取2023年7月31日沪深300,全部样本股、调和平均数权重加权、最新年度的ROE
setsysparam(pn_stock(), 'SH000300');
setsysparam(pn_date(), 20230731T);
return Index_CallROE(12, 0, 0, 1);
// 输出:12.0679
```