📝 docs(tsl): complete and lint codegen reference
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 数据仓库 / 盘中统计
|
||||
|
||||
### `reportOfAll(info_id, report_id)`
|
||||
## `reportOfAll(info_id, report_id)`
|
||||
|
||||
返回某个报告期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年调整后的数据。
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
返回:any
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(),'SZ000001');
|
||||
@@ -19,7 +19,7 @@ setsysparam(pn_date(),20171031);
|
||||
return reportofall(46002,20170930);
|
||||
```
|
||||
|
||||
### `spAvedev(exp, n, cache_string)`
|
||||
## `SP_AVEDEV(exp, n, cache_string)`
|
||||
|
||||
估算N天的TExpression的平均绝对偏差。TExpression是与取时间序列数值的表达式,例如close函数,函数的含义是根据连续N天的当天的EXP的值计算平均绝对偏差
|
||||
|
||||
@@ -31,7 +31,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spCorrel(exp1, exp2, n)`
|
||||
## `sp_correl(exp1, exp2, n)`
|
||||
|
||||
移动相关系数。两个表达式正在最近N个交易日的相关系数
|
||||
|
||||
@@ -43,7 +43,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spCov(exp1, exp2, n)`
|
||||
## `sp_cov(exp1, exp2, n)`
|
||||
|
||||
移动协方差。两个表达式在最近N个交易日的协方差
|
||||
|
||||
@@ -55,7 +55,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spDevsq(exp, n, cache_string)`
|
||||
## `SP_DEVSQ(exp, n, cache_string)`
|
||||
|
||||
估算N天的TExpression的偏差平方和。TExpression是与取时间序列数值的表达式,例如close函数,函数的含义是根据连续N天的当天的EXP的值计算偏差平方和
|
||||
|
||||
@@ -67,7 +67,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `specDateValue(date, exp)`
|
||||
## `specDateValue(date, exp)`
|
||||
|
||||
返回指定时间表达式Expr的值,与系统参数(股票,复权,周期)相关。
|
||||
|
||||
@@ -78,7 +78,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:any
|
||||
|
||||
### `specSysParams(exp, date, cycle, rate, rate_day)`
|
||||
## `specSysParams(exp, date, cycle, rate, rate_day)`
|
||||
|
||||
设置系统参数(日期,周期,复权,复权基准日)。运行前须先定义表达式Exp。
|
||||
|
||||
@@ -92,7 +92,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:any
|
||||
|
||||
### `spFrequency(exp, m, n)`
|
||||
## `sp_frequency(exp, m, n)`
|
||||
|
||||
移动频数。表达式最近N个交易日的频数
|
||||
|
||||
@@ -104,7 +104,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:array
|
||||
|
||||
### `spG(name)`
|
||||
## `sp_g(name)`
|
||||
|
||||
返回Name指定的系统参数。功能同getsysparam。
|
||||
|
||||
@@ -114,7 +114,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:any
|
||||
|
||||
### `spGeoMean(exp, n)`
|
||||
## `sp_geomean(exp, n)`
|
||||
|
||||
移动几何平均数。表达式前N个交易日的几何平均数
|
||||
|
||||
@@ -125,7 +125,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spHarMean(exp, n)`
|
||||
## `sp_harmean(exp, n)`
|
||||
|
||||
移动调和平均数。表达式前N个交易日的调和平均数
|
||||
|
||||
@@ -136,7 +136,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spIntercept(exp1, exp2, n)`
|
||||
## `sp_intercept(exp1, exp2, n)`
|
||||
|
||||
移动回归截距。两个表达式在最近N个交易日的回归截距
|
||||
|
||||
@@ -148,7 +148,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spKurtosis(exp, n)`
|
||||
## `sp_kurtosis(exp, n)`
|
||||
|
||||
移动峰度(Excel兼容)。表达式数据最近N个交易日的峰度,算法与excel兼容
|
||||
|
||||
@@ -159,7 +159,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spKurtosis2(exp, n)`
|
||||
## `sp_kurtosis2(exp, n)`
|
||||
|
||||
移动峰度(Matlab兼容)。表达式最近N个交易日的峰度,算法与matlab兼容
|
||||
|
||||
@@ -170,7 +170,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spLarge(exp, m, n)`
|
||||
## `sp_large(exp, m, n)`
|
||||
|
||||
移动最大排位值。指定表达式最近N天中的第M个最大值
|
||||
|
||||
@@ -182,7 +182,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spPercentile(exp, m, n)`
|
||||
## `sp_percentile(exp, m, n)`
|
||||
|
||||
移动百分位数。表达式最近N个交易日第M个百分比对应的数据
|
||||
|
||||
@@ -194,7 +194,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spPercentrank(exp1, exp2, n)`
|
||||
## `sp_percentrank(exp1, exp2, n)`
|
||||
|
||||
移动百分比排名。指标数据的当前数据在最近N个交易日中的百分比排名
|
||||
|
||||
@@ -206,7 +206,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spQuartile(exp, m, n)`
|
||||
## `sp_quartile(exp, m, n)`
|
||||
|
||||
移动四分位数。表达式最近N个交易日集中四分位对应的数据
|
||||
|
||||
@@ -218,7 +218,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spRsq(exp1, exp2, n)`
|
||||
## `sp_rsq(exp1, exp2, n)`
|
||||
|
||||
移动相关系数平方。两个表达式最近N个交易日的Pearson乘积矩相关系数的平方
|
||||
|
||||
@@ -230,7 +230,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spS(name, value)`
|
||||
## `sp_s(name, value)`
|
||||
|
||||
设置Name指定的系统参数的值为Value。如果设置不成功返回假否则返回真。系统参数为全局变量,即该函数设置的变量全局有效。也可以自定义参数。功能同sp_setsysparam
|
||||
|
||||
@@ -241,7 +241,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:bool
|
||||
|
||||
### `spSkewness(exp, n)`
|
||||
## `sp_skewness(exp, n)`
|
||||
|
||||
移动偏度(Excel兼容)。表达式数据最近N个交易日的偏度,算法与excel兼容
|
||||
|
||||
@@ -252,7 +252,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spSkewness2(exp, n)`
|
||||
## `sp_skewness2(exp, n)`
|
||||
|
||||
移动偏度(Matlab兼容)。表达式数据最近N个交易日的偏度,算法与matlab兼容
|
||||
|
||||
@@ -263,7 +263,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spSlope(exp1, exp2, n)`
|
||||
## `sp_slope(exp1, exp2, n)`
|
||||
|
||||
移动回归斜率。两个表达式在最近N个交易日的回归斜率
|
||||
|
||||
@@ -275,7 +275,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spSlopeAndIntercept(exp1, exp2, n)`
|
||||
## `sp_slopeandintercept(exp1, exp2, n)`
|
||||
|
||||
移动回归斜率和截距。两个表达式最近N个交易日的回归斜率和截距
|
||||
|
||||
@@ -287,7 +287,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:array
|
||||
|
||||
### `spSmall(exp, m, n)`
|
||||
## `sp_small(exp, m, n)`
|
||||
|
||||
移动最小排位值。指标数据最近N个交易日的第M个最小值
|
||||
|
||||
@@ -299,7 +299,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spStd(exp, n, cache_string)`
|
||||
## `SP_STD(exp, n, cache_string)`
|
||||
|
||||
估算N天的TExpression的标准差。TExpression是与时间序列数据相关的函数或表达式,例如close函数,函数的含义是根据连续N天的当天的EXP的值计算标准差。
|
||||
|
||||
@@ -311,7 +311,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spStdp(exp, n, cache_string)`
|
||||
## `SP_STDP(exp, n, cache_string)`
|
||||
|
||||
估算N天的TExpression的总体标准差。TExpression是与取时间序列数值的表达式,例如close函数,函数的含义是根据连续N天的EXP的值计算总体标准差
|
||||
|
||||
@@ -323,7 +323,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spSteyx(exp1, exp2, n)`
|
||||
## `sp_steyx(exp1, exp2, n)`
|
||||
|
||||
移动标准误差。两个表达式最近N个交易日的相对标准偏差
|
||||
|
||||
@@ -335,7 +335,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spTime(get_set_time)`
|
||||
## `sp_time(get_set_time)`
|
||||
|
||||
取得当前环境的时间,不是真正的现在的时间。与系统变量(股票pn_stock()、时间pn_date()、周期pn_cycle()相关)。
|
||||
|
||||
@@ -345,7 +345,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:datetime
|
||||
|
||||
### `spTotalVariance(exp, n)`
|
||||
## `sp_totalvariance(exp, n)`
|
||||
|
||||
移动总体偏差。表达式数据最近N个交易日的离差平方和(总体偏差)
|
||||
|
||||
@@ -356,7 +356,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spTrimmean(exp, m, n)`
|
||||
## `sp_trimmean(exp, m, n)`
|
||||
|
||||
移动去首尾平均值。表达式最近N个交易日去掉首尾百分比后的平均值
|
||||
|
||||
@@ -368,7 +368,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spVar(exp, n, cache_string)`
|
||||
## `SP_VAR(exp, n, cache_string)`
|
||||
|
||||
估算N天的TExpression的样本方差。TExpression是与取时间序列数值的表达式,例如close函数,函数的含义是根据连续N天的当天的EXP的值计算样本方差
|
||||
|
||||
@@ -380,7 +380,7 @@ return reportofall(46002,20170930);
|
||||
|
||||
返回:float
|
||||
|
||||
### `spVarp(exp, n, cache_string)`
|
||||
## `SP_VARP(exp, n, cache_string)`
|
||||
|
||||
估算N天的TExpression的总体样本方差。TExpression是与取时间序列数值的表达式,例如close函数,函数的含义是根据连续N天的当天的EXP的值计算总体样本方差
|
||||
|
||||
|
||||
Reference in New Issue
Block a user