📝 docs(tsl): complete and lint codegen reference
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 指数 / 指数成分
|
||||
|
||||
### `getBkWeightByDate(index_id, end_t, t, cal_type)`
|
||||
## `getBkWeightByDate(index_id, end_t, t, cal_type)`
|
||||
|
||||
获取指数历史指定日的成份股权重。 注意,数据有来自于指数提供商或者天软预估。比如沪深300,每个月月末,指数提供商将月末的成分股信息及全部发送给天软,在本月末至下月末的日期之间的权重,来自于天软预估,即根据最近一次指数提供商提供的权重数据及成分股的涨幅,计算其权重。
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
返回:bool
|
||||
|
||||
### `indexBkWeightbyDate1(indexid, endt)`
|
||||
## `indexBkWeightbyDate1(indexid, endt)`
|
||||
|
||||
指数指定日成份权重
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
返回:array
|
||||
|
||||
### `indexIndusNoNCode(endt, topn, industype)`
|
||||
## `indexIndusNoNCode(endt, topn, industype)`
|
||||
|
||||
第N名行业的名称
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
|
||||
返回:string
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(),'SH000300');
|
||||
return IndexIndusNoNCode(20200924T,2,1); //结果:金融业
|
||||
```
|
||||
|
||||
### `indexIndusNoNWeight(endt, topn, industype)`
|
||||
## `indexIndusNoNWeight(endt, topn, industype)`
|
||||
|
||||
指定日第N名行业的权重
|
||||
|
||||
@@ -55,14 +55,14 @@ return IndexIndusNoNCode(20200924T,2,1); //结果:金融业
|
||||
|
||||
返回:float
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(),'SH000300');
|
||||
return IndexIndusNoNWeight(20200924T,2,1); //结果:28.686091977063
|
||||
```
|
||||
|
||||
### `indexIndusSumNWeight(endt, topn, industype)`
|
||||
## `indexIndusSumNWeight(endt, topn, industype)`
|
||||
|
||||
获取指定指数前N行业的权重(行业集中度(%))
|
||||
|
||||
@@ -74,14 +74,14 @@ return IndexIndusNoNWeight(20200924T,2,1); //结果:28.686091977063
|
||||
|
||||
返回:float
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(),'SH000300');
|
||||
return IndexIndusSumNWeight(20200924T,2,1); //结果:28.4782510781865
|
||||
```
|
||||
|
||||
### `indexIndusWeightByDate(industryname, endt, industype)`
|
||||
## `indexIndusWeightByDate(industryname, endt, industype)`
|
||||
|
||||
获取指定日指定行业在指定指数中的权重(%) 。 可以获取证监会一级/二级,中证一级/二级,申万一级/二级 的行业权重。其中, 1)证监会和中证只按照当前最新的行业分类统计, 2)申万可根据历史的行业分类统计 。
|
||||
|
||||
@@ -93,14 +93,14 @@ return IndexIndusSumNWeight(20200924T,2,1); //结果:28.4782510781865
|
||||
|
||||
返回:float
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(),'SH000300');
|
||||
return IndexIndusWeightByDate("制造业",20200924T,1);
|
||||
```
|
||||
|
||||
### `indexIndusWeightEndT(indexid, endt, industype)`
|
||||
## `indexIndusWeightEndT(indexid, endt, industype)`
|
||||
|
||||
指定日指数的行业权重
|
||||
|
||||
@@ -112,7 +112,7 @@ return IndexIndusWeightByDate("制造业",20200924T,1);
|
||||
|
||||
返回:array
|
||||
|
||||
### `indexIndusWeightQj(industryname, indexid, begt, endt, industype)`
|
||||
## `indexIndusWeightQj(industryname, indexid, begt, endt, industype)`
|
||||
|
||||
获取区间指定行业在指定指数中的权重(%)
|
||||
|
||||
@@ -126,7 +126,7 @@ return IndexIndusWeightByDate("制造业",20200924T,1);
|
||||
|
||||
返回:array
|
||||
|
||||
### `indexStockNoNCode(endt, topn)`
|
||||
## `indexStockNoNCode(endt, topn)`
|
||||
|
||||
第N名股票的代码
|
||||
|
||||
@@ -137,14 +137,14 @@ return IndexIndusWeightByDate("制造业",20200924T,1);
|
||||
|
||||
返回:float
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(),'SH000300');
|
||||
return IndexStockNoNCode(20200924T,2); //结果:SH600519
|
||||
```
|
||||
|
||||
### `indexStockNoNWeight(endt, topn)`
|
||||
## `indexStockNoNWeight(endt, topn)`
|
||||
|
||||
指定日第N名股票权重
|
||||
|
||||
@@ -155,14 +155,14 @@ return IndexStockNoNCode(20200924T,2); //结果:SH600519
|
||||
|
||||
返回:float
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(),'SH000300');
|
||||
return IndexStockNoNWeight(20200924T,2); //结果:5.0403035260277
|
||||
```
|
||||
|
||||
### `indexStockSumNWeight(endt, topn)`
|
||||
## `indexStockSumNWeight(endt, topn)`
|
||||
|
||||
指定指数前N证券的权重(股票集中度(%))
|
||||
|
||||
@@ -173,14 +173,14 @@ return IndexStockNoNWeight(20200924T,2); //结果:5.0403035260277
|
||||
|
||||
返回:float
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(),'SH000300');
|
||||
return IndexStockSumNWeight(20200924T,2); //结果:10.2321520830025
|
||||
```
|
||||
|
||||
### `indexStockWeightByDate(stockid, endt)`
|
||||
## `indexStockWeightByDate(stockid, endt)`
|
||||
|
||||
获取指定日指定股票在指定指数中的权重(%)
|
||||
|
||||
@@ -191,14 +191,14 @@ return IndexStockSumNWeight(20200924T,2); //结果:10.2321520830025
|
||||
|
||||
返回:float
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(),'SH000300');
|
||||
return IndexStockWeightByDate("SZ000002",20200924T); //结果:1.17721168024293
|
||||
```
|
||||
|
||||
### `indexStockWeightQj(stockid, indexid, begt, endt)`
|
||||
## `indexStockWeightQj(stockid, indexid, begt, endt)`
|
||||
|
||||
获取区间指定股票在指定指数中的权重(%)
|
||||
|
||||
@@ -211,13 +211,13 @@ return IndexStockWeightByDate("SZ000002",20200924T); //结果:1.17721168024293
|
||||
|
||||
返回:array
|
||||
|
||||
### `indexWeightFirstday()`
|
||||
## `indexWeightFirstday()`
|
||||
|
||||
返回指定指数权重开始日,与系统参数(证券代码)相关。
|
||||
|
||||
返回:datetime
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
setsysparam(pn_stock(),'SH000300');
|
||||
|
||||
Reference in New Issue
Block a user