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,324 @@
# 金融 / 基金 / 份额结构
## `fundNegotiableShares(end_t)`
声明:function
指定日流通份额,与系统证券pn_stock()相关
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `end_t` | date | 截止日期 |
返回:real
### 示例
范例01:调用函数
```tsl
// 取华安创新2012年10月18日的流通份额
setSysParam(pn_stock(), 'OF040001');
ReturnFundNegotiableShares(intToDate(20121018));
// 输出:8915597665.48
```
## `fundNegotiableShares3()`
声明:function
最新流通份额,与系统证券pn_stock()和系统时间pn_date()相关
返回:real
### 示例
范例01:调用函数
```tsl
// 取华安创新2012年10月18日的最新流通份额
setSysParam(pn_stock(), 'OF040001');
setSysParam(pn_date(), intToDate(20121018));
ReturnFundNegotiableShares3();
// 输出:8915597665.48
```
## `fundNetAssetValue(rdate)`
声明:function
指定报告期资产净值(考虑填充)
| 参数 | 类型 | 说明 |
| ------- | ---------------- | ----------------- |
| `rdate` | report_date_list | 报告期,基金报告期 |
返回:real
### 示例
范例01:调用函数
```tsl
rdate := 20221231;
fund_id := "OF000001";
sp_s(pn_stock(), fund_id);
return fundNetAssetValue(rdate); // 3148229855.4
```
## `fundNetAssetValueQK(begt, endt)`
声明:function
功能:区间基金规模序列
| 参数 | 类型 | 说明 |
| ------ | ---- | ----------- |
| `begt` | date | 日期,开始日 |
| `endt` | date | 日期,截止日 |
返回:array
### 示例
范例01:调用函数
```tsl
范例1 begt := 20220101t;
endt := 20240101t;
sp_s(pn_stock(), "OF000001");
return fundNetAssetValueQk(begt, endt);
返回:
```
## `fundNSGrowRatio(beg_t, end_t)`
声明:function
流通份额变比(%),该函数可以取基金、股票、债券的流通份额变化,与系统当前证券有关
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `beg_t` | date | 开始日期 |
| `end_t` | date | 截止日期 |
返回:real
### 示例
范例01:调用函数
```tsl
// 取华安创新2005年1月1日到2012年1月1日之间的流通份额变比(%)
setSysParam(pn_stock(), 'OF040001');
return fundNsGrowRatio(intToDate(20050101), intToDate(20120101));
// 输出:302.6716
```
## `fundNSGrowValue(beg_t, end_t)`
声明:function
流通份额变动,该函数可以取基金、股票、债券的流通份额变化,与系统当前证券有关
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `beg_t` | date | 开始日期 |
| `end_t` | date | 截止日期 |
返回:real
### 示例
范例01:调用函数
```tsl
// 取华安创新2005年1月1日到2012年1月1日之间的流通份额变动
setSysParam(pn_stock(), 'OF040001') ;
return fundNsGrowValue(intToDate(20050101), intToDate(20120101));
// 输出:7357481259.22
```
## `fundOfDifferentFeesNegotiableShares(end_t)`
声明:function
本模型返回指定日不同收费模式所有基金的流通份额
| 参数 | 类型 | 说明 |
| ------- | ----------- | ------------- |
| `end_t` | t_date_time | 日期,截止日期 |
返回:real
### 示例
范例01:调用函数
```tsl
// 返回OF000009在2025-12-31不同收费模式所有基金的流通份额
setSysParam(pn_stock(), "OF000009");
return fundOfDifferentFeesNegotiableShares(20251231T);
// 输出:12531232373.73
```
## `fundOfDifferentFeesTotalShares(end_t)`
声明:function
本模型返回指定日不同收费模式所有基金的总份额
| 参数 | 类型 | 说明 |
| ------- | ----------- | ------------- |
| `end_t` | t_date_time | 日期,截止日期 |
返回:real
### 示例
范例01:调用函数
```tsl
// 返回OF000009在2025-12-31不同收费模式所有基金的总份额
setSysParam(pn_stock(), "OF000009");
return fundOfDifferentFeesTotalShares(20251231T);
// 输出:12531232373.73
```
## `fundShares(end_t, return_field)`
声明:function
指定日份额结构,与系统证券pn_stock()相关
| 参数 | 类型 | 说明 |
| -------------- | ------ | -------------- |
| `end_t` | date | 截止日期 |
| `return_field` | string | 返回的字段名称 |
返回:real
### 示例
范例01:调用函数
```tsl
// 取华安创新2012年10月18日的总份额
setSysParam(pn_stock(), 'OF040001');
return fundShares(intToDate(20121018), "总份额");
// 输出:8915597665.48
```
## `fundShares3(return_field)`
声明:function
最新份额结构,与系统证券pn_stock()和系统时间pn_date()相关
| 参数 | 类型 | 说明 |
| -------------- | ------ | -------------- |
| `return_field` | string | 返回的字段名称 |
返回:real
### 示例
范例01:调用函数
```tsl
// 取华安创新2012年10月18日的总份额
setSysParam(pn_stock(), 'OF040001');setSysParam(pn_date(), intToDate(20121018));
return fundShares3("总份额");
// 输出:8915597665.48
```
## `fundTotalShares(end_t)`
声明:function
指定日总份额,与系统证券pn_stock()相关。从基金份额表中获取最接近指定日EndT的基金总份额
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `end_t` | date | 截止日期 |
返回:real
### 示例
范例01:调用函数
```tsl
// 取华安创新2012年10月18日的总份额
setSysParam(pn_stock(), 'OF040001');
return fundTotalShares(intToDate(20121018));
// 输出:8915597665.48
```
## `fundTotalShares3()`
声明:function
最新总份额,与系统证券pn_stock()和系统时间pn_date()相关。从基金份额表中获取最接近pn_date()设置的当前日期的基金总份额
返回:real
### 示例
范例01:调用函数
```tsl
// 取华安创新2012年10月18日的最新总份额
setSysParam(pn_stock(), 'OF040001');
setSysParam(pn_date(), intToDate(20121018));
ReturnFundTotalShares3();
// 输出:8915597665.48
```
## `fundTsGrowRatio(beg_t, end_t)`
声明:function
总份额变比(%)=(期初BegT总份额-期末EndT总份额)/期末EndT总份额,该函数可以取基金、股票、债券的流通份额变化,与系统当前证券有关
| 参数 | 类型 | 说明 |
| ------- | ---- | ---- |
| `beg_t` | date | 日期 |
| `end_t` | date | 日期 |
返回:real
### 示例
范例01:调用函数
```tsl
// 取华安创新2005年1月1日到2012年1月1日之间的总份额变比(%)
setSysParam(pn_stock(), 'OF040001');
return fundTsGrowRatio(intToDate(20050101), intToDate(20120101));
// 输出:302.67
```
## `fundTsGrowValue(beg_t, end_t)`
声明:function
总份额变动,与系统证券pn_stock()相关。两个报告期总股本的差值
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `beg_t` | date | 开始日期 |
| `end_t` | date | 截止日期 |
返回:real
### 示例
范例01:调用函数
```tsl
// 取华安创新2004年9月30日到2012年10月18日之间的总份额变动
setSysParam(pn_stock(), 'OF040001');
ReturnFundTSGrowValue(intToDate(20040930), intToDate(20121018));
// 输出:6432568919.11
```