✨ feat(tsl-api-reference): add class and framework API lookup
This commit is contained in:
+12
-14
@@ -51,7 +51,6 @@ return ACCOfNReport(@Last12MData(DefaultRepID(), 46078), 20201231, 8, 1);
|
||||
|
||||
```tsl
|
||||
SetSysParam(pn_stock(), 'SZ000001');
|
||||
|
||||
return AvgOfNReport(@reportofall(46002, DefaultRepID()), 20151231, 2);
|
||||
// 输出:84785000000
|
||||
```
|
||||
@@ -60,7 +59,6 @@ return AvgOfNReport(@reportofall(46002, DefaultRepID()), 20151231, 2);
|
||||
|
||||
```tsl
|
||||
SetSysParam(pn_stock(), 'SZ000001');
|
||||
|
||||
return AvgOfNReport(@LastQuarterData(DefaultRepID(), 46002, 0), 20151231, 2, 1);
|
||||
// 输出:24794000000
|
||||
```
|
||||
@@ -86,7 +84,7 @@ return AvgOfNReport(@LastQuarterData(DefaultRepID(), 46002, 0), 20151231, 2, 1);
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
判断2014到2015这两年平安银行年报是否全部存在
|
||||
// 判断2014到2015这两年平安银行年报是否全部存在
|
||||
SetSysParam(pn_stock(), 'SZ000001');
|
||||
return ContinuedMatchOfNReport(@reportofall(46002, GetSysParam('DefaultRepID')), 20151231, 2);
|
||||
```
|
||||
@@ -117,7 +115,7 @@ Exp := @LastQuarterData(DefaultRepID(), 46078);
|
||||
ReportID := 20211231;
|
||||
LastReportType := 0;
|
||||
t := EAAOfNReport(Exp, ReportID, LastReportType);
|
||||
return t; // -0.016
|
||||
return t; // 输出:-0.016
|
||||
```
|
||||
|
||||
## `eavOfNReport(exp, report_id, n, report_type, last_report_type)`
|
||||
@@ -150,7 +148,7 @@ N := 8;
|
||||
ReportType := 1; // 0:年度,1:季度
|
||||
LastReportType := 0;
|
||||
t := EAVOfNReport(Exp, ReportID, N, ReportType, LastReportType);
|
||||
return t; // -0.45
|
||||
return t; // 输出:-0.45
|
||||
```
|
||||
|
||||
## `growthOfNReport(exp, report_id, n, return_type)`
|
||||
@@ -175,7 +173,7 @@ return t; // -0.45
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
返回平安银行2014年与2015年报营业收入增长比例
|
||||
// 返回平安银行2014年与2015年报营业收入增长比例
|
||||
SetSysParam(pn_stock(), 'SZ000001');
|
||||
return GrowthOfNReport(@reportofall(46002, GetSysParam('DefaultRepID')), 20151231, 1, 1);
|
||||
```
|
||||
@@ -236,7 +234,7 @@ N := 5;
|
||||
ReportType := 1; // 0:年度,1:季度
|
||||
Range := 3;
|
||||
t := HighGrowthOfNReport(Exp, ReportID, N, ReportType, Range);
|
||||
return t; // 1
|
||||
return t; // 输出:1
|
||||
```
|
||||
|
||||
## `lowestOfNReport(exp, report_id, n, report_type)`
|
||||
@@ -286,9 +284,9 @@ return lowestOfNReport(@ReportOfAll(46080, DefaultRepID()), 20221231, 5, 0);
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
返回平安银行截止到2015年12月31日的所有年报数量
|
||||
// 返回平安银行截止到2015年12月31日的所有年报数量
|
||||
SetSysParam(pn_stock(), 'SZ000001');
|
||||
returnOccuredOfNReport(@reportofall(46002, GetSysParam('DefaultRepID')), 20151231, 100);
|
||||
return OccuredOfNReport(@reportofall(46002, GetSysParam('DefaultRepID')), 20151231, 100);
|
||||
```
|
||||
|
||||
## `refReportValue(exp, report_id, n)`
|
||||
@@ -312,7 +310,7 @@ returnOccuredOfNReport(@reportofall(46002, GetSysParam('DefaultRepID')), 2015123
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
返回平安银行2015年年报营业收入额
|
||||
// 返回平安银行2015年年报营业收入额
|
||||
SetSysParam(pn_stock(), 'SZ000001');
|
||||
return RefReportValue(@reportofall(46002, GetSysParam('DefaultRepID')), 20161231, 1);
|
||||
```
|
||||
@@ -341,7 +339,7 @@ N期稳健加速度
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(), "SH600519");
|
||||
return RobustACCOfNReport(@Last12MData(DefaultRepID(), 9900604), 20201231, 8, 0); // -0.0878801178157446
|
||||
return RobustACCOfNReport(@Last12MData(DefaultRepID(), 9900604), 20201231, 8, 0); // 输出:-0.0878801178157446
|
||||
```
|
||||
|
||||
## `robustGrowthOfNReport(exp, report_id, n, report_type)`
|
||||
@@ -399,7 +397,7 @@ ReportID := 20211231;
|
||||
N := 8;
|
||||
ReportType := 1; // 0:年度,1:季度
|
||||
t := StandGrowthOfNReport(Exp, ReportID, N, ReportType);
|
||||
return t; // 1.265
|
||||
return t; // 输出:1.265
|
||||
```
|
||||
|
||||
## `sumOfNReport(exp, report_id, n)`
|
||||
@@ -423,7 +421,7 @@ return t; // 1.265
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
计算平安银行2015年报与2014年报营业收入的和
|
||||
// 计算平安银行2015年报与2014年报营业收入的和
|
||||
SetSysParam(pn_stock(), 'SZ000001');
|
||||
return SumOfNReport(@reportofall(46002, GetSysParam('DefaultRepID')), 20151231, 2);
|
||||
```
|
||||
@@ -456,5 +454,5 @@ ReportID := 20210331;
|
||||
N := 5;
|
||||
ReportType := 1; // 0:年度,1:季度
|
||||
t := TurnPositiveOfNReport(Exp, ReportID, N, ReportType);
|
||||
return t; // 1
|
||||
return t; // 输出:1
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user