✨ feat(tsl-api-reference): add class and framework API lookup
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
<!-- tags: 基准指数 指数产品 指数编制 指数回测 成分股 -->
|
||||
|
||||
### `getTimeSeries()`
|
||||
### `GetTimeSeries()`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
可见性:`public`
|
||||
|
||||
### `getIndexStock(end_t)`
|
||||
### `GetIndexStock(end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
| ------- | -------- | -------------- |
|
||||
| `end_t` | datetime | 截止日,日期型 |
|
||||
|
||||
### `getIndexTmpAdjustStock(endt)`
|
||||
### `GetIndexTmpAdjustStock(endt)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
| ------ | -------- | -------------- |
|
||||
| `endt` | datetime | 截止日,日期型 |
|
||||
|
||||
### `initWeightAndDiv(p_endt, tpdiv_table, tp_next_weight_table)`
|
||||
### `InitWeightAndDiv(p_endt, tpdiv_table, tp_next_weight_table)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
| `tpdiv_table` | array | 区间内除数与权重变更数据表 |
|
||||
| `tp_next_weight_table` | array | 股票清算时表示下个交易日开盘参考权重,包含字段如下: 字段 类型 含义 |
|
||||
|
||||
### `updatestockinfo_GetWeight(endt, stock_table)`
|
||||
### `Updatestockinfo_GetWeight(endt, stock_table)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -90,10 +90,10 @@ StockData := Select Endt as "截止日",
|
||||
obj := New tsIndexBackTesting_base();
|
||||
obj.FStockWeight := 9;
|
||||
obj.FSharesType := 4;
|
||||
return obj.updatestockinfo_GetWeight(Endt,StockData);
|
||||
return obj.Updatestockinfo_GetWeight(Endt,StockData);
|
||||
```
|
||||
|
||||
### `updatestockinfo_GetWeightFactorByWeight(stock_table, endt, close_type, share_type)`
|
||||
### `Updatestockinfo_GetWeightFactorByWeight(stock_table, endt, close_type, share_type)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -124,10 +124,10 @@ ShareType := 4;
|
||||
CloseType := 1;
|
||||
obj := New tsIndexBackTesting_base();
|
||||
return
|
||||
obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
obj.Updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
```
|
||||
|
||||
### `getAdjustWeightData(begt, endt)`
|
||||
### `GetAdjustWeightData(begt, endt)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -142,7 +142,7 @@ obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
| `begt` | datetime | 起始日,日期 |
|
||||
| `endt` | datetime | 截止日,日期 |
|
||||
|
||||
### `getOpenWeightData(begt, endt)`
|
||||
### `GetOpenWeightData(begt, endt)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -157,7 +157,7 @@ obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
| `begt` | datetime | 起始日,日期 |
|
||||
| `endt` | datetime | 截止日,日期 |
|
||||
|
||||
### `getNextOpenWeightData(begt, endt)`
|
||||
### `GetNextOpenWeightData(begt, endt)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -172,7 +172,7 @@ obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
| `begt` | datetime | 起始日,日期 |
|
||||
| `endt` | datetime | 截止日,日期 |
|
||||
|
||||
### `getDivisorData(begt, endt)`
|
||||
### `GetDivisorData(begt, endt)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -187,7 +187,7 @@ obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
| `begt` | datetime | 起始日,日期 |
|
||||
| `endt` | datetime | 截止日,日期 |
|
||||
|
||||
### `getCloseWeightData(begt, endt)`
|
||||
### `GetCloseWeightData(begt, endt)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -202,7 +202,7 @@ obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
| `begt` | datetime | 起始日,日期 |
|
||||
| `endt` | datetime | 截止日,日期 |
|
||||
|
||||
### `getIndexReturn(beg_t, end_t)`
|
||||
### `GetIndexReturn(beg_t, end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -217,7 +217,7 @@ obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
| `beg_t` | datetime | 起始日,日期 |
|
||||
| `end_t` | datetime | 截止日,日期 |
|
||||
|
||||
### `getIndexReturn2(begt, endt)`
|
||||
### `GetIndexReturn2(begt, endt)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -232,7 +232,7 @@ obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
| `begt` | datetime | 起始日,日期 |
|
||||
| `endt` | datetime | 截止日,日期 |
|
||||
|
||||
### `getIndexReturnandRisk(begt, endt)`
|
||||
### `GetIndexReturnandRisk(begt, endt)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -247,7 +247,7 @@ obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
| `begt` | datetime | 起始日,日期 |
|
||||
| `endt` | datetime | 截止日,日期 |
|
||||
|
||||
### `getIndexDailyHQPerf(begt, endt, src_cycle)`
|
||||
### `GetIndexDailyHQPerf(begt, endt, src_cycle)`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -263,7 +263,7 @@ obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
| `endt` | datetime | 起始日 |
|
||||
| `src_cycle` | string | 源数据周期,一般 30s 或 1 分钟线 缺省时持仓<3000 时为 30s,否则 1 分钟 |
|
||||
|
||||
### `getIndexHisData()`
|
||||
### `GetIndexHisData()`
|
||||
|
||||
声明:function
|
||||
|
||||
@@ -281,7 +281,7 @@ obj.updatestockinfo_GetWeightFactorByWeight(StockData,Endt,CloseType,ShareType);
|
||||
begt := 20201231T;
|
||||
Endt := 20251231T;
|
||||
|
||||
obj := CreateObject("MytsIndexBackTesting");
|
||||
obj := CreateObject("mytsIndexBackTesting");
|
||||
//-------------------------==常用属性==----------------------------
|
||||
obj.FBegT := begt;
|
||||
obj.FendT := Endt;
|
||||
@@ -319,7 +319,7 @@ return array(
|
||||
"次日开盘权重(最新)":obj.GetNextOpenWeightData(),
|
||||
"收盘权重(最新)":obj.GetCloseWeightData(endt, endT),
|
||||
);
|
||||
Type MytsIndexBackTesting=class(tsIndexBackTesting_base)
|
||||
Type mytsIndexBackTesting=class(tsIndexBackTesting_base)
|
||||
MajorIndexID;
|
||||
Function GetIndexStock(endT); override;
|
||||
Begin
|
||||
@@ -342,7 +342,7 @@ TPPointInfo := array("截止日":NIL,"点位值":1100,"除数":303117200.0);
|
||||
TPGP := array(
|
||||
("股本":11617732201.0,"代码":"SZ000002","计算用股本":11617732201L,"权重因
|
||||
子":1,"开盘参考价":28.7),);
|
||||
obj := CreateObject("MytsIndexBackTesting");
|
||||
obj := CreateObject("mytsIndexBackTesting");
|
||||
obj.FBegT := begt;
|
||||
obj.FendT := endT;
|
||||
obj.FISDividend := 2; //价格指数
|
||||
@@ -379,7 +379,7 @@ return array(
|
||||
"收盘权重(最新)":obj.GetCloseWeightData(endt, endT),
|
||||
);
|
||||
|
||||
Type MytsIndexBackTesting=class(tsIndexBackTesting_base)
|
||||
Type mytsIndexBackTesting=class(tsIndexBackTesting_base)
|
||||
Function GetTimeSeries(); override;
|
||||
Begin
|
||||
CycleMacros := "M_1D+1BD";
|
||||
@@ -457,7 +457,7 @@ StockPoolInfo := array(
|
||||
);
|
||||
begt := 20230101T;
|
||||
Endt := 20251231T;
|
||||
obj := CreateObject("MytsIndexBackTesting");
|
||||
obj := CreateObject("mytsIndexBackTesting");
|
||||
obj.FBegT := begt;
|
||||
obj.FendT := Endt;
|
||||
|
||||
@@ -488,7 +488,7 @@ return array(
|
||||
"次日开盘权重(最新)":obj.GetNextOpenWeightData(),
|
||||
"收盘权重(最新)":obj.GetCloseWeightData(endt, endT),
|
||||
);
|
||||
Type MytsIndexBackTesting=class(tsIndexBackTesting_base)
|
||||
Type mytsIndexBackTesting=class(tsIndexBackTesting_base)
|
||||
FStockPoolInfo;
|
||||
|
||||
Function GetTimeSeries(); override;
|
||||
|
||||
Reference in New Issue
Block a user