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,30 +2,40 @@
## `rd_firstday()`
声明:function
复权基准日函数相关函数。
返回:any
## `rd_lastday()`
声明:function
复权基准日函数相关函数。
返回:any
## `rt_complex()`
声明:function
复权类型函数相关函数。
返回:any
## `rt_none()`
声明:function
复权类型函数相关函数。
返回:any
## `rt_scale()`
声明:function
复权类型函数相关函数。
返回:any
@@ -2,6 +2,8 @@
## `monthsBetween2(a_now, a_then)`
声明:function
对月数:今天到下个月的今天(不包括)算一个完整月度,即一个对月。
| 参数 | 类型 | 说明 |
@@ -13,6 +15,8 @@
## `yearsBetween2(a_now, a_then)`
声明:function
对年数:明年的今天(不包括)算一个完整年度,即一个对年。
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `cacheStrMerge(arg1, arg2, date_value_3)`
声明:function
当日相关函数。
| 参数 | 类型 | 说明 |
@@ -14,6 +16,8 @@
## `getHbCacheStr(cache_str, fname)`
声明:function
横比缓存串,多用于101因子中。串中不缓存pn_StockArr,因为无法满足动态指数成分,得需要用pn_StockArrName作唯一标识。
| 参数 | 类型 | 说明 |
@@ -25,6 +29,8 @@
## `GetParm_GroupIndustry_ByEndt(t, endt, by_group)`
声明:function
得到指定日股票池行业分类。1、用于支持横比行业分类;2、目前多用于101因子的计算中的中间函数IndNeutralize中;3、目前使用申万一二三级行业来处理。
| 参数 | 类型 | 说明 |
@@ -37,6 +43,8 @@
## `GetParm_StockArr_ByEndt(end_t)`
声明:function
得到指定日股票池。1、用于支持横比动态成分;2、目前多用于101因子的计算中。
| 参数 | 类型 | 说明 |
@@ -47,6 +55,8 @@
## `indNeutralize4(exp, by_group, cache_str, fill_nan)`
声明:function
表达式当日中性化,与系统参数证券代码,时间,pn_StockArr()相关。
| 参数 | 类型 | 说明 |
@@ -70,6 +80,8 @@ return IndNeutralize4(@close(),0,"",1);
## `indNeutralizeOftheReport(exp, report_id, by_group, cache_str)`
声明:function
表达式当期中性化
| 参数 | 类型 | 说明 |
@@ -92,6 +104,8 @@ return IndNeutralizeOftheReport(@ReportOfAll(46002,DefaultRepID()),20221231,0);
## `percentRankOftheDay(exp, cache_str)`
声明:function
当日分位排名。与PercentRankOftheDay2最大的区别,停牌成分设为Nan。
| 参数 | 类型 | 说明 |
@@ -103,6 +117,8 @@ return IndNeutralizeOftheReport(@ReportOfAll(46002,DefaultRepID()),20221231,0);
## `percentRankOftheDay2(exp, cache_str)`
声明:function
当日分位排名。股票横截面数据排名,x表示一组股票的截面数据,按向量x的元素大小升序排序,序号从0开始,如\[0,1,...,n\],然后输出排名所占总位数的百分比,即将排名归一到\[0,1\]区间。注意:Nan值不参与排名,输出Nan。
| 参数 | 类型 | 说明 |
@@ -114,6 +130,8 @@ return IndNeutralizeOftheReport(@ReportOfAll(46002,DefaultRepID()),20221231,0);
## `percentRankOftheDay3(exp, cache_str, fill_nan)`
声明:function
表达式当日分位排名,个股在pn_StockArr()成分股中的表达式值的分位排名,与系统参数证券代码,时间,pn_StockArr()相关。
| 参数 | 类型 | 说明 |
@@ -136,6 +154,8 @@ return PercentRankOftheDay3(@close(),"",1);
## `percentRankOftheReport(exp, report_id, cache_str)`
声明:function
表达式当期分位排名,个股在pn_StockArr()成分股中的表达式值的排名,与系统参数证券代码,时间,pn_StockArr()相关。
| 参数 | 类型 | 说明 |
@@ -157,18 +177,24 @@ return PercentRankOftheReport(@ReportOfAll(46002,DefaultRepID()),20221231);
## `pn_StockArrFunc()`
声明:function
当日相关函数。
返回:any
## `pn_StockArrName()`
声明:function
当日相关函数。
返回:string
## `rankOftheDay(exp, sort_order, cache_str)`
声明:function
当日横比排名。注意:pn_StockArr当日无交易的成分设置为Nan;EXp计算为NAN值时,不参与排名,排名为NAN。
| 参数 | 类型 | 说明 |
@@ -181,6 +207,8 @@ return PercentRankOftheReport(@ReportOfAll(46002,DefaultRepID()),20221231);
## `rankOftheDay2(exp, sort_order, cache_str)`
声明:function
当日最新值横比排名。与RankOftheDay的区别在于:RankOftheDay2不会将pn_StockArr当日的停牌成分设置为Nan。注意:EXp计算为NAN值时,不参与排名,排名为NAN。
| 参数 | 类型 | 说明 |
@@ -193,6 +221,8 @@ return PercentRankOftheReport(@ReportOfAll(46002,DefaultRepID()),20221231);
## `rankOftheDay3(exp, sort_order, cache_str, fill_nan)`
声明:function
表达式当日排名,个股在pn_StockArr()成分股中的表达式值的排名,与系统参数证券代码,时间,pn_StockArr()相关。
| 参数 | 类型 | 说明 |
@@ -216,6 +246,8 @@ return RankOftheDay3(@close(),0,"",1);
## `rankOftheReport(exp, report_id, sort_order, cache_str)`
声明:function
表达式当期排名,个股在pn_StockArr()成分股中的表达式值的排名,与系统参数证券代码,时间,pn_StockArr()相关。
| 参数 | 类型 | 说明 |
@@ -238,6 +270,8 @@ return RankOftheReport(@ReportOfAll(46002,DefaultRepID()),20221231,0);
## `scaleOfSeries(exp, a, cache_str)`
声明:function
标准化(无交易成分设为NAN)。将x中的非NAN值进行标准化,使x的绝对值的和为a,默认a=1。注意:NAN值依然输出NAN。
| 参数 | 类型 | 说明 |
@@ -260,6 +294,8 @@ return ScaleOfSeries(@close(),1,"");
## `scaleOfSeries2(exp, a, cache_str)`
声明:function
标准化。将x中的非NAN值进行标准化,使x的绝对值的和为a,默认a=1。注意:NAN值依然输出NAN。
| 参数 | 类型 | 说明 |
@@ -282,6 +318,8 @@ return ScaleOfSeries2(@close(),1,"");
## `scaleOfSeries3(exp, a, cache_str, fill_nan)`
声明:function
表达式当日标准化,与系统参数证券代码,时间,pn_StockArr()相关。
| 参数 | 类型 | 说明 |
@@ -305,6 +343,8 @@ return ScaleOfSeries3(@close(),1,"",1);
## `scaleOfSeriesOftheReport(exp, report_id, a, cache_str)`
声明:function
表达式当期标准化
| 参数 | 类型 | 说明 |
@@ -327,6 +367,8 @@ return ScaleOfSeriesOftheReport(@ReportOfAll(46002,DefaultRepID()),20221231,1);
## `SetParm_StockArrFunc(func, stock_arr_name)`
声明:function
1、用于支持横比动态成分;2、目前多用于101因子的计算中,与GetParm_StockArr_ByEndt一起使用;3、一般客户无需使用。
| 参数 | 类型 | 说明 |
@@ -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的值计算总体样本方差
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `getBk(marketlist)`
声明:function
得到指定的市场板块列表包含的股票列表。 注意,获取的是最新的板块成分股,行业名称或者板块名称,而非指数代码。 这些板块或行业名称必须和板块管理中的名称一致。 如果用户需要获取指定日期的历史成分股,请参考GetBKByDate。
| 参数 | 类型 | 说明 |
@@ -12,6 +14,8 @@
## `getBkList(_type)`
声明:function
得到所有的或者指定的系统板块类别下的板块名称列表。板块类别用户可查看板块管理中的类别。
| 参数 | 类型 | 说明 |
@@ -22,6 +26,8 @@
## `getBkList2(bktype)`
声明:function
得到所有的或者指定的系统板块类别下的板块名称列表以及板块所在路径名。 注意:除了结果类型与GetUserBKList不同以外,此函数得到指定板块类别下以及子路径下的所有的板块。
| 参数 | 类型 | 说明 |
@@ -32,6 +38,8 @@
## `getUserBkList(bktype)`
声明:function
得到所有的或者指定的板块类别下的用户板块的名称列表。
| 参数 | 类型 | 说明 |
@@ -42,6 +50,8 @@
## `getUserBkList2(bktype)`
声明:function
得到所有的或者指定的板块类别下用户板块的名称列表以及板块所在路径名。 注意,除了结果类型与GetUserBKList不同以外,此函数得到指定板块类别下以及子路径下的所有的板块。
| 参数 | 类型 | 说明 |
@@ -52,6 +62,8 @@
## `indNeutralize(exp, by_group, cache_str)`
声明:function
中性化操作,分组去均值化。将数据指标Exp按照ByGroup分类,对每个类别按照Exp=Exp–mean(Exp)进行中性化处理,处理之后Exp的均值为0。注:因分类标准不明确,此函数暂时不进行分类,即按整个市场,只对Exp进行中性化处理。
| 参数 | 类型 | 说明 |
@@ -73,6 +85,8 @@ return IndNeutralize(@open(),0,"");
## `indNeutralize2(exp, by_group, cache_str)`
声明:function
中性化操作,分组去均值化。将数据指标Exp按照ByGroup分类,对每个类别按照Exp=Exp–mean(Exp)进行中性化处理,处理之后Exp的均值为0。注:因分类标准不明确,此函数暂时不进行分类,即按整个市场,只对Exp进行中性化处理。
| 参数 | 类型 | 说明 |
@@ -85,6 +99,8 @@ return IndNeutralize(@open(),0,"");
## `marketId(stock_id, day)`
声明:function
获得证券的所属市场ID。
| 参数 | 类型 | 说明 |
@@ -96,6 +112,8 @@ return IndNeutralize(@open(),0,"");
## `marketInfo(id, info_id)`
声明:function
获得市场的相关信息。
| 参数 | 类型 | 说明 |
@@ -107,6 +125,8 @@ return IndNeutralize(@open(),0,"");
## `marketOpenCloseTime(id, day)`
声明:function
取得指定市场在指定日的理论开盘时间以及收盘时间。即便由于长假原因导致夜盘不开盘,也会存在理论的夜盘开盘时间。
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `defaultTimeZone()`
声明:function
多市场支撑函数相关函数。
返回:int
@@ -2,6 +2,8 @@
## `accOfNReport(exp, report_id, n, report_type, if_stand, return_type)`
声明:function
N期加速度算子
| 参数 | 类型 | 说明 |
@@ -24,6 +26,8 @@ return ACCOfNReport(@Last12MData(DefaultRepID(),46078),20201231,8,1);
## `accOfNReport2(exp, report_id, n)`
声明:function
N季加速度,与ACCOfNReport的区别在于仅支持季度数据计算,与系统证券相关
| 参数 | 类型 | 说明 |
@@ -46,6 +50,8 @@ return RobustACCOfNReport2(Exp,ReportID,N);   //-0.2568
## `avgOfNReport(exp, report_id, n, report_type)`
声明:function
当前时间ReportID向前推N年,返回从ReportID-N到ReportID时间报告期Exp指标平均值,与系统参数(股票)相关。
| 参数 | 类型 | 说明 |
@@ -59,6 +65,8 @@ return RobustACCOfNReport2(Exp,ReportID,N);   //-0.2568
## `avgOfNReport2(exp, report_id, n)`
声明:function
N个季度报告期数据的平均值,与系统证券相关
| 参数 | 类型 | 说明 |
@@ -81,6 +89,8 @@ return AvgOfNReport2(Exp,ReportID,N);   //122912375000
## `continuedMatchOfNReport(exp, report_id, n)`
声明:function
当前时间ReportID向前推N年,若从ReportID-N到ReportID时间均存在报告Exp则返回1,否则返回0,与系统参数(股票)相关。
| 参数 | 类型 | 说明 |
@@ -101,6 +111,8 @@ return ContinuedMatchOfNReport(@reportofall(46002,GetSysParam('DefaultRepID')),2
## `eaaOfNReport(exp, report_id, last_report_type)`
声明:function
N期加速度EAA
| 参数 | 类型 | 说明 |
@@ -124,6 +136,8 @@ return t;   //-0.016
## `eavOfNReport(exp, report_id, n, report_type, last_report_type)`
声明:function
N期加速度EAV
| 参数 | 类型 | 说明 |
@@ -151,6 +165,8 @@ return t;    //-0.45
## `growthOfNReport(exp, report_id, n, return_type)`
声明:function
当前时间ReportID向前推N年,返回从ReportID-N与ReportID表达式Exp指标的增长比例,其中returntype决定增长模式,与系统参数(股票)相关。
| 参数 | 类型 | 说明 |
@@ -172,6 +188,8 @@ return GrowthOfNReport(@reportofall(46002,GetSysParam('DefaultRepID')),20151231,
## `highestOfNReport(exp, report_id, n, report_type)`
声明:function
表达式N期最高
| 参数 | 类型 | 说明 |
@@ -192,6 +210,8 @@ return HighestOfNReport(@ReportOfAll(46080,DefaultRepID()),20221231,5,0);
## `highGrowthOfNReport(exp, report_id, n, report_type, range)`
声明:function
N期高速增长拐点:最近N期中,第N期数据上升且大于前N-1期极差的range倍 max=max(前N-1期数据) min=min(前N-1期数据) 第N期>上期+range\*(max-min)
| 参数 | 类型 | 说明 |
@@ -219,6 +239,8 @@ return t;     //1
## `lowestOfNReport(exp, report_id, n, report_type)`
声明:function
表达式N期最低
| 参数 | 类型 | 说明 |
@@ -239,6 +261,8 @@ return lowestOfNReport(@ReportOfAll(46080,DefaultRepID()),20221231,5,0);
## `occuredOfNReport(exp, report_id, n)`
声明:function
当前时间ReportID向前推N年,返回从ReportID-N到ReportID时间发生报告Exp的次数,与系统参数(股票)相关。
| 参数 | 类型 | 说明 |
@@ -259,6 +283,8 @@ returnOccuredOfNReport(@reportofall(46002,GetSysParam('DefaultRepID')),20151231,
## `occuredRepIdOfNReport(exp, report_id, n)`
声明:function
当前时间ReportID向前推N年,若从ReportID-N到ReportID时间存在报告Exp则返回报告期,与系统参数(股票)相关。
| 参数 | 类型 | 说明 |
@@ -271,6 +297,8 @@ returnOccuredOfNReport(@reportofall(46002,GetSysParam('DefaultRepID')),20151231,
## `refReportValue(exp, report_id, n)`
声明:function
当前时间ReportID向前推N年,返回ReportID-N时间点表达式 Exp指标值,与系统参数(股票)相关。
| 参数 | 类型 | 说明 |
@@ -291,6 +319,8 @@ return RefReportValue(@reportofall(46002,GetSysParam('DefaultRepID')),20161231,1
## `robustAccOfNReport(exp, report_id, n, report_type, last_report_type)`
声明:function
N期稳健加速度
| 参数 | 类型 | 说明 |
@@ -312,6 +342,8 @@ return RobustACCOfNReport(@Last12MData(DefaultRepID(),9900604),20201231,8,0); //
## `robustAccOfNReport2(exp, report_id, n)`
声明:function
N季稳健加速度,与RobustACCOfNReport的区别在于仅支持季度数据计算,与系统证券相关
| 参数 | 类型 | 说明 |
@@ -334,6 +366,8 @@ return RobustACCOfNReport2(Exp,ReportID,N);   //-0.2568
## `robustGrowthOfNReport2(exp, report_id, n)`
声明:function
N季稳健增速,与RobustGrowthOfNReport的区别在于仅支持季度数据计算,与系统证券相关
| 参数 | 类型 | 说明 |
@@ -356,6 +390,8 @@ return RobustGrowthOfNReport2(Exp,ReportID,N); //-0.3269
## `secondOrderGrowthOfNReport(exp, report_id, n, report_type)`
声明:function
N期二阶增长拐点:最近N期中,前N-1期逐渐下降,第N期数据上升 l 参数: Exp:表达式类型,计算相关财务指标,一般与报告期相关,如TTM归属母公司净利润:@Last12MData(DefaultRepID(),46078) ReportID:报告期 N:整数,最近N期 ReportType:报告期类型 取值 含义 备注 0 年度标准(默认) 假设ReportID:=20200930N=2,对应最近N个报告期为20190930、20200930 1 季度标准 假设ReportID:=20200930N=2,对应最近N个报告期为20200630、20200930
| 参数 | 类型 | 说明 |
@@ -381,6 +417,8 @@ return t;    //1
## `standGrowthOfNReport(exp, report_id, n, report_type)`
声明:function
N期标准化增长率
| 参数 | 类型 | 说明 |
@@ -406,6 +444,8 @@ return t;   //1.265
## `stdOfNReport2(exp, report_id, n)`
声明:function
N个季度报告期数据的标准差,与系统证券相关
| 参数 | 类型 | 说明 |
@@ -428,6 +468,8 @@ return StdOfNReport2(Exp,ReportID,N);  //56286669451.8528
## `sumOfNReport(exp, report_id, n)`
声明:function
当前时间ReportID向前推N年,返回从ReportID-N到ReportID时间报告期Exp指标和,与系统参数(股票)相关。
| 参数 | 类型 | 说明 |
@@ -448,6 +490,8 @@ return SumOfNReport(@reportofall(46002,GetSysParam('DefaultRepID')),20151231,2);
## `sumOfNReport2(exp, report_id, n)`
声明:function
N个季度报告期数据之和,与系统证券相关
| 参数 | 类型 | 说明 |
@@ -470,6 +514,8 @@ return SumOfNReport2(Exp,ReportID,N);  //983299000000
## `turnPositiveOfNReport(exp, report_id, n, report_type)`
声明:function
N期转正拐点:最近N期中,前N-1期数据小于0,第N期数据大于0
| 参数 | 类型 | 说明 |
@@ -495,6 +541,8 @@ return t;   //1
## `robustGrowthOfNReport(exp, report_id, n, report_type)`
声明:function
过去N期稳健增速,与系统证券相关
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `deltaOfNDay(exp, n)`
声明:function
当前值-前N日值。
| 参数 | 类型 | 说明 |
@@ -21,6 +23,8 @@ return DeltaOfNDay(@close(),5);
## `percentRankOfNDay(exp, n, cache_str)`
声明:function
当前值在最近N天的百分位排名,Nan值不参与排名。
| 参数 | 类型 | 说明 |
@@ -41,6 +45,8 @@ return PercentRankOfNDay(@close(),10,"");
## `signedPower(exp, n)`
声明:function
符号次方。特殊当x=0时,N<0,返回NanN=0, 返回1N>0, 返回0。
| 参数 | 类型 | 说明 |
@@ -60,6 +66,8 @@ return SignedPower(@close(),3);
## `slopeofNday(exp1, exp2, n, cache_str)`
声明:function
N日线性回归系数。
| 参数 | 类型 | 说明 |
@@ -81,6 +89,8 @@ return SlopeofNday(@close(),@open(),30,"");
## `wmaofNday(exp, n, cache_astr)`
声明:function
N日衰减加权。最新值权重最大,权重归一化,结果同DecayAvgOfNDay。
| 参数 | 类型 | 说明 |
@@ -2,186 +2,248 @@
## `Cy_10m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_10s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_120m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_12s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_15m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_15s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_1m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_1s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_20m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_20s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_2m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_2s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_30m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_30s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_3m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_3s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_40m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_4s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_5m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_5s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_60m()`
声明:function
周期函数相关函数。
返回:any
## `Cy_6s()`
声明:function
周期函数相关函数。
返回:any
## `Cy_day()`
声明:function
周期函数相关函数。
返回:any
## `Cy_Detail()`
声明:function
周期函数相关函数。
返回:any
## `Cy_Halfs()`
声明:function
周期函数相关函数。
返回:any
## `Cy_HalfYear()`
声明:function
周期函数相关函数。
返回:any
## `Cy_month()`
声明:function
周期函数相关函数。
返回:any
## `Cy_Quarter()`
声明:function
周期函数相关函数。
返回:any
## `Cy_TwoYear()`
声明:function
周期函数相关函数。
返回:any
## `Cy_week()`
声明:function
周期函数相关函数。
返回:any
## `Cy_Year()`
声明:function
周期函数相关函数。
返回:any
@@ -2,6 +2,8 @@
## `analyseStockArr(b_kname, stocks)`
声明:function
板块BKname序列添加股票Stocks。
| 参数 | 类型 | 说明 |
@@ -13,6 +15,8 @@
## `avgOfNDay(exp, n)`
声明:function
返回表达式Exp指标连续N个周期的平均值,交易日序列以上证指数的交易日为基础,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -32,6 +36,8 @@ return AvgOfNDay(@close(),5);
## `avgOfPeriod(exp, begdate, enddate)`
声明:function
返回当前从开始日BegDate到截止日EndDate表达式Exp的指标平均值,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -51,6 +57,8 @@ return AvgOfPeriod(@close(),20180801T,20180802T);
## `avgOfSector(exp, mode, shares_day, list_day, s_type, sample_select, eps_criterion, except_no_trade)`
声明:function
板块平均。对指定板块按照一定标准进行选股后,对板块下每一只股票Exp表达式的指标值按mode求平均,选股标准由SampleSelect与EPSCriterion确定。其中亏损股为当前时间之前最近一期报告期每股收益(摊薄)\*12/报告期所在月份<0,停牌股为当前时间之前最近一期报告期每股收益(摊薄)\*12/报告期所在月份<EPSCriterion,与系统参数(股票,周期)相关。
| 参数 | 类型 | 说明 |
@@ -68,6 +76,8 @@ return AvgOfPeriod(@close(),20180801T,20180802T);
## `avgOfSectorExceptNoTrade(exp, mode)`
声明:function
返回当前板块当前时间存在交易股票指标Exp的平均值,其中Mode决定返回的平均类型,与系统参数(板块,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -87,6 +97,8 @@ return AvgOfSectorExceptNoTrade(@close(),0);
## `continuedMatchOfPeriod(exp, beg_date)`
声明:function
取Begdate到Enddate的交易日序列,如果在交易日序列Expr指标存在值则返回1,否则返回0。
| 参数 | 类型 | 说明 |
@@ -105,6 +117,8 @@ return ContinuedMatchOfPeriod(@close(),20180801T,20180803T);
## `correlOfNDay2(exp, n, base_id)`
声明:function
表达式N日相关系数(双序列) ,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -125,6 +139,8 @@ return CorrelOfNDay2(@close(),10,"SH000001");
## `correlOfPeriod(exp, beg_date, end_date, base_id)`
声明:function
表达式区间相关系数(双序列)
| 参数 | 类型 | 说明 |
@@ -145,6 +161,8 @@ return CorrelOfPeriod(@close(),20230901T,20231010T,"SH000001");
## `covOfNDay(exp, n, base_id)`
声明:function
表达式N日协方差(双序列) ,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -165,6 +183,8 @@ return CovOfNDay(@close(),10,"SH000001");
## `covOfPeriod(exp, beg_date, end_date, base_id)`
声明:function
表达式区间协方差(双序列)
| 参数 | 类型 | 说明 |
@@ -185,6 +205,8 @@ return CovOfPeriod(@close(),20230901T,20231010T,"SH000001");
## `Cy_FreeCycle(n)`
声明:function
指定秒数的自由滚动周期
| 参数 | 类型 | 说明 |
@@ -195,6 +217,8 @@ return CovOfPeriod(@close(),20230901T,20231010T,"SH000001");
## `cy_trailingdays(n)`
声明:function
指定交易日数的自由滚动周期
| 参数 | 类型 | 说明 |
@@ -205,6 +229,8 @@ return CovOfPeriod(@close(),20230901T,20231010T,"SH000001");
## `cy_trailingseconds(n)`
声明:function
指定秒数的自由滚动周期
| 参数 | 类型 | 说明 |
@@ -215,6 +241,8 @@ return CovOfPeriod(@close(),20230901T,20231010T,"SH000001");
## `decayAvgOfNDay(exp, n, cache_str)`
声明:function
N日线性衰减加权平均,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -235,6 +263,8 @@ return DecayAvgOfNDay(@close(),5);
## `derivative1(f, n)`
声明:function
指标技术趋势,返回N个时间点前连续三个周期的指标Expr变化趋势,与当前系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -254,6 +284,8 @@ return Derivative1(@close(),0);//指标值为收盘价
## `derivative2(a)`
声明:function
指标技术加速度,返回4个周期的指标Expr变化趋势,与当前系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -272,6 +304,8 @@ return Derivative2(@close());//指标值为收盘价
## `FilterSampleByCriterion_Wiz(stock_arr, list_day, sample_select, eps_criterion, eps_day)`
声明:function
按照一定的标准过滤计算板块指标的股票,标准由SampleSelect与EPSCriterion确定。其中亏损股为当前时间之前最近一期报告期每股收益(摊薄)\*12/报告期所在月份<0,停牌股为当前时间之前最近一期报告期每股收益(摊薄)\*12/报告期所在月份<EPSCriterion,与系统参数(股票,周期)相关。
| 参数 | 类型 | 说明 |
@@ -286,6 +320,8 @@ return Derivative2(@close());//指标值为收盘价
## `growthOfNDay(exp, n, return_type)`
声明:function
返回表达式Exp在N个周期指标的增长,其中returnType决定增长显示的类别,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -306,6 +342,8 @@ return GrowthOfNDay(@close(),5,0);
## `growthOfPeriod(exp, beg_date, end_date, returntype)`
声明:function
从Begdate到Enddate之间Expr指标的增长,增长模式由Returntype决定,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -326,6 +364,8 @@ return GrowthOfPeriod(@close(),20180801T,20180803T,1);
## `growthWithHighestOfNDay(exp, n, return_type)`
声明:function
表达式N日最大与当前的偏离,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -346,6 +386,8 @@ return GrowthWithHighestOfNDay(@close(),100,0);
## `growthWithLowestOfNDay(exp, n, return_type)`
声明:function
表达式N日最小与当前的偏离,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -366,6 +408,8 @@ return GrowthWithLowestOfNDay(@close(),100,0);
## `hhvBarsOfNDay(exp, n, cache_str)`
声明:function
N日最高点到当前的周期数。N日表示市场交易日,当日最低为0。注:剔除非交易日(停牌或未上市)数据指标。
| 参数 | 类型 | 说明 |
@@ -386,6 +430,8 @@ return HHVBarsOfNDay(@close(),10,"");
## `hhvBarsOfPeriod(exp, beg_date, end_date)`
声明:function
表达式区间最高点到当前的周期数
| 参数 | 类型 | 说明 |
@@ -405,6 +451,8 @@ return HHVBarsOfPeriod(@close(),20230101T,20231010T);
## `highestOfNDay(exp, n)`
声明:function
返回连续N个周期表达式Exp指标值的最大值,交易日序列以上证指数的交易日为基础,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -424,6 +472,8 @@ return HighestOfNDay(@close(),5);
## `highestOfPeriod(exp, beg_date, end_date)`
声明:function
返回当前从开始日Begt到截止日Endt表达式Exp的指标的最大值,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -443,6 +493,8 @@ return HighestOfPeriod(@close(),20180801T,20180802T);
## `interceptofNday(exp1, exp2, n, cache_str)`
声明:function
N日线性回归截距项,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -464,6 +516,8 @@ return interceptofNday(@close(),@open(),100,"");
## `interceptOfNDay2(exp, n, base_id)`
声明:function
表达式N日回归截距(双序列) ,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -484,6 +538,8 @@ return InterceptOfNDay2(@close(),10,"SH000001");
## `interceptOfPeriod(exp, beg_date, end_date, base_id)`
声明:function
表达式区间回归截距(双序列)
| 参数 | 类型 | 说明 |
@@ -504,6 +560,8 @@ return InterceptOfPeriod(@close(),20230901T,20231010T,"SH000001");
## `kurtosisOfNDay(exp, n)`
声明:function
表达式N日峰度,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -523,6 +581,8 @@ return KurtosisOfNDay(@close(),100);
## `llvBarsOfNDay(exp, n, cache_str)`
声明:function
N日最低点到当前的周期数。N日表示市场交易日,当日最低为0。注:剔除非交易日(停牌或未上市)数据指标。
| 参数 | 类型 | 说明 |
@@ -535,6 +595,8 @@ N日最低点到当前的周期数。N日表示市场交易日,当日最低为
## `llvBarsOfPeriod(exp, beg_date, end_date)`
声明:function
表达式区间最低点到当前的周期数
| 参数 | 类型 | 说明 |
@@ -554,6 +616,8 @@ return LLVBarsOfPeriod(@close(),20230101T,20231010T);
## `lowestOfNDay(exp, n)`
声明:function
返回表达式Exp指标连续N个周期的最小值,交易日序列以上证指数的交易日为基础,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -573,6 +637,8 @@ return LowestOfNDay(@close(),5);
## `lowestOfPeriod(exp, beg_date)`
声明:function
从Begdate到Enddate之间Expr指标的最小值,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -591,6 +657,8 @@ return LowestOfPeriod(@close(),20180801T,20180803T);
## `medianOfNDay(exp, n)`
声明:function
表达式N日中位数,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -610,6 +678,8 @@ return MedianOfNDay(@close(),100);
## `occuredOfNDay(exp, n)`
声明:function
返回表达式Exp指标连续N个周期发生次数,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -629,6 +699,8 @@ return OccuredOfNDay(@close(),10);
## `occuredTimeOfNDay(exp, n)`
声明:function
返回表达式Exp指标值发生前N个时间点的时间序列,与系统参数(股票,时间,周期)相关。
| 参数 | 类型 | 说明 |
@@ -640,6 +712,8 @@ return OccuredOfNDay(@close(),10);
## `occuredTimeOfPeriod(exp, beg_date, end_date)`
声明:function
返回BegDate至Endtime之间表达式Exp存在值的时间序列,与系统参数(股票,复权,周期)相关。
| 参数 | 类型 | 说明 |
@@ -652,6 +726,8 @@ return OccuredOfNDay(@close(),10);
## `positionOfSector(exp, sector)`
声明:function
从大到小排名。板块Sector中成分股按个券指标EXP大小排序,返回指定股票pn_stock()的排名,该函数与系统参数(股票,日期,复权,周期)相关。
| 参数 | 类型 | 说明 |
@@ -671,6 +747,8 @@ return PositionOfSector(@close(),'A股');
## `positionOfSectorDesc(exp, sector)`
声明:function
从小到大排名。板块Sector中按指标EXP大小排序,返回指定股票的排名,与系统参数(股票,日期,复权,周期)相关。
| 参数 | 类型 | 说明 |
@@ -690,6 +768,8 @@ return PositionOfSectorDesc(@close(),'A股');
## `queryWithPeriod(market_list, stock_id_list, condition, field_name1, expression1, field_name2, expression2, field_name_n, expression_n)`
声明:function
取证券一段时间的时间序列数据(行情、净值等)
| 参数 | 类型 | 说明 |
@@ -721,6 +801,8 @@ QueryWithPeriod("","SZ000002;SZ000001;SH600000;SH600004",@True,"","收盘价",@c
## `rd(id)`
声明:function
取得实时数据,就是当前最近的数据,主要用于盘中分析,委托5-10为LEVEL2行情专用。该函数与当前时间,当前周期无关,只与当前证券代码有关。
| 参数 | 类型 | 说明 |
@@ -744,6 +826,8 @@ return rds;
## `refValue(exp, n)`
声明:function
返回表达式Exp在前N个交易日的指标值,以市场交易日为准往前推N个交易日,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -764,6 +848,8 @@ return RefValue(@close(),10);
## `relativeStrengthOfSector(exp, sector)`
声明:function
系统当前证券在板块中的相对强弱(%)。系统当前证券pn_stock()在指定板块Sector中的指标Exp值的从大到小的排位百分比。该函数与系统参数(股票,日期,复权,周期)相关。
| 参数 | 类型 | 说明 |
@@ -783,6 +869,8 @@ return RelativeStrengthOfSector(@stockzf3(),'A股');
## `relativeStrengthOfSectorDesc(exp, sector)`
声明:function
系统当前证券在板块中的相对强弱(%)。系统当前证券pn_stock()在指定板块Sector中的指标Exp值的从小到大的排位百分比。该函数与系统参数(股票,日期,复权,周期)相关。
| 参数 | 类型 | 说明 |
@@ -802,6 +890,8 @@ return RelativeStrengthOfSectorDesc(@close(),'A股');
## `rsqOfNDay(exp, n, base_id)`
声明:function
表达式N日相关系数平方(双序列) ,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -822,6 +912,8 @@ return RSQOfNDay(@close(),10,"SH000001");
## `rsqOfPeriod(exp, beg_date, end_date, base_id)`
声明:function
表达式区间相关系数平方(双序列)
| 参数 | 类型 | 说明 |
@@ -842,12 +934,16 @@ return RSQOfPeriod(@close(),20230901T,20231010T,"SH000001");
## `sectionSubmitBuyVol()`
声明:function
当天截止累计委买量,与系统参数(股票、时间、周期、复权等相关),查看相关行情数据说明
返回:float
## `skewnessOfNDay(exp, n)`
声明:function
表达式N日偏度,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -867,6 +963,8 @@ return SkewnessOfNDay(@close(),100);
## `slopeOfNDay2(exp, n, base_id)`
声明:function
表达式N日回归斜率(双序列) ,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -887,6 +985,8 @@ return SlopeOfNDay2(@close(),10,"SH000001");
## `slopeOfPeriod(exp, beg_date, end_date, base_id)`
声明:function
表达式区间回归斜率(双序列)
| 参数 | 类型 | 说明 |
@@ -907,6 +1007,8 @@ return SlopeOfPeriod(@close(),20230901T,20231010T,"SH000001");
## `stdOfNDay(exp, n)`
声明:function
返回连续N个周期的表达式Exp指标值的标准差,交易日序列以上证指数的交易日为基础,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -926,6 +1028,8 @@ return StdOfNDay(@close(),5);
## `steyxOfNDay(exp, n, base_id)`
声明:function
表达式N日标准偏差(双序列) ,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -946,6 +1050,8 @@ return SteyxOfNDay(@close(),10,"SH000001");
## `steyxOfPeriod(exp, beg_date, end_date, base_id)`
声明:function
表达式区间标准偏差(双序列)
| 参数 | 类型 | 说明 |
@@ -966,6 +1072,8 @@ return SteyxOfPeriod(@close(),20230901T,20231010T,"SH000001");
## `sumifofNday(exp, n, condition, cache_astr)`
声明:function
N日条件求和,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -987,6 +1095,8 @@ return SumifofNday(@open(),30,"@open()>@close()","");
## `sumOfNDay(exp, n)`
声明:function
返回表达是Exp指标值在N个周期内的求和,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -1007,6 +1117,8 @@ return SumOfNDay(@vol(),10);
## `sumOfPeriod(v, beg_t, end_t)`
声明:function
返回当前从开始日Begt到截止日Endt表达式Exp的指标和,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -1026,6 +1138,8 @@ return SumOfPeriod(@close(),20180801T,20180802T);
## `sumOfSector(exp, shares_day, list_day, s_type, sample_select, eps_criterion, except_no_trade)`
声明:function
对指定板块按照一定标准进行选股后,对板块下每一只股票Exp表达式的指标值求和. 选股标准由SType、SampleSelect与EPSCriterion确定。 其中亏损股为当前时间之前最近一期报告期每股收益(摊薄)\*12/报告期所在月份<0; 停牌股为当前时间之前最近一期报告期每股收益(摊薄)\*12/报告期所在月份<EPSCriterion,与系统参数(板块,周期,时间)相关。
| 参数 | 类型 | 说明 |
@@ -1050,6 +1164,8 @@ return SumOfSector(@close(),20180801T,20180801T,1,0,0,0);
## `sumOfSectorExceptNoTrade(exp)`
声明:function
返回当前板块当前时间存在交易股票指标Exp的和,与系统参数(板块,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -1068,6 +1184,8 @@ return SumOfSectorExceptNoTrade(@close());
## `swingOfNDay(exp, n, return_type)`
声明:function
返回表达式Exp在N个周期指标的振幅,其中returnType决定振幅显示的模式,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -1088,6 +1206,8 @@ return SwingOfNDay(@close(),5,0);
## `swingOfPeriod(exp, beg_date, end_date, re_turn_type)`
声明:function
返回当前从开始日Begt到截止日Endt表达式Exp的指标区间振幅,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -1108,6 +1228,8 @@ return SwingOfPeriod(@close(),20180801T,20180802T,0);
## `td(id)`
声明:function
返回当前时间指定的交易明细数据。必须设置当前周期为小于日线的高频周期。
| 参数 | 类型 | 说明 |
@@ -1133,6 +1255,8 @@ return tds;
## `timeOfHighestOfNDay(exp, n)`
声明:function
表达式N日最高时间,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -1152,6 +1276,8 @@ return TimeOfHighestOfNDay(@close(),100);
## `timeOfHighestOfPeriod(exp, beg_date, end_date)`
声明:function
返回当前从开始日BegDate到截止日EndDate表达式Exp的指标最大值的时间点,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -1171,6 +1297,8 @@ return TimeOfHighestOfPeriod(@close(),20180801T,20180802T);
## `timeOfLowestOfNDay(exp, n)`
声明:function
表达式N日最低时间,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -1190,6 +1318,8 @@ return TimeOfLowestOfNDay(@close(),100);
## `timeOfLowestOfPeriod(exp, beg_t, end_t)`
声明:function
返回当前从开始日Begt到截止日Endt表达式Exp的指标最小值的时间点,与系统参数(股票,日期,周期,复权)相关。
| 参数 | 类型 | 说明 |
@@ -1209,6 +1339,8 @@ returnTimeOfLowestOfPeriod(@close(),20180801T,20180802T);
## `tradeDays(begin_date, end_date)`
声明:function
得到当前股票在两个日期间的交易日数目。如果参数BeginDate和参数EndDate是同一天而且有交易则为1,如果之间无交易日则为0。 该模型与股票、周期相关。获取开始时间到截止时间的交易日(周期)数。
| 参数 | 类型 | 说明 |
@@ -1227,6 +1359,8 @@ return tradeDays(inttodate(20100101), inttodate(20101231));//返回:240
## `tsPeriod(stock_id, cycle, date)`
声明:function
返回指定证券指定日期的指定周期时间序列。如有夜盘,包含昨日夜盘数据。
| 参数 | 类型 | 说明 |
@@ -1239,6 +1373,8 @@ return tradeDays(inttodate(20100101), inttodate(20101231));//返回:240
## `nDay2(field0, expression0, field1, expression1, field_m, expression_m)`
声明:function
同NDay类似,只是没有参数N,默认180天,用户可以通过系统参数 pn_nDay进行设定天数。和当前的股票,周期,时间等系统参数相关。详细说明也可参考nday
| 参数 | 类型 | 说明 |
@@ -1268,6 +1404,8 @@ return nDay2('时间',dateTimeToStr(sp_time()),
## `nDay3(n, expression)`
声明:function
提取或计算N个交易日的Expression数据。和当前的股票,周期,时间等系统参数相关。与Nday的区别即该函数仅能提取一个表达式Expression的数据,返回值为一维数组;而Nday可以提取多个,返回值为二维数组。
| 参数 | 类型 | 说明 |
@@ -1289,6 +1427,8 @@ return nDay3(30,close());
## `ref(exp, n)`
声明:function
求N日前Exp的值
| 参数 | 类型 | 说明 |
@@ -1313,6 +1453,8 @@ return r;
## `specDate(exp, date)`
声明:function
设置当前时间的快捷方式,只影响exp表达式。指定Date时间为当前时间,计算表达式Exp的值返回。
| 参数 | 类型 | 说明 |
@@ -1336,6 +1478,8 @@ return nDay(30,'date',dateToStr(sp_time()),
## `spec(exp, stock_id)`
声明:function
设置当前股票的快捷方式,只影响Exp表达式。指定StockID股票为当前股票,计算表达式的值返回
| 参数 | 类型 | 说明 |
@@ -1362,6 +1506,8 @@ return nDay(n,'date',dateToStr(sp_time()),
## `specAll(exp, sys_param)`
声明:function
指定特定的系统参数计算表达式的值返回
| 参数 | 类型 | 说明 |
@@ -1384,6 +1530,8 @@ pn_rateday():-1));
## `hd_NDay3(day_count)`
声明:function
NDay3函数教学函数,返回DayCount个数的日期时间。与系统参数(股票、时间、周期相关)。
| 参数 | 类型 | 说明 |
@@ -1394,6 +1542,8 @@ NDay3函数教学函数,返回DayCount个数的日期时间。与系统参数(
## `hd_NDay(day_count)`
声明:function
NDay函数教学函数,返回DayCount个数开盘价、收盘价、最高价、最低价、日期时间。与系统参数(股票、时间、周期、复权等相关)。
| 参数 | 类型 | 说明 |
@@ -1404,6 +1554,8 @@ NDay函数教学函数,返回DayCount个数开盘价、收盘价、最高价
## `hd_Spec(id)`
声明:function
Spec函数教学函数,返回指定股票收盘价。与系统参数(时间、周期、复权等相关)。
| 参数 | 类型 | 说明 |
@@ -1414,6 +1566,8 @@ Spec函数教学函数,返回指定股票收盘价。与系统参数(时间、
## `hd_SpecDate(endt)`
声明:function
SpecDate函数教学函数,返回指定日期时间的最高价。与系统参数(股票、周期、复权等相关)。
| 参数 | 类型 | 说明 |
@@ -1424,6 +1578,8 @@ SpecDate函数教学函数,返回指定日期时间的最高价。与系统参
## `hd_SpecAndSpecDate(id, days, endt)`
声明:function
Spec函数与SpecDate函数结合教学函数,返回指定股票ID到截止日Endt前Days个最高价中的最大者。与系统参数(周期、复权等相关)。
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `baseExists(info_id, _order)`
声明:function
返回是否存在某项和报告期无关的数据,例如公司简称、注册地址等
| 参数 | 类型 | 说明 |
@@ -21,6 +23,8 @@ return base(10002);
## `basicIdExists(id)`
声明:function
返回某信息ID是否存在
| 参数 | 类型 | 说明 |
@@ -31,6 +35,8 @@ return base(10002);
## `continuedMatchOfRepPeriod(expr, beg_report, end_year)`
声明:function
判断在区间BegReport到EndYear中是否存在运行表达式Exp的值,若存在返回1,否则返回0。
| 参数 | 类型 | 说明 |
@@ -43,6 +49,8 @@ return base(10002);
## `getExpCaceStr(exp, cache_str)`
声明:function
判断是否缓存以及返回缓存串。
| 参数 | 类型 | 说明 |
@@ -54,6 +62,8 @@ return base(10002);
## `isBalanceInfoId(infold)`
声明:function
是否是资产负债表指标。是则返回1,否则返回0。
| 参数 | 类型 | 说明 |
@@ -64,6 +74,8 @@ return base(10002);
## `isCashFlowInfoId(infold)`
声明:function
判断是否是现金流量表指标,如果是则返回1,否则返回0。
| 参数 | 类型 | 说明 |
@@ -74,6 +86,8 @@ return base(10002);
## `isFinancialInfoId(info_id)`
声明:function
是否是主要财务指标(仅Wind适用),兼容Wind的主要财务指标也计算最近12个月的数据。
| 参数 | 类型 | 说明 |
@@ -84,6 +98,8 @@ return base(10002);
## `isFundBalanceSheetInfoId(infold)`
声明:function
是否是基金资产负债表字段。是则返回1,否则返回0。
| 参数 | 类型 | 说明 |
@@ -94,6 +110,8 @@ return base(10002);
## `isFundInterestInfoId(infold)`
声明:function
是否是基金利润分配表表字段。是则返回1,否则返回0。
| 参数 | 类型 | 说明 |
@@ -104,6 +122,8 @@ return base(10002);
## `isInterestInfoId(infold)`
声明:function
是否是利润分配表指标。是则返回1,否则返回0。
| 参数 | 类型 | 说明 |
@@ -114,6 +134,8 @@ return base(10002);
## `isMainReportId(infold)`
声明:function
判断是否是主要报告指标,如果是返回1,否则返回0。指标包括资产负债表,利润分配表,现金流量表,基金资产负债表,基金利润分配表,股票财务指标。
| 参数 | 类型 | 说明 |
@@ -124,6 +146,8 @@ return base(10002);
## `isStock(stock_id)`
声明:function
判定函数相关函数。
| 参数 | 类型 | 说明 |
@@ -134,6 +158,8 @@ return base(10002);
## `isStockFinancialItem(infold)`
声明:function
是否是股票财务指标。是则返回1,否则返回0。
| 参数 | 类型 | 说明 |
@@ -144,6 +170,8 @@ return base(10002);
## `isTimePeriodInfoId(info_id)`
声明:function
是否是时段指标。
| 参数 | 类型 | 说明 |
@@ -154,6 +182,8 @@ return base(10002);
## `isTradeDay(date)`
声明:function
如果当前股票在Date指定日交易则返回1,否则返回0。 该函数的判断是依据指定日是否有日线行情数据,不管当日是否有成交量。 比如期货不活跃时,当日可能没有成交量,但是也有行情数据,则判断当日也是交易日。 一般用于判断当前股票在指定日是否停牌。 支持周期:日线及更低频,比如周线、月线等。若是周线,则判断这一周内是否有日线数据,若有则为真,若一条都没有则为假。即,不支持高频的判定。
| 参数 | 类型 | 说明 |
@@ -171,6 +201,8 @@ return IsTradeDay(inttodate(20110828));//返回0
## `isValidCode(id, full_id)`
声明:function
判断是否为合法的代码。判断是否合法代码的规则与isstock类似。如果ID是合法的代码,FullID返回的值为标准化后的天软代码,否则为0。
| 参数 | 类型 | 说明 |
@@ -182,6 +214,8 @@ return IsTradeDay(inttodate(20110828));//返回0
## `isValidPositiveValue(v)`
声明:function
判断是否为大于0的实数,如果是返回1,否则返回0。
| 参数 | 类型 | 说明 |
@@ -192,6 +226,8 @@ return IsTradeDay(inttodate(20110828));//返回0
## `isValidValue(v)`
声明:function
判断V是否是一个数字类型(整数或者实数),如果是非空实数,则返回1,否则返回0。
| 参数 | 类型 | 说明 |
@@ -202,6 +238,8 @@ return IsTradeDay(inttodate(20110828));//返回0
## `reportExists(info_id, report_id)`
声明:function
返回是否存在某个报告期的某项财务指标
| 参数 | 类型 | 说明 |
@@ -220,6 +258,8 @@ return ReportExists(18007,20101231); //返回1,是
## `reportHistExists(infoid)`
声明:function
返回某项数据是否存在有报告
| 参数 | 类型 | 说明 |
@@ -237,6 +277,8 @@ return ReportHistExists(18007);
## `testStock(stock_id)`
声明:function
判定函数相关函数。
| 参数 | 类型 | 说明 |
@@ -247,6 +289,8 @@ return ReportHistExists(18007);
## `validFullCode(stock_id)`
声明:function
判定函数相关函数。
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `avgOfRepPeriod(exp, begreport, end_year)`
声明:function
返回当前股票从报告期BegReport到EndYear同季度报告期的Expr指标的平均值,与系统参数(股票)相关。
| 参数 | 类型 | 说明 |
@@ -22,6 +24,8 @@ return AvgOfRepPeriod(@reportofall(46002,GetSysParam('DefaultRepID')),20150331,2
## `avgOfRepPeriod2(exp, beg_report, end_report, report_type)`
声明:function
表达式区间平均
| 参数 | 类型 | 说明 |
@@ -42,6 +46,8 @@ return AvgOfRepPeriod2(@reportofall(46002,GetSysParam('DefaultRepID')),20201231,
## `growthOfRepPeriod2(exp, beg_report, end_report, return_type, report_type)`
声明:function
表达式区间增长
| 参数 | 类型 | 说明 |
@@ -63,6 +69,8 @@ return GrowthOfRepPeriod2(@reportofall(46002,GetSysParam('DefaultRepID')),202012
## `highestOfRepPeriod2(exp, beg_report, end_report, report_type)`
声明:function
表达式区间最高
| 参数 | 类型 | 说明 |
@@ -83,6 +91,8 @@ return HighestOfRepPeriod2(@reportofall(46002,GetSysParam('DefaultRepID')),20201
## `kurtosisOfPeriod(exp, beg_date, end_date)`
声明:function
表达式区间峰度
| 参数 | 类型 | 说明 |
@@ -102,6 +112,8 @@ return KurtosisOfPeriod(@close(),20230101T,20231010T);
## `lowestOfRepPeriod2(exp, beg_report, end_report, report_type)`
声明:function
表达式区间最低
| 参数 | 类型 | 说明 |
@@ -122,6 +134,8 @@ return LowestOfRepPeriod2(@reportofall(46002,GetSysParam('DefaultRepID')),202012
## `medianOfPeriod(exp, beg_date, end_date)`
声明:function
表达式区间中位数
| 参数 | 类型 | 说明 |
@@ -141,6 +155,8 @@ return MedianOfPeriod(@close(),20230101T,20231010T);
## `occuredOfPeriod(exp, beg_date, end_date)`
声明:function
表达式区间发生次数
| 参数 | 类型 | 说明 |
@@ -160,6 +176,8 @@ return OccuredOfPeriod(@IsUp(),20230101T,20231010T);
## `occuredOfRepPeriod(exp, begreport, end_year)`
声明:function
返回当前股票从BegReport到EndYear的同季度报告期数,与系统参数(股票)相关。
| 参数 | 类型 | 说明 |
@@ -179,6 +197,8 @@ return OccuredOfRepPeriod(@reportofall(46002,GetSysParam('DefaultRepID')),201503
## `percentRankOfPeriod(exp, beg_date, end_date)`
声明:function
表达式区间分位数
| 参数 | 类型 | 说明 |
@@ -198,6 +218,8 @@ return PercentRankOfPeriod(@close(),20230101T,20231010T);
## `skewnessOfPeriod(exp, beg_date, end_date)`
声明:function
表达式区间偏度
| 参数 | 类型 | 说明 |
@@ -217,6 +239,8 @@ return SkewnessOfPeriod(@close(),20230101T,20231010T);
## `stdOfPeriod(exp, beg_date, end_date)`
声明:function
表达式区间标准差
| 参数 | 类型 | 说明 |
@@ -236,6 +260,8 @@ return StdOfPeriod(@close(),20230101T,20231010T);
## `stdOfRepPeriod2(exp, beg_report, end_report, report_type)`
声明:function
表达式区间标准差
| 参数 | 类型 | 说明 |
@@ -256,6 +282,8 @@ return StdOfRepPeriod2(@reportofall(46002,GetSysParam('DefaultRepID')),20201231,
## `sumOfRepPeriod(exp, begreport, end_year)`
声明:function
返回当前股票Expr指标从报告期BegReport到EndYear同季度报告期的和,与系统参数(股票)相关。
| 参数 | 类型 | 说明 |
@@ -276,6 +304,8 @@ return SumOfRepPeriod(@reportofall(46002,GetSysParam('DefaultRepID')),20150331,2
## `sumOfRepPeriod2(exp, beg_report, end_report, report_type)`
声明:function
表达式区间和
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `defaultRepId()`
声明:function
选股与取数相关函数。
返回:int
@@ -18,6 +20,8 @@ return v;
## `evalstring(s)`
声明:function
内核使用,返回表达式s的值。
| 参数 | 类型 | 说明 |
@@ -28,6 +32,8 @@ return v;
## `queryBk(arg1, arg2, expression_3, arg4, arg5, expression_6, arg7, expression_8, arg9, expression_10, arg11, expression_12)`
声明:function
选股与取数相关函数。
| 参数 | 类型 | 说明 |
@@ -49,6 +55,8 @@ return v;
## `queryBkWithPeriod(arg1, arg2, expression_3, arg4, arg5, expression_6, arg7, expression_8, arg9, expression_10)`
声明:function
选股与取数相关函数。
| 参数 | 类型 | 说明 |
@@ -80,12 +88,16 @@ QueryBKWithPeriod("深证A股","",@True,"","换手率(%)(加权,只考虑A股)",
## `qwpMaxCount()`
声明:function
选股与取数相关函数。
返回:int
## `query(market_list, stock_id_list, condition, sort_field, field_name_n, expression_n)`
声明:function
报表生成函数,在指定的市场列表MarketList和股票列表内满足条件的股票列出来,并按照SortName排序,并列出相关的数据信息
| 参数 | 类型 | 说明 |
@@ -116,6 +128,8 @@ return data;
## `getDataByMd(stockid, n)`
声明:function
使用Md获取指定日数据,与系统参数(时间)相关。
| 参数 | 类型 | 说明 |
@@ -136,6 +150,8 @@ return getDataByMd("MA110C2375.SP",1);
## `getDataByMd2(stockid, n)`
声明:function
使用Md获取指定日数据(考虑交易日),与系统参数(时间)相关。
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `cyclefilter()`
声明:function
设置周期过滤器以及集合竞价分离器。它是系统参数键,不是函数调用。
| 参数 | 类型 | 说明 |
@@ -12,6 +14,8 @@
## `getSysParam(param_name)`
声明:function
返回系统参数的值。
| 参数 | 类型 | 说明 |
@@ -22,6 +26,8 @@
## `setSysParam(param_name, param_value)`
声明:function
设置系统参数,既对本地执行有效,也对平台执行有效。
| 参数 | 类型 | 说明 |
@@ -33,6 +39,8 @@
## `nDay()`
声明:function
整数类型,NDAY默认返回的点数系统参数,读写。
返回:any
@@ -2,6 +2,8 @@
## `pn_CalcCTRLWord(return_value)`
声明:function
系统参数常量"CalcCTRLWord" 控制nil参与计算以及浮点除0的警告或者出错
| 参数 | 类型 | 说明 |
@@ -12,96 +14,128 @@
## `pn_ChangedDateMode()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_Cycle()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_Date()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `Pn_Emptymode()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_FreeCycle()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `Pn_I64Trans()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_nDay()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_NilTrans()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_NoRaiseNoData()`
声明:function
获取/设置“无数据不抛异常”的系统参数键。
返回:array
## `pn_Precision()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_Rate()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_RateDay()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_ReportMode()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pnReportType()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_Stock()`
声明:function
返回数据仓库相关系统参数名。
返回:string
## `pn_ViewPoint()`
声明:function
返回数据仓库相关系统参数名。
返回:string
@@ -2,6 +2,8 @@
## `firstDay(stock_id)`
声明:function
时间相关函数相关函数。
| 参数 | 类型 | 说明 |
@@ -19,6 +21,8 @@ Return firstday();//33240(1991-01-02);
## `lastDay(stock_id)`
声明:function
时间相关函数相关函数。
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `sp_median(arg1, arg2)`
声明:function
时间序列统计相关函数。
| 参数 | 类型 | 说明 |
@@ -13,6 +15,8 @@
## `sp_mode(arg1, arg2)`
声明:function
时间序列统计相关函数。
| 参数 | 类型 | 说明 |
@@ -24,6 +28,8 @@
## `sp_norm(stock_id, arg2)`
声明:function
时间序列统计相关函数。
| 参数 | 类型 | 说明 |
@@ -35,6 +41,8 @@
## `sp_product(stock_id, arg2)`
声明:function
时间序列统计相关函数。
| 参数 | 类型 | 说明 |
@@ -46,6 +54,8 @@
## `sp_rank(arg1, arg2, arg3)`
声明:function
时间序列统计相关函数。
| 参数 | 类型 | 说明 |
@@ -58,6 +68,8 @@
## `hhv(exp, n, cache_string)`
声明:function
返回N日最高的Exp的值,与系统参数(股票、时间、周期等相关),查看相关行情数据说明。
| 参数 | 类型 | 说明 |
@@ -87,6 +99,8 @@ return r;
## `llv(exp, n, cache_string)`
声明:function
返回N日最低的Exp的值,与系统参数(股票、时间、周期等相关),查看相关行情数据说明。
| 参数 | 类型 | 说明 |
@@ -99,6 +113,8 @@ return r;
## `ma(exp, n, cache_string)`
声明:function
返回N日Exp的平均值,与系统参数(股票、时间、周期等相关)。
| 参数 | 类型 | 说明 |
@@ -130,6 +146,8 @@ return t;
## `ema(exp, n, cache_string)`
声明:function
返回N日Exp的移动平均,与系统参数(股票、时间、周期等相关)。
| 参数 | 类型 | 说明 |
@@ -153,6 +171,8 @@ return ema(close(),n);
## `sma(exp, n, m, cache_string)`
声明:function
求Exp的N日平滑移动平均,M为权重。
| 参数 | 类型 | 说明 |
@@ -177,6 +197,8 @@ return sma(close(),n,m);//返回8.0914
## `count(exp, n, cache_string)`
声明:function
统计N天中表达式Exp值为真的天数。
| 参数 | 类型 | 说明 |
@@ -199,6 +221,8 @@ return count(isUp(),100);
## `sumN(exp, n, cache_string)`
声明:function
求Exp的N日累加和。
| 参数 | 类型 | 说明 |
@@ -220,6 +244,8 @@ return sumN(vol(),5); // 返回152502152
## `cross(a, b)`
声明:function
A线从下面穿越B线时返回1,从A上面向下穿越B时返回-1,否则返回0。与系统参数(股票、时间、周期等相关)
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `continuedMatchOfNDay(exp, n)`
声明:function
判断Exp在过去N个交易日是否取得指标值,若取得返回1,否则返回0,与系统参数(股票,日期)相关。
| 参数 | 类型 | 说明 |
@@ -21,6 +23,8 @@ return ContinuedMatchOfNDay(@close(),3);
## `correlOfNDay(exp1, exp2, n, cache_str)`
声明:function
过去N日相关系数,其中N日表示市场交易日。注:剔除非交易日,例如求过去20天开盘价与成交量的相关系数,但是期间有10天停牌,则取非停牌日10天的相关系数。
| 参数 | 类型 | 说明 |
@@ -42,6 +46,8 @@ return CorrelOfNDay(@stockpjcj3(),@RefValue(@close(),5),10,"");
## `covarOfNDay(exp1, exp2, n, cache_str)`
声明:function
过去N日协方差。N日表示市场交易日。注:剔除非交易日,例如求过去20天开盘价与成交量的协方差,但是期间有10天停牌,则取非停牌日10天的协方差。
| 参数 | 类型 | 说明 |
@@ -63,6 +69,8 @@ return CovarOfNDay(@close(),@open(),30,"");
## `productOfNDay(exp, n, cache_str)`
声明:function
过去N日乘积。N日表示市场交易日。注:剔除非交易日(停牌或未上市)数据指标。
| 参数 | 类型 | 说明 |
@@ -83,6 +91,8 @@ return ProductOfNDay(@close(),3,"");
## `smaofNDay(exp, n, m, cache_str)`
声明:function
过去N日平滑移动平均。N日表示市场交易日。注:剔除非交易日(停牌或未上市)数据指标。
| 参数 | 类型 | 说明 |
@@ -2,6 +2,8 @@
## `compositeRatioValue(v1, v2, n)`
声明:function
返回初值V1到末值V2的复合增长率。
| 参数 | 类型 | 说明 |
@@ -14,6 +16,8 @@
## `growthOfRepPeriod(expr, r_date, result_type)`
声明:function
表达式Exp某个指标在报告期Rdate的同比增长,ReturnType决定返回偏离值(增加值)还是偏离率(增速%)。
| 参数 | 类型 | 说明 |
@@ -26,6 +30,8 @@
## `growthWithLowestOfPeriod(exp, beg_date, end_date, return_type)`
声明:function
返回表达式Exp在区间BegDate到EndDate中的最小值与在EndDate的值的偏离,ReturnType决定返回偏离值(增加值)还是偏离率(增速%)。。
| 参数 | 类型 | 说明 |
@@ -46,6 +52,8 @@ return GrowthWithLowestOfPeriod(@close(),20180801T,20180903T,0);
## `isNull(arg1)`
声明:function
判断条件是否成立。
| 参数 | 类型 | 说明 |
@@ -56,6 +64,8 @@ return GrowthWithLowestOfPeriod(@close(),20180801T,20180903T,0);
## `occuredRepIdOfRepPeriod(expr, beg_report, end_year)`
声明:function
在区间BegReport到EndYear年中,与BegReport报告期同比的报告期中返回表达式exp为真的报告期。
| 参数 | 类型 | 说明 |
@@ -68,12 +78,16 @@ return GrowthWithLowestOfPeriod(@close(),20180801T,20180903T,0);
## `positionOfIndustry()`
声明:function
向导函数相关函数。
返回:any
## `ratioValueByType(v1, v2, _type, n)`
声明:function
依据返回类型type,返回初值V1到末值V2的增长/增长率/复合增长率。
| 参数 | 类型 | 说明 |
@@ -87,6 +101,8 @@ return GrowthWithLowestOfPeriod(@close(),20180801T,20180903T,0);
## `reduceWithHighestOfPeriod(exp, beg_date, end_date, return_type)`
声明:function
返回表达式Exp在区间BegDate到EndDate中的最大值与在EndDate的值的偏离,ReturnType决定返回偏离值(增加值)还是偏离率(增速%)。
| 参数 | 类型 | 说明 |
@@ -107,12 +123,16 @@ return ReduceWithHighestOfPeriod(@close(),20180801T,20180803T,0);
## `relativeStrengthOfIndustry()`
声明:function
向导函数相关函数。
返回:any
## `reportOfListed(id, report_id)`
声明:function
返回指定报告期ReportID的基本面ID数据。如果该证券未上市,则返回0,函数与系统参数(股票、时间)相关。
| 参数 | 类型 | 说明 |
@@ -124,6 +144,8 @@ return ReduceWithHighestOfPeriod(@close(),20180801T,20180803T,0);
## `reportPerShareOfListed(id, report_id)`
声明:function
指定报告期ReportID的基本面ID数据/总股本。如果该证券未上市,则返回0,函数与系统参数(股票、时间)相关。
| 参数 | 类型 | 说明 |
@@ -135,6 +157,8 @@ return ReduceWithHighestOfPeriod(@close(),20180801T,20180803T,0);
## `reportValueOfPeriod(exp, beg_report, end_report, report_type, reportvalue)`
声明:function
区间财务数据
| 参数 | 类型 | 说明 |
@@ -149,6 +173,8 @@ return ReduceWithHighestOfPeriod(@close(),20180801T,20180803T,0);
## `simplyRatioValue(v1, v2)`
声明:function
返回初值V1到末值V2的增长率。若V1<0,则直接返回0。
| 参数 | 类型 | 说明 |
@@ -160,6 +186,8 @@ return ReduceWithHighestOfPeriod(@close(),20180801T,20180803T,0);
## `stockTrailingAvgByEndT(endt, ref_type, exp, is_exclude_ipo, n)`
声明:function
获取基于指定日推移阶段的日均指标
| 参数 | 类型 | 说明 |
@@ -185,6 +213,8 @@ return StockTrailingAvgByEndT(Endt,RefType,Exp);
## `stockTrailingStdByEndT(endt, ref_type, exp, is_exclude_ipo, n)`
声明:function
获取基于指定日推移阶段的指标标准差
| 参数 | 类型 | 说明 |
@@ -210,6 +240,8 @@ return StockTrailingStdByEndT(Endt,RefType,Exp); // 1.69
## `TechCal_Unit(expression)`
声明:function
向导函数相关函数。
| 参数 | 类型 | 说明 |