feat(tsl-api-reference): index class and unit APIs

Migrate reference pages to declaration-line storage and rebuild the
13-column index.

Add qualified member lookup plus regression and end-to-end coverage.
This commit is contained in:
csh
2026-07-29 15:47:46 +08:00
parent 9edc8fc868
commit 13be5ea0aa
239 changed files with 39157 additions and 12846 deletions
@@ -2,6 +2,8 @@
## `reportOfAll(info_id, report_id)`
声明:function
返回某个报告期ReportID的某项财务指标的值,即可提取与报告期相关的数据。 与Report函数相比,ReportOfAll函数功能更为强大,除了获取与报告期相关的直接从报告中采集并入库的基础财务数据,还可以取根据基础财务数据实时计算的指标。实时计算指标的InfoID分布为9900000- 9902239,用户可以通过证券数据专家或基本面信息查询,也可查看FAQ:证券数据专家中提供的基础数据现状 该模型与当前的时间有关。因为财务数据有调整前调整后的数据,提取该数据的时候,要注意设置当前的时间。如果要取调整前的数据,当前的日期,要设置在调整后数据公布日之前。 比如股票A,2011年的年报是2012年4月15日公布,2012年年报是2013年4月15日公布,2012年年报披露的时候,同时会披露2011年年报调整后的数据。 当前的时间pn_date()设置在2013年4月15日之前的时候,取到的2011年年报数据就是调整前的数据,否则,取到的是2011年调整后的数据。
| 参数 | 类型 | 说明 |
@@ -21,6 +23,8 @@ return reportofall(46002,20170930);
## `SP_AVEDEV(exp, n, cache_string)`
声明:function
估算N天的TExpression的平均绝对偏差。TExpression是与取时间序列数值的表达式,例如close函数,函数的含义是根据连续N天的当天的EXP的值计算平均绝对偏差
| 参数 | 类型 | 说明 |
@@ -33,6 +37,8 @@ return reportofall(46002,20170930);
## `sp_correl(exp1, exp2, n)`
声明:function
移动相关系数。两个表达式正在最近N个交易日的相关系数
| 参数 | 类型 | 说明 |
@@ -45,6 +51,8 @@ return reportofall(46002,20170930);
## `sp_cov(exp1, exp2, n)`
声明:function
移动协方差。两个表达式在最近N个交易日的协方差
| 参数 | 类型 | 说明 |
@@ -57,6 +65,8 @@ return reportofall(46002,20170930);
## `SP_DEVSQ(exp, n, cache_string)`
声明:function
估算N天的TExpression的偏差平方和。TExpression是与取时间序列数值的表达式,例如close函数,函数的含义是根据连续N天的当天的EXP的值计算偏差平方和
| 参数 | 类型 | 说明 |
@@ -69,6 +79,8 @@ return reportofall(46002,20170930);
## `specDateValue(date, exp)`
声明:function
返回指定时间表达式Expr的值,与系统参数(股票,复权,周期)相关。
| 参数 | 类型 | 说明 |
@@ -80,6 +92,8 @@ return reportofall(46002,20170930);
## `specSysParams(exp, date, cycle, rate, rate_day)`
声明:function
设置系统参数(日期,周期,复权,复权基准日)。运行前须先定义表达式Exp。
| 参数 | 类型 | 说明 |
@@ -94,6 +108,8 @@ return reportofall(46002,20170930);
## `sp_frequency(exp, m, n)`
声明:function
移动频数。表达式最近N个交易日的频数
| 参数 | 类型 | 说明 |
@@ -106,6 +122,8 @@ return reportofall(46002,20170930);
## `sp_g(name)`
声明:function
返回Name指定的系统参数。功能同getsysparam。
| 参数 | 类型 | 说明 |
@@ -116,6 +134,8 @@ return reportofall(46002,20170930);
## `sp_geomean(exp, n)`
声明:function
移动几何平均数。表达式前N个交易日的几何平均数
| 参数 | 类型 | 说明 |
@@ -127,6 +147,8 @@ return reportofall(46002,20170930);
## `sp_harmean(exp, n)`
声明:function
移动调和平均数。表达式前N个交易日的调和平均数
| 参数 | 类型 | 说明 |
@@ -138,6 +160,8 @@ return reportofall(46002,20170930);
## `sp_intercept(exp1, exp2, n)`
声明:function
移动回归截距。两个表达式在最近N个交易日的回归截距
| 参数 | 类型 | 说明 |
@@ -150,6 +174,8 @@ return reportofall(46002,20170930);
## `sp_kurtosis(exp, n)`
声明:function
移动峰度(Excel兼容)。表达式数据最近N个交易日的峰度,算法与excel兼容
| 参数 | 类型 | 说明 |
@@ -161,6 +187,8 @@ return reportofall(46002,20170930);
## `sp_kurtosis2(exp, n)`
声明:function
移动峰度(Matlab兼容)。表达式最近N个交易日的峰度,算法与matlab兼容
| 参数 | 类型 | 说明 |
@@ -172,6 +200,8 @@ return reportofall(46002,20170930);
## `sp_large(exp, m, n)`
声明:function
移动最大排位值。指定表达式最近N天中的第M个最大值
| 参数 | 类型 | 说明 |
@@ -184,6 +214,8 @@ return reportofall(46002,20170930);
## `sp_percentile(exp, m, n)`
声明:function
移动百分位数。表达式最近N个交易日第M个百分比对应的数据
| 参数 | 类型 | 说明 |
@@ -196,6 +228,8 @@ return reportofall(46002,20170930);
## `sp_percentrank(exp1, exp2, n)`
声明:function
移动百分比排名。指标数据的当前数据在最近N个交易日中的百分比排名
| 参数 | 类型 | 说明 |
@@ -208,6 +242,8 @@ return reportofall(46002,20170930);
## `sp_quartile(exp, m, n)`
声明:function
移动四分位数。表达式最近N个交易日集中四分位对应的数据
| 参数 | 类型 | 说明 |
@@ -220,6 +256,8 @@ return reportofall(46002,20170930);
## `sp_rsq(exp1, exp2, n)`
声明:function
移动相关系数平方。两个表达式最近N个交易日的Pearson乘积矩相关系数的平方
| 参数 | 类型 | 说明 |
@@ -232,6 +270,8 @@ return reportofall(46002,20170930);
## `sp_s(name, value)`
声明:function
设置Name指定的系统参数的值为Value。如果设置不成功返回假否则返回真。系统参数为全局变量,即该函数设置的变量全局有效。也可以自定义参数。功能同sp_setsysparam
| 参数 | 类型 | 说明 |
@@ -243,6 +283,8 @@ return reportofall(46002,20170930);
## `sp_skewness(exp, n)`
声明:function
移动偏度(Excel兼容)。表达式数据最近N个交易日的偏度,算法与excel兼容
| 参数 | 类型 | 说明 |
@@ -254,6 +296,8 @@ return reportofall(46002,20170930);
## `sp_skewness2(exp, n)`
声明:function
移动偏度(Matlab兼容)。表达式数据最近N个交易日的偏度,算法与matlab兼容
| 参数 | 类型 | 说明 |
@@ -265,6 +309,8 @@ return reportofall(46002,20170930);
## `sp_slope(exp1, exp2, n)`
声明:function
移动回归斜率。两个表达式在最近N个交易日的回归斜率
| 参数 | 类型 | 说明 |
@@ -277,6 +323,8 @@ return reportofall(46002,20170930);
## `sp_slopeandintercept(exp1, exp2, n)`
声明:function
移动回归斜率和截距。两个表达式最近N个交易日的回归斜率和截距
| 参数 | 类型 | 说明 |
@@ -289,6 +337,8 @@ return reportofall(46002,20170930);
## `sp_small(exp, m, n)`
声明:function
移动最小排位值。指标数据最近N个交易日的第M个最小值
| 参数 | 类型 | 说明 |
@@ -301,6 +351,8 @@ return reportofall(46002,20170930);
## `SP_STD(exp, n, cache_string)`
声明:function
估算N天的TExpression的标准差。TExpression是与时间序列数据相关的函数或表达式,例如close函数,函数的含义是根据连续N天的当天的EXP的值计算标准差。
| 参数 | 类型 | 说明 |
@@ -313,6 +365,8 @@ return reportofall(46002,20170930);
## `SP_STDP(exp, n, cache_string)`
声明:function
估算N天的TExpression的总体标准差。TExpression是与取时间序列数值的表达式,例如close函数,函数的含义是根据连续N天的EXP的值计算总体标准差
| 参数 | 类型 | 说明 |
@@ -325,6 +379,8 @@ return reportofall(46002,20170930);
## `sp_steyx(exp1, exp2, n)`
声明:function
移动标准误差。两个表达式最近N个交易日的相对标准偏差
| 参数 | 类型 | 说明 |
@@ -337,6 +393,8 @@ return reportofall(46002,20170930);
## `sp_time(get_set_time)`
声明:function
取得当前环境的时间,不是真正的现在的时间。与系统变量(股票pn_stock()、时间pn_date()、周期pn_cycle()相关)。
| 参数 | 类型 | 说明 |
@@ -347,6 +405,8 @@ return reportofall(46002,20170930);
## `sp_totalvariance(exp, n)`
声明:function
移动总体偏差。表达式数据最近N个交易日的离差平方和(总体偏差)
| 参数 | 类型 | 说明 |
@@ -358,6 +418,8 @@ return reportofall(46002,20170930);
## `sp_trimmean(exp, m, n)`
声明:function
移动去首尾平均值。表达式最近N个交易日去掉首尾百分比后的平均值
| 参数 | 类型 | 说明 |
@@ -370,6 +432,8 @@ return reportofall(46002,20170930);
## `SP_VAR(exp, n, cache_string)`
声明:function
估算N天的TExpression的样本方差。TExpression是与取时间序列数值的表达式,例如close函数,函数的含义是根据连续N天的当天的EXP的值计算样本方差
| 参数 | 类型 | 说明 |
@@ -382,6 +446,8 @@ return reportofall(46002,20170930);
## `SP_VARP(exp, n, cache_string)`
声明:function
估算N天的TExpression的总体样本方差。TExpression是与取时间序列数值的表达式,例如close函数,函数的含义是根据连续N天的当天的EXP的值计算总体样本方差
| 参数 | 类型 | 说明 |