✨ 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:
+118
@@ -0,0 +1,118 @@
|
||||
# 数据仓库 / 向导函数 / 当日 / 中间函数
|
||||
|
||||
## `getHBCacheStr(cache_str, fname)`
|
||||
|
||||
声明:function
|
||||
|
||||
横比缓存串,多用于101因子中。串中不缓存pn_StockArr,因为无法满足动态指数成分,得需要用pn_StockArrName作唯一标识
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------- | ------ | ---------------- |
|
||||
| `cache_str` | string | 字符串。缓存串 |
|
||||
| `fname` | string | 字符串。函数名称 |
|
||||
|
||||
返回:string
|
||||
|
||||
## `getParm_groupIndustry_byEndt(t, endt, by_group)`
|
||||
|
||||
声明:function
|
||||
|
||||
得到指定日股票池行业分类。1、用于支持横比行业分类;2、目前多用于101因子的计算中的中间函数IndNeutralize中;3、目前使用申万一二三级行业来处理
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ---------- | -------- | --------------------- |
|
||||
| `t` | array | 数组。股票池数据 |
|
||||
| `endt` | datetime | 日期。截止日 |
|
||||
| `by_group` | integer | 用户自定义。取值如下: |
|
||||
|
||||
返回:array
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用 GetParm_GroupIndustry_ByEndt
|
||||
|
||||
```tsl
|
||||
Return GetParm_GroupIndustry_ByEndt(GetBKByDate('SH000300', 20231010T), 20231010T, 1);
|
||||
```
|
||||
|
||||
## `getParm_stockArr_byEndt(end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
得到指定日股票池。1、用于支持横比动态成分;2、目前多用于101因子的计算中
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | -------- | ------------ |
|
||||
| `end_t` | datetime | 日期。指定日 |
|
||||
|
||||
返回:array
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用 GetParm_StockArr_ByEndt
|
||||
|
||||
```tsl
|
||||
A := function (endt);
|
||||
|
||||
begin
|
||||
|
||||
return GetBKByDate('SH000300', endt);
|
||||
|
||||
end
|
||||
|
||||
B := function (endt);
|
||||
|
||||
begin
|
||||
|
||||
return GetBKByDate('SH000905', endt);
|
||||
|
||||
end
|
||||
|
||||
SetParm_StockArrFunc(B, 'ZZ500');
|
||||
|
||||
SetParm_StockArrFunc(A, 'HS300');
|
||||
|
||||
sp_s(pn_StockArrName(), 'HS300');
|
||||
|
||||
stocks1 := GetParm_StockArr_ByEndt(sp_time(1));
|
||||
|
||||
sp_s(pn_StockArrName(), 'ZZ500');
|
||||
|
||||
stocks2 := GetParm_StockArr_ByEndt(sp_time(1));
|
||||
|
||||
return array(stocks1, stocks2);
|
||||
```
|
||||
|
||||
## `pn_stockArrFunc()`
|
||||
|
||||
声明:function
|
||||
|
||||
得到每日股票池的函数。1、配合GetParm_StockArr_ByEndt使用;2、多用于101因子计算当中
|
||||
|
||||
返回:string
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:结果:CurrentStockArrFunc
|
||||
|
||||
```tsl
|
||||
Return pn_StockArrFunc();
|
||||
// 输出:CurrentStockArrFunc
|
||||
```
|
||||
|
||||
## `pn_stockArrName()`
|
||||
|
||||
声明:function
|
||||
|
||||
当前股票池名称。1、配合GetParm_StockArr_ByEndt使用;2、多用于101因子计算当中
|
||||
|
||||
返回:string
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:结果:CurrentStockArrName
|
||||
|
||||
```tsl
|
||||
Return pn_StockArrName();
|
||||
// 输出:CurrentStockArrName
|
||||
```
|
||||
Reference in New Issue
Block a user