📝 docs(tsl): complete and lint codegen reference
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 基金 / 行业配置
|
||||
|
||||
### `fundIciValue(rdate, name)`
|
||||
## `fundIciValue(rdate, name)`
|
||||
|
||||
指定行业配置相关数据,与系统参数(基金)相关。
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
返回:array
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
SetSysParam(PN_Stock(),'OF000001');
|
||||
return FundICIValue(20221231,'制造业');
|
||||
```
|
||||
|
||||
### `fundIcNoN(rdate, top_n, field)`
|
||||
## `fundIcNoN(rdate, top_n, field)`
|
||||
|
||||
第N名行业配置相关数据,与系统参数(基金)相关。
|
||||
|
||||
@@ -30,14 +30,14 @@ return FundICIValue(20221231,'制造业');
|
||||
|
||||
返回:float
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
SetSysParam(PN_Stock(),'OF000001');
|
||||
return FundICNoN(20221231,3,'市值');
|
||||
```
|
||||
|
||||
### `fundIcSumN(rdate, top_n, field)`
|
||||
## `fundIcSumN(rdate, top_n, field)`
|
||||
|
||||
前N名行业配置相关数据,与系统参数(基金)相关。
|
||||
|
||||
@@ -49,105 +49,105 @@ return FundICNoN(20221231,3,'市值');
|
||||
|
||||
返回:float
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
SetSysParam(PN_Stock(),'OF000001');
|
||||
return FundICSumN(20221231,3,'市值');
|
||||
```
|
||||
|
||||
### `fundindustrynamelv1(extype)`
|
||||
## `fundindustrynamelv1(extype)`
|
||||
|
||||
基金一级行业
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| -------- | --------- | --------------------------------------------- |
|
||||
| `extype` | usrdefine | usrdefine,是否延伸判断,不延伸判断=0延伸判断=1 |
|
||||
|
||||
返回:string
|
||||
|
||||
### `fundsindustrynamelv(fundarr, extype, lv)`
|
||||
## `fundsindustrynamelv(fundarr, extype, lv)`
|
||||
|
||||
基金列表行业
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `fundarr` | array of string | array of string,基金列表 |
|
||||
| `extype` | usrdefine | usrdefine,延伸判断,不延伸判断=0延伸判断=1 |
|
||||
| `lv` | usrdefine | usrdefine,行业级别 |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --------- | --------------- | ----------------------------------------- |
|
||||
| `fundarr` | array of string | array of string,基金列表 |
|
||||
| `extype` | usrdefine | usrdefine,延伸判断,不延伸判断=0延伸判断=1 |
|
||||
| `lv` | usrdefine | usrdefine,行业级别 |
|
||||
|
||||
返回:array
|
||||
|
||||
### `fundindustrynamelv3(extype)`
|
||||
## `fundindustrynamelv3(extype)`
|
||||
|
||||
基金三级行业
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| -------- | --------- | --------------------------------------------- |
|
||||
| `extype` | usrdefine | usrdefine,是否延伸判断,不延伸判断=0延伸判断=1 |
|
||||
|
||||
返回:string
|
||||
|
||||
### `fundindustrynamelv2(extype)`
|
||||
## `fundindustrynamelv2(extype)`
|
||||
|
||||
基金二级行业
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| -------- | --------- | --------------------------------------------- |
|
||||
| `extype` | usrdefine | usrdefine,是否延伸判断,不延伸判断=0延伸判断=1 |
|
||||
|
||||
返回:string
|
||||
|
||||
### `fundindustrynamelv4(extype)`
|
||||
## `fundindustrynamelv4(extype)`
|
||||
|
||||
基金四级行业
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| -------- | --------- | --------------------------------------------- |
|
||||
| `extype` | usrdefine | usrdefine,是否延伸判断,不延伸判断=0延伸判断=1 |
|
||||
|
||||
返回:string
|
||||
|
||||
### `fundindustryname(industrytype, extype)`
|
||||
## `fundindustryname(industrytype, extype)`
|
||||
|
||||
基金行业
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `industrytype` | usrdefine | usrdefine,行业级别 |
|
||||
| `extype` | usrdefine | usrdefine,延伸判断,不延伸判断=0延伸判断=1 |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| -------------- | --------- | ----------------------------------------- |
|
||||
| `industrytype` | usrdefine | usrdefine,行业级别 |
|
||||
| `extype` | usrdefine | usrdefine,延伸判断,不延伸判断=0延伸判断=1 |
|
||||
|
||||
返回:string
|
||||
|
||||
### `fundindustrygetmatchstr(industrytype, extype)`
|
||||
## `fundindustrygetmatchstr(industrytype, extype)`
|
||||
|
||||
基金行业匹配串
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `industrytype` | usrdefine | usrdefine,行业级别 |
|
||||
| `extype` | usrdefine | usrdefine,延伸判断,不延伸判断=0延伸判断=1 |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| -------------- | --------- | ----------------------------------------- |
|
||||
| `industrytype` | usrdefine | usrdefine,行业级别 |
|
||||
| `extype` | usrdefine | usrdefine,延伸判断,不延伸判断=0延伸判断=1 |
|
||||
|
||||
返回:string
|
||||
|
||||
### `fundindustrymatchstring()`
|
||||
## `fundindustrymatchstring()`
|
||||
|
||||
基金行业匹配串
|
||||
|
||||
返回:string
|
||||
|
||||
### `fundIcCentralization(report_date, to_no)`
|
||||
## `fundIcCentralization(report_date, to_no)`
|
||||
|
||||
基金指定报告期的前N名行业集中度(%)
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `report_date` | Integer | 报告期 |
|
||||
| `to_no` | Integer | 用户自定义 |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------------- | ------- | ---------- |
|
||||
| `report_date` | Integer | 报告期 |
|
||||
| `to_no` | Integer | 用户自定义 |
|
||||
|
||||
返回:Real
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
//返回华安创新2010年一季报持有的前3大行业的集中度
|
||||
@@ -157,18 +157,18 @@ return fundIcCentralization(r_date,3);
|
||||
//结果:52.49
|
||||
```
|
||||
|
||||
### `fundIcMarketValue(report_date, industry_name)`
|
||||
## `fundIcMarketValue(report_date, industry_name)`
|
||||
|
||||
返回基金指定报告期的指定行业投资市值,与系统证券pn_stock()相关。
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `report_date` | integer | 报告期 |
|
||||
| `industry_name` | String | 行业名称 |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --------------- | ------- | -------- |
|
||||
| `report_date` | integer | 报告期 |
|
||||
| `industry_name` | String | 行业名称 |
|
||||
|
||||
返回:real
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
//返回华安创新2010年一季报持有的金融、保险业的股票的市值和
|
||||
@@ -178,19 +178,19 @@ return fundIcMarketValue(r_date,'金融、保险业');
|
||||
//结果:828593000
|
||||
```
|
||||
|
||||
### `fundIcMarketValue2GrowRatio(r_date, r_date2, to_no)`
|
||||
## `fundIcMarketValue2GrowRatio(r_date, r_date2, to_no)`
|
||||
|
||||
返回基金的前N名行业市值变比(%),与系统证券pn_stock()相关。
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `r_date` | Integer | 报告期 |
|
||||
| `r_date2` | Integer | 报告期 |
|
||||
| `to_no` | Integer | 用户自定义 |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --------- | ------- | ---------- |
|
||||
| `r_date` | Integer | 报告期 |
|
||||
| `r_date2` | Integer | 报告期 |
|
||||
| `to_no` | Integer | 用户自定义 |
|
||||
|
||||
返回:Real
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
//返回华安创新2011年中报和2010年中报持有的前十名行业的市值变动比
|
||||
@@ -201,18 +201,18 @@ return fundIcMarketValue2GrowRatio(r_date1,r_date2,10);
|
||||
//结果:29.29
|
||||
```
|
||||
|
||||
### `fundicindustrypercent2(rdate, name)`
|
||||
## `fundicindustrypercent2(rdate, name)`
|
||||
|
||||
指定行业市值占总值比(%),与系统参数证券(基金)相关。
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | ------- | --------------- |
|
||||
| `rdate` | Integer | 整型,指定报告期 |
|
||||
| `name` | String | 字符串,行业名称 |
|
||||
| `name` | String | 字符串,行业名称 |
|
||||
|
||||
返回:REAL
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
// "OF000001"在20191231指定行业"金融业"市值占总值比(%)
|
||||
@@ -220,18 +220,18 @@ setSysParam(pn_stock(),"OF000001");
|
||||
return fundicindustrypercent2(20191231,"金融业"); //结果:5.57438513631856
|
||||
```
|
||||
|
||||
### `fundicnonname(rdate, topn)`
|
||||
## `fundicnonname(rdate, topn)`
|
||||
|
||||
第N名行业名称,与系统参数证券(基金)相关。
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | ------- | --------------- |
|
||||
| `rdate` | Integer | 整型,指定报告期 |
|
||||
| `topn` | Integer | 整型,第N |
|
||||
| `topn` | Integer | 整型,第N |
|
||||
|
||||
返回:STRING
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
// "OF000001"在20191231第1名行业名称
|
||||
@@ -239,14 +239,13 @@ setSysParam(pn_stock(),"OF000001");
|
||||
return fundicnonname(20191231,1); //结果:制造业
|
||||
```
|
||||
|
||||
### `fundinfoindustryname1()`
|
||||
## `fundinfoindustryname1()`
|
||||
|
||||
返回银河基金分类的一级行业名称
|
||||
|
||||
|
||||
返回:String
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
//华夏成长在20210302的银河一级行业编码
|
||||
@@ -255,14 +254,13 @@ setSysParam(pn_date(),20210302T);
|
||||
return fundinfoindustryname1(); //返回:银河混合型
|
||||
```
|
||||
|
||||
### `fundinfoindustryname2()`
|
||||
## `fundinfoindustryname2()`
|
||||
|
||||
返回指定基金的银河二级行业名称
|
||||
|
||||
|
||||
返回:String
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
//华夏成长在20210302的银河二级行业名称
|
||||
@@ -271,14 +269,13 @@ setSysParam(pn_date(),20210302T);
|
||||
return fundinfoindustryname2(); //返回:银河偏股型
|
||||
```
|
||||
|
||||
### `fundyhindustryid1()`
|
||||
## `fundyhindustryid1()`
|
||||
|
||||
返回指定基金银河一级行业编码
|
||||
|
||||
|
||||
返回:String
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
//华夏成长在20210302的银河一级行业编码
|
||||
@@ -287,14 +284,13 @@ setSysParam(pn_date(),20210302T);
|
||||
return fundyhindustryid1(); //返回:YHFL020000
|
||||
```
|
||||
|
||||
### `fundyhindustryid2()`
|
||||
## `fundyhindustryid2()`
|
||||
|
||||
返回指定基金银河二级行业编码
|
||||
|
||||
|
||||
返回:String
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
//华夏成长在20210302的银河二级行业编码
|
||||
@@ -303,40 +299,40 @@ setSysParam(pn_date(),20210302T);
|
||||
return fundyhindustryid2(); //返回:YHFL020100
|
||||
```
|
||||
|
||||
### `fundYhIndustryArr(industry_type, level_n, end_t)`
|
||||
## `fundYhIndustryArr(industry_type, level_n, end_t)`
|
||||
|
||||
指定日指定级别基金分类列表,默认返回银河分类的一级分类列表
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `industry_type` | String | 字符串。基金分类 |
|
||||
| `level_n` | Integer | 整数。基金级数 |
|
||||
| `end_t` | TDateTime | 日期。截止日期 |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --------------- | --------- | ---------------- |
|
||||
| `industry_type` | String | 字符串。基金分类 |
|
||||
| `level_n` | Integer | 整数。基金级数 |
|
||||
| `end_t` | TDateTime | 日期。截止日期 |
|
||||
|
||||
返回:Array
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
// 在20210302的银河基金分类的1级分类成分
|
||||
return fundYhIndustryArr('YHFL',1,20210302T);
|
||||
```
|
||||
|
||||
### `fundIndustryInfoLvN(fundid, end_t, level, industry_type, vtype)`
|
||||
## `fundIndustryInfoLvN(fundid, end_t, level, industry_type, vtype)`
|
||||
|
||||
返回指定基金指定日期指定级别的类型名称,默认取银河基金分类的一级基金类型编码。
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `fundid` | String | 字符串。基金代码 |
|
||||
| `end_t` | TDateTime | 日期。截止日期 |
|
||||
| `level` | Integer | 整数。分类级别 |
|
||||
| `industry_type` | String | 字符串。基金分类名称 |
|
||||
| `vtype` | Integer | 整数。返回值类型,取值如下: |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --------------- | --------- | --------------------------- |
|
||||
| `fundid` | String | 字符串。基金代码 |
|
||||
| `end_t` | TDateTime | 日期。截止日期 |
|
||||
| `level` | Integer | 整数。分类级别 |
|
||||
| `industry_type` | String | 字符串。基金分类名称 |
|
||||
| `vtype` | Integer | 整数。返回值类型,取值如下: |
|
||||
|
||||
返回:String
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
// 华夏成长在20201207的一级类型名称
|
||||
@@ -344,20 +340,20 @@ return fundIndustryInfoLvN('OF000001',20210301T,1,'YHFL',1);
|
||||
//返回:银河混合型
|
||||
```
|
||||
|
||||
### `fundGetIndustrydata(fundid, endt, level, industry_type)`
|
||||
## `fundGetIndustrydata(fundid, endt, level, industry_type)`
|
||||
|
||||
基金指定日期有效的基金分类数据。
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `fundid` | String | 字符串。基金代码 |
|
||||
| `endt` | TDateTime | 日期。截止日期 |
|
||||
| `level` | Integer | 整数。类别级数(1,2) |
|
||||
| `industry_type` | String | 字符串。基金属性名称 |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --------------- | --------- | --------------------- |
|
||||
| `fundid` | String | 字符串。基金代码 |
|
||||
| `endt` | TDateTime | 日期。截止日期 |
|
||||
| `level` | Integer | 整数。类别级数(1,2) |
|
||||
| `industry_type` | String | 字符串。基金属性名称 |
|
||||
|
||||
返回:Array
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
// 华夏成长在20201207的有效的基金分类数据
|
||||
@@ -365,43 +361,43 @@ return fundGetIndustrydata('OF000001',20210301T,1,'YHFL');
|
||||
结果:
|
||||
```
|
||||
|
||||
### `ieFundBondIndustryByType()`
|
||||
## `IE_FundBondIndustryByType()`
|
||||
|
||||
基金.债券投资组合(按债券品种分类)
|
||||
|
||||
返回:array
|
||||
|
||||
### `ieFundBondIndustryByMaturity()`
|
||||
## `IE_FundBondIndustryByMaturity()`
|
||||
|
||||
基金.债券投资组合(按偿还期限分类)
|
||||
|
||||
返回:array
|
||||
|
||||
### `fundScIndustryNameField()`
|
||||
## `Fund_SCIndustryNameField()`
|
||||
|
||||
基金持股-行业名称。根据数据库提供商返回对应的值
|
||||
|
||||
返回:string
|
||||
|
||||
### `fundScb2IndustryNameField()`
|
||||
## `Fund_SCB2IndustryNameField()`
|
||||
|
||||
累计买入超净值2%-行业名称。根据数据库提供商返回对应的值
|
||||
|
||||
返回:string
|
||||
|
||||
### `fundScs2IndustryNameField()`
|
||||
## `Fund_SCS2IndustryNameField()`
|
||||
|
||||
累计卖出超净值2%-行业名称。根据数据库提供商返回对应的值
|
||||
|
||||
返回:string
|
||||
|
||||
### `fundBsIndustryNameField()`
|
||||
## `Fund_BSIndustryNameField()`
|
||||
|
||||
债券配置-债券类型。根据数据库提供商返回对应的值
|
||||
|
||||
返回:string
|
||||
|
||||
### `portfolioBackTestingQuantityIndustryComposite(end_t, t_gp)`
|
||||
## `PortfolioBackTesting_Quantity_IndustryComposite(end_t, t_gp)`
|
||||
|
||||
策略验证-数量类组合-t日行业配置,由tGP数据表中按行业统计个各行业的市值和排名
|
||||
|
||||
@@ -412,7 +408,7 @@ return fundGetIndustrydata('OF000001',20210301T,1,'YHFL');
|
||||
|
||||
返回:array
|
||||
|
||||
### `fundHdIndustryRotationSkill(fund_id, beg_t, end_t, style_type, date_type, hold_type, typ)`
|
||||
## `Fund_HD_IndustryRotationSkill(fund_id, beg_t, end_t, style_type, date_type, hold_type, typ)`
|
||||
|
||||
基金行业轮动能力因子计算模型
|
||||
|
||||
@@ -428,7 +424,7 @@ return fundGetIndustrydata('OF000001',20210301T,1,'YHFL');
|
||||
|
||||
返回:array
|
||||
|
||||
### `fundIndustryCentralization(show_number, report_date_show_order)`
|
||||
## `Fund_IndustryCentralization(show_number, report_date_show_order)`
|
||||
|
||||
返回指定基金最近N个报告期的行业集中度数据,与系统参数(证券代码)相关。
|
||||
|
||||
@@ -439,7 +435,7 @@ return fundGetIndustrydata('OF000001',20210301T,1,'YHFL');
|
||||
|
||||
返回:array
|
||||
|
||||
### `fundSwIndustryComposite(show_number, unit_type, report_date_show_order)`
|
||||
## `Fund_SWIndustryComposite(show_number, unit_type, report_date_show_order)`
|
||||
|
||||
申万行业配置
|
||||
|
||||
@@ -451,7 +447,7 @@ return fundGetIndustrydata('OF000001',20210301T,1,'YHFL');
|
||||
|
||||
返回:bool
|
||||
|
||||
### `fundsIndustryCentralization(bk_name, r_date, sort_by, sort_order, return_number)`
|
||||
## `Funds_IndustryCentralization(bk_name, r_date, sort_by, sort_order, return_number)`
|
||||
|
||||
返回指定板块指定报告期基金行业集中度数据。
|
||||
|
||||
@@ -465,7 +461,7 @@ return fundGetIndustrydata('OF000001',20210301T,1,'YHFL');
|
||||
|
||||
返回:array
|
||||
|
||||
### `fundIndustryCompositeChangeCall(fund_arr, r_date, r_date2, sort_by, sort_order, return_number)`
|
||||
## `FundIndustryCompositeChange_Call(fund_arr, r_date, r_date2, sort_by, sort_order, return_number)`
|
||||
|
||||
基金行业配置及变化。
|
||||
|
||||
@@ -480,7 +476,7 @@ return fundGetIndustrydata('OF000001',20210301T,1,'YHFL');
|
||||
|
||||
返回:array
|
||||
|
||||
### `fundsSwIndustryComposite(bk_name, end_t, show_number, sort_type, unit_type)`
|
||||
## `Funds_SWIndustryComposite(bk_name, end_t, show_number, sort_type, unit_type)`
|
||||
|
||||
申万行业配置
|
||||
|
||||
@@ -494,7 +490,7 @@ return fundGetIndustrydata('OF000001',20210301T,1,'YHFL');
|
||||
|
||||
返回:bool
|
||||
|
||||
### `fundBlockIndustryComposite(r_date, r_date2)`
|
||||
## `FundBlock_IndustryComposite(r_date, r_date2)`
|
||||
|
||||
返回报告期基金管理公司在指定行业的行业配置数据。
|
||||
|
||||
@@ -505,7 +501,7 @@ return fundGetIndustrydata('OF000001',20210301T,1,'YHFL');
|
||||
|
||||
返回:array
|
||||
|
||||
### `fundBlockIndustryCentralization(bk_names, end_t, show_number, show_order, unit_type)`
|
||||
## `FundBlock_IndustryCentralization(bk_names, end_t, show_number, show_order, unit_type)`
|
||||
|
||||
行业集中度
|
||||
|
||||
|
||||
Reference in New Issue
Block a user