📝 docs(tsl): complete and lint codegen reference

This commit is contained in:
csh
2026-07-07 16:46:51 +08:00
parent 16e0992dd2
commit bbf6977f57
232 changed files with 39191 additions and 29763 deletions
+141 -141
View File
@@ -1,6 +1,6 @@
# 基金 / 基本信息
### `fundGetAttributeValues(fundid, endt, attributetype)`
## `fundGetAttributeValues(fundid, endt, attributetype)`
基金指定日期有效的的基金属性值数据。
@@ -12,26 +12,26 @@
返回:array
### `fundMasterCode()`
## `fundMasterCode()`
基金主代码,与系统参数(证券代码代码)相关。有主代码则取主代码,否则返回基金代码。
返回:string
#### 示例
### 示例
```tsl
SetSysParam(pn_stock(),"OF012414");
return FundMasterCode();
```
### `fundNetValueMethod()`
## `fundNetValueMethod()`
返回指定指定基金净值增长率计算方法,与系统参数(代码、时间)相关。
返回:string
#### 示例
### 示例
```tsl
SetSysParam(pn_stock(),"OF000001");
@@ -39,7 +39,7 @@ SetSysParam(pn_date(),20210302T);
return FundNetValueMethod();
```
### `fundsOperateFunds(funds, end_t)`
## `fundsOperateFunds(funds, end_t)`
指定日指定列表中还在运作的基金
@@ -50,17 +50,17 @@ return FundNetValueMethod();
返回:array
### `isClassifyOfAFund(fund_id)`
## `isClassifyOfAFund(fund_id)`
判断是否是分级A基金。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | ------------------ |
| `fund_id` | String | 证券类型,基金代码 |
返回:Integer
#### 示例
### 示例
```tsl
//判断SH502049判断是否是分级A基金
@@ -68,17 +68,17 @@ return isClassifyOfAFund("SH502049");
//结果:1
```
### `isClassifyOfBFund(fund_id)`
## `isClassifyOfBFund(fund_id)`
判断是否是分级B基金。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | ------------------ |
| `fund_id` | String | 证券类型,基金代码 |
返回:Integer
#### 示例
### 示例
```tsl
//判断SH502049判断是否是分级B基金
@@ -86,17 +86,17 @@ return isClassifyOfBFund("SH502049");
//结果:0
```
### `isClassifyFund(fund_id)`
## `isClassifyFund(fund_id)`
判断是否是分级母基金。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | ------------------ |
| `fund_id` | String | 证券类型,基金代码 |
返回:Integer
#### 示例
### 示例
```tsl
//判断SH500003 基金安信是否是分级母基金。
@@ -104,13 +104,13 @@ return fundCommision("SH500003");
//结果:0
```
### `fundGoMarketDate()`
## `fundGoMarketDate()`
上市日,与系统证券pn_stock()相关。
返回:Int
#### 示例
### 示例
```tsl
//取华安创新的上市日
@@ -119,13 +119,13 @@ ReturnFundGoMarketDate();
//结果:20010921
```
### `fundIssueDate()`
## `fundIssueDate()`
发行日,与系统股票pn_stock()相关。
返回:Int
#### 示例
### 示例
```tsl
//取信诚增强的发行日
@@ -134,17 +134,17 @@ ReturnFundIssueDate();
//结果:20100913
```
### `isDefinedFundImStyle(fund_type)`
## `isDefinedFundImStyle(fund_type)`
是否为指定的投资风格,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ----------- | ------- | -------- |
| `fund_type` | Integer | 基金类型 |
返回:boolean
#### 示例
### 示例
```tsl
//返回华安创新的投资风格是否为混合型
@@ -153,17 +153,17 @@ return isDefinedFundImStyle(0);
//结果:1
```
### `isExtFund(fund_id)`
## `isExtFund(fund_id)`
判断是否为基金,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | -------- |
| `fund_id` | String | 基金代码 |
返回:boolean
#### 示例
### 示例
```tsl
//判断华安创新是否为基金
@@ -171,17 +171,17 @@ return isExtFund('OF040001');
//结果:1
```
### `isFund(fund_id)`
## `isFund(fund_id)`
判断是否为基金
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | -------- |
| `fund_id` | String | 基金代码 |
返回:boolean
#### 示例
### 示例
```tsl
//判断万科A是否为基金
@@ -189,17 +189,17 @@ return isFund('SZ000002');
//结果:0
```
### `isFundGoMarket(end_t)`
## `isFundGoMarket(end_t)`
指定日是否已上市,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `end_t` | Date | 截止日期 |
返回:boolean
#### 示例
### 示例
```tsl
//返回华安创新在2001年05月01日是否已上市
@@ -208,17 +208,17 @@ ReturnIsFundGoMarket(intToDate(20010501));
//结果:0
```
### `isOpenFund(fund_id)`
## `isOpenFund(fund_id)`
判断是否为开放式基金
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | -------- |
| `fund_id` | String | 基金代码 |
返回:boolean
#### 示例
### 示例
```tsl
//判断华安创新是否为开放式基金
@@ -226,13 +226,13 @@ ReturnIsOpenFund('OF040001');
//结果:1
```
### `isCurrencyFund()`
## `isCurrencyFund()`
判断是否为货币型基金,与系统证券pn_stock()相关。
返回:boolean
#### 示例
### 示例
```tsl
//判断华安创新是否为货币型基金
@@ -241,18 +241,18 @@ ReturnIsCurrencyFund();
//结果:0
```
### `nSharesOfFund(info_id, end_t)`
## `nSharesOfFund(info_id, end_t)`
基金流通股本,InfoId必须为324,324是基金份额变动表的索引号。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------- | ------------ |
| `info_id` | Integer | 数据表索引号 |
| `end_t` | Date | 截止日期 |
| `end_t` | Date | 截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//取基金金泰 2010年5月3日的流通股本
@@ -261,18 +261,18 @@ return nSharesOfFund(324,intToDate(20100503));
//结果:1970000000
```
### `tSharesOfFund(info_id, end_t)`
## `tSharesOfFund(info_id, end_t)`
基金总股本,InfoId必须为324,324是基金份额变动表的索引号。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------- | ------------ |
| `info_id` | Integer | 数据表索引号 |
| `end_t` | Date | 截止日期 |
| `end_t` | Date | 截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//取基金金泰2010年5月3日的基金总股本
@@ -281,121 +281,121 @@ return tSharesOfFund (324,intToDate(20100503));
//结果:2000000000
```
### `isregulapurchasescrollhold()`
## `isregulapurchasescrollhold()`
是否定期申购滚动持有,与系统参数(基金代码、日期)相关
返回:boolean
### `fundhsl2(rdate)`
## `fundhsl2(rdate)`
基金换手率(非分级子基金),换手率=本期股票成交金额/((期初股票市值+期末股票市值)/2)*100
基金换手率(非分级子基金),换手率=本期股票成交金额/((期初股票市值+期末股票市值)/2)\*100
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | --------------- | --------------- |
| `rdate` | reportingperiod | reportingperiod |
返回:real
### `fundoperationperiod()`
## `fundoperationperiod()`
运作期限(年),与系统参数(基金代码、日期)相关
返回:Integer
### `isminiholdperiod()`
## `isminiholdperiod()`
是否有最短持有期,与系统参数(基金代码、日期)相关
返回:boolean
### `isunrestrictedopening()`
## `isunrestrictedopening()`
是否无受限开放,与系统参数(基金代码、日期)相关
返回:boolean
### `isscrollhold()`
## `isscrollhold()`
是否滚动持有,与系统参数(基金代码、日期)相关
返回:boolean
### `fundpurchaseredemptiontype()`
## `fundpurchaseredemptiontype()`
指定基金申购赎回类型
返回:string
### `isregularredeem()`
## `isregularredeem()`
是否定期赎回,与系统参数(基金代码、日期)相关
返回:boolean
### `isregularopenfund()`
## `isregularopenfund()`
是否定期开放基金,与系统参数(基金代码、日期)相关
返回:boolean
### `isclosedoperation()`
## `isclosedoperation()`
是否封闭运作,与系统参数(基金代码、日期)相关
返回:boolean
### `fundsthemename(fundarr)`
## `fundsthemename(fundarr)`
基金列表主题
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | --------------- | ------------------------ |
| `fundarr` | array of string | array of string,基金列表 |
返回:array
### `fundthemename()`
## `fundthemename()`
基金主题
返回:string
### `fundallthemename()`
## `fundallthemename()`
所有基金主题
返回:array
### `fundinvestmentstyles()`
## `fundinvestmentstyles()`
基金投资风格种类
返回:array
### `fundallcompanylist()`
## `fundallcompanylist()`
基金公司List,与系统参数无关。
返回:array
### `isotherrestrictedopening()`
## `isotherrestrictedopening()`
是否其他受限开放,与系统参数(基金代码、日期)相关
返回:boolean
### `isCurrencyFundByEndt(endt)`
## `isCurrencyFundByEndt(endt)`
根据净值增长率计算方式判断是否为货币型基金    若以【每万份基金单位收益法】计算则认为是货币型
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | ---- | ------------ |
| `endt` | Date | 日期, 截止日 |
返回:Boolean
#### 示例
### 示例
```tsl
sp_s(pn_stock(),'OF110050');
@@ -403,51 +403,51 @@ end_t := 20200911T;
return isCurrencyFundByEndt(end_t); //结果:1
```
### `fundsFromManagerId(id)`
## `fundsFromManagerId(id)`
基金经理代码查基金。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ---- | ------ | -------------------- |
| `id` | String | 字符串。基金经理代码 |
返回:Array
#### 示例
### 示例
```tsl
return fundsFromManagerId('7289');
结果:
```
### `fundsFromManagerName(name)`
## `fundsFromManagerName(name)`
基金经理名字查基金。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | ------ | -------------------- |
| `name` | String | 字符串。基金经理名字 |
返回:Array
#### 示例
### 示例
```tsl
return fundsFromManagerName('张惠');
结果:
```
### `fundOfDifferentFeesId(fund_id)`
## `fundOfDifferentFeesId(fund_id)`
基金因其收费模式不一致存在多个代码,本模型通过基金代码返回不同收费模式所有基金代码
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | ------------- |
| `fund_id` | String | 证券,基金代码 |
返回:array
#### 示例
### 示例
```tsl
//返回OF000009不同收费模式所有基金的代码
@@ -455,70 +455,70 @@ return fundOfDifferentFeesId("OF000009");
//结果:array("OF000009","OF000010","OF000013","OF005122","OF018810")
```
### `isnotcontainswords(regexpr, parsetext)`
## `isnotcontainswords(regexpr, parsetext)`
不包含字串
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `regexpr` | string | string,匹配串 |
| `parsetext` | string | string,源串 |
| 参数 | 类型 | 说明 |
| ----------- | ------ | ------------- |
| `regexpr` | string | string,匹配串 |
| `parsetext` | string | string,源串 |
返回:boolean
### `iscontainswords(regexpr, parsetext)`
## `iscontainswords(regexpr, parsetext)`
包含字串
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `regexpr` | string | string,匹配串 |
| `parsetext` | string | string,源串 |
| 参数 | 类型 | 说明 |
| ----------- | ------ | ------------- |
| `regexpr` | string | string,匹配串 |
| `parsetext` | string | string,源串 |
返回:boolean
### `isthepurchaseredemptiontype(fundname, containstr, notcontainstr)`
## `isthepurchaseredemptiontype(fundname, containstr, notcontainstr)`
是否指定申购赎回类型,通过基金全称判断。与系统参数(基金代码、日期)相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `fundname` | string | string,基金名称 |
| `containstr` | string | string,包含字符串 |
| 参数 | 类型 | 说明 |
| --------------- | ------ | --------------------- |
| `fundname` | string | string,基金名称 |
| `containstr` | string | string,包含字符串 |
| `notcontainstr` | string | string,不包含的字符串 |
返回:boolean
### `fundthemegetmatchstr()`
## `fundthemegetmatchstr()`
基金主题匹配串
返回:array
### `fundthemematchstring()`
## `fundthemematchstring()`
基金主题匹配串
返回:array
### `fundgetthemename(fundname, matchstring)`
## `fundgetthemename(fundname, matchstring)`
基金主题
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `fundname` | string | string,基金名称 |
| `matchstring` | table | table,匹配串 |
| 参数 | 类型 | 说明 |
| ------------- | ------ | --------------- |
| `fundname` | string | string,基金名称 |
| `matchstring` | table | table,匹配串 |
返回:string
### `fundName()`
## `fundName()`
返回指定基金指定日名称,与系统参数(代码、时间)相关。
返回:String
#### 示例
### 示例
```tsl
//OF162206在20210302的基金名称
@@ -528,50 +528,50 @@ return fundName();
//返回:泰达宏利货币市场基金
```
### `fundOperationFunds(end_t)`
## `fundOperationFunds(end_t)`
指定日所有运作中的基金列表
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | --------- | -------------- |
| `end_t` | TDateTime | 日期。截止日期 |
返回:Array
#### 示例
### 示例
```tsl
// 20200924日所有运作中的基金列表
return fundOperationFunds(20200924T);
```
### `fundOperationFundsByTzfg(bk_name, end_t, industry_type, level)`
## `fundOperationFundsByTzfg(bk_name, end_t, industry_type, level)`
指定日指定投资风格板块运作中的基金
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `bk_name` | String | 字符串。板块名称 |
| `end_t` | TDateTime | 日期。截止日期 |
| `industry_type` | Integer | 用户自定义。分类类型,取值如下: |
| `level` | Integer | 整数。分类级别 |
| 参数 | 类型 | 说明 |
| --------------- | --------- | ------------------------------- |
| `bk_name` | String | 字符串。板块名称 |
| `end_t` | TDateTime | 日期。截止日期 |
| `industry_type` | Integer | 用户自定义。分类类型,取值如下: |
| `level` | Integer | 整数。分类级别 |
返回:Array
#### 示例
### 示例
```tsl
// 20200924日“普通股票型”运作中的基金
return fundOperationFundsByTzfg("普通股票型",20200924T,0,2);
```
### `fundPrimaryMarketCode()`
## `fundPrimaryMarketCode()`
基金一级市场代码,与系统参数(证券代码代码)相关。有一级市场代则取一级市场代,否则返回基金代码。
返回:String
#### 示例
### 示例
```tsl
//通过基金交易代码(二级市场)得到该基金的一级市场代码
@@ -580,13 +580,13 @@ return fundPrimaryMarketCode();
//返回:OF510050
```
### `fundSecondaryMarketCode()`
## `fundSecondaryMarketCode()`
基金二级市场代码,与系统参数(证券代码代码)相关。有二级市场代码则取二级市场代码,否则返回基金代码。
返回:String
#### 示例
### 示例
```tsl
//OF510050的基金二级市场代码
@@ -595,13 +595,13 @@ return fundSecondaryMarketCode();
//返回:SH510050
```
### `fundStyleName1()`
## `fundStyleName1()`
返回指定指定基金一级风格名称,与系统参数(代码、时间)相关。
返回:String
#### 示例
### 示例
```tsl
//华夏成长在20210302的基金一级风格名称
@@ -611,13 +611,13 @@ return fundStyleName1();
//返回:混合型
```
### `fundStyleName2()`
## `fundStyleName2()`
返回指定指定基金二级风格名称,与系统参数(代码、时间)相关。
返回:String
#### 示例
### 示例
```tsl
//华夏成长在20210302的基金二级风格名称
@@ -627,18 +627,18 @@ return fundStyleName2();
//返回:偏股混合
```
### `fundOperateFundsbyBkname(bk_name, end_t)`
## `fundOperateFundsbyBkname(bk_name, end_t)`
指定日指定板块中还在运作的基金
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `bk_name` | String | 字符串。板块名称 |
| `end_t` | TDateTime | 日期。截止日期 |
| 参数 | 类型 | 说明 |
| --------- | --------- | ---------------- |
| `bk_name` | String | 字符串。板块名称 |
| `end_t` | TDateTime | 日期。截止日期 |
返回:Array
#### 示例
### 示例
```tsl
// 20200924日指定日指定板块中还在运作的基金列表
+53 -53
View File
@@ -1,6 +1,6 @@
# 基金 / ETF申购赎回-基本信息
### `fundEtfInfoCashForecasted(endt, endt_2)`
## `fundEtfInfoCashForecasted(endt, endt_2)`
指定日最小申购、赎回单位的预估现金部分,与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回最小申购、赎回单位的预估现金部分;如果指定日没有ETF申购赎回-基本信息,则返回0。
@@ -11,14 +11,14 @@
返回:float
#### 示例
### 示例
```tsl
SetSysParam(PN_Stock(),'OF159001');
return FundETFInfoCashForecasted(20230509T);
```
### `fundEtfInfoGetDataByEndT(endt)`
## `fundEtfInfoGetDataByEndT(endt)`
指定日ETF申购赎回-基本信息,与系统参数(证券代码)相关。
@@ -28,14 +28,14 @@ return FundETFInfoCashForecasted(20230509T);
返回:array
#### 示例
### 示例
```tsl
SetSysParam(PN_Stock(),'OF159001');
return FundETFInfoGetDataByEndT(20230509T);
```
### `fundEtfInfoLeastUnitCashDivid(endt, endt_2)`
## `fundEtfInfoLeastUnitCashDivid(endt, endt_2)`
指定日最小申购、赎回单位现金红利,与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回最小申购、赎回单位现金红利;如果指定日没有ETF申购赎回-基本信息,则返回0。
@@ -46,14 +46,14 @@ return FundETFInfoGetDataByEndT(20230509T);
返回:float
#### 示例
### 示例
```tsl
SetSysParam(PN_Stock(),'OF159001');
return FundETFInfoLeastUnitCashDivid(20230509T);
```
### `fundEtfInfoMarginRate(endt, endt_2)`
## `fundEtfInfoMarginRate(endt, endt_2)`
指定日保证金申购保证金率(%),与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回保证金申购保证金率(%);如果指定日没有ETF申购赎回-基本信息,则返回0。
@@ -64,26 +64,26 @@ return FundETFInfoLeastUnitCashDivid(20230509T);
返回:float
#### 示例
### 示例
```tsl
SetSysParam(PN_Stock(),'OF159001');
return FundETFInfoMarginRate(20230509T);
```
### `getfundetfconstituent(fundid, enddate, t)`
## `getfundetfconstituent(fundid, enddate, t)`
获取ETF历史指定日申购赎回-成分股表数据
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `fundid` | string | string,股票代码 |
| `enddate` | tdatetime | tdatetime,截止日 |
| `t` | array | array,出参,获取到的ETF申购赎回-成分股数据结果 |
| 参数 | 类型 | 说明 |
| --------- | --------- | ---------------------------------------------- |
| `fundid` | string | string,股票代码 |
| `enddate` | tdatetime | tdatetime,截止日 |
| `t` | array | array,出参,获取到的ETF申购赎回-成分股数据结果 |
返回:boolean
#### 示例
### 示例
```tsl
//获取基金OF510050在2020-1-10日的成份股表
@@ -93,17 +93,17 @@ else return array();//获取失败
//返回结果:
```
### `fundEtfInfoLeastUnit(endt)`
## `fundEtfInfoLeastUnit(endt)`
指定日最小申购、赎回单位,与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回最小申购、赎回单位;如果指定日没有ETF申购赎回-基本信息,则返回0。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | --------- | -------------- |
| `endt` | TDateTime | 日期。截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//OF159001在2023-05-09最小申购、赎回单位。
@@ -112,18 +112,18 @@ return fundEtfInfoLeastUnit(20230509T);
//结果:1
```
### `fundEtfInfoNetVlue(endt, endt_2)`
## `fundEtfInfoNetVlue(endt, endt_2)`
指定日最小申购、赎回单位净值,与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回最小申购、赎回单位净值;如果指定日没有ETF申购赎回-基本信息,则返回0。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | --------- | -------------- |
| `endt` | TDateTime | 日期。截止日期 |
| `endt` | TDateTime | 日期。截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//OF159001在2023-05-09最小申购、赎回单位净值。
@@ -132,18 +132,18 @@ return fundEtfInfoNetVlue(20230509T);
//结果:100
```
### `fundEtfInfoUpperRatio(endt, endt_2)`
## `fundEtfInfoUpperRatio(endt, endt_2)`
指定日现金替代比例上限(%),与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回现金替代比例上限(%);如果指定日没有ETF申购赎回-基本信息,则返回0。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | --------- | -------------- |
| `endt` | TDateTime | 日期。截止日期 |
| `endt` | TDateTime | 日期。截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//OF159001在2023-05-09现金替代比例上限(%)。
@@ -152,18 +152,18 @@ return fundEtfInfoUpperRatio(20230509T);
//结果:100
```
### `fundEtfInfoIsOpenPurcharse(endt, endt_2)`
## `fundEtfInfoIsOpenPurcharse(endt, endt_2)`
指定日是否开放申购,与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回是否开放申购;如果指定日没有ETF申购赎回-基本信息,则返回0。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | --------- | -------------- |
| `endt` | TDateTime | 日期。截止日期 |
| `endt` | TDateTime | 日期。截止日期 |
返回:String
#### 示例
### 示例
```tsl
//OF159001在2023-05-09是否开放申购。
@@ -172,18 +172,18 @@ return fundEtfInfoIsOpenPurcharse(20230509T);
//结果:是
```
### `fundEtfInfoIsOpenMarginPurchase(endt, endt_2)`
## `fundEtfInfoIsOpenMarginPurchase(endt, endt_2)`
指定日是否开放保证金申购,与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回是否开放保证金申购;如果指定日没有ETF申购赎回-基本信息,则返回0。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | --------- | -------------- |
| `endt` | TDateTime | 日期。截止日期 |
| `endt` | TDateTime | 日期。截止日期 |
返回:String
#### 示例
### 示例
```tsl
//OF159001在2023-05-09是否开放保证金申购。
@@ -192,18 +192,18 @@ return fundEtfInfoIsOpenMarginPurchase(20230509T);
//结果:未知
```
### `fundEtfInfoIsOpenRedem(endt, endt_2)`
## `fundEtfInfoIsOpenRedem(endt, endt_2)`
指定日是否开放赎回,与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回是否开放赎回;如果指定日没有ETF申购赎回-基本信息,则返回0。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | --------- | -------------- |
| `endt` | TDateTime | 日期。截止日期 |
| `endt` | TDateTime | 日期。截止日期 |
返回:String
#### 示例
### 示例
```tsl
//OF159001在2023-05-09是否开放赎回。
@@ -212,18 +212,18 @@ return fundEtfInfoIsOpenRedem(20230509T);
//结果:是
```
### `fundEtfInfoInvestorSubscribeLimit(endt, endt_2)`
## `fundEtfInfoInvestorSubscribeLimit(endt, endt_2)`
指定日保证金申购单一投资者当日申购总量限制份数,与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回保证金申购单一投资者当日申购总量限制份数;如果指定日没有ETF申购赎回-基本信息,则返回0。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | --------- | -------------- |
| `endt` | TDateTime | 日期。截止日期 |
| `endt` | TDateTime | 日期。截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//OF159001在2023-05-09保证金申购单一投资者当日申购总量限制份数。
@@ -232,18 +232,18 @@ return fundEtfInfoInvestorSubscribeLimit(20230509T);
//结果:0
```
### `fundEtfInfoLeastUnitCash(endt, endt_2)`
## `fundEtfInfoLeastUnitCash(endt, endt_2)`
指定日最小申购、赎回单位的现金余额,与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回最小申购、赎回单位的现金余额;如果指定日没有ETF申购赎回-基本信息,则返回0。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | --------- | -------------- |
| `endt` | TDateTime | 日期。截止日期 |
| `endt` | TDateTime | 日期。截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//OF159001在2023-05-09最小申购、赎回单位的现金余额。
@@ -252,18 +252,18 @@ return fundEtfInfoLeastUnitCash(20230509T);
//结果:0
```
### `fundEtfInfoSecuritySubscribeLimit(endt, endt_2)`
## `fundEtfInfoSecuritySubscribeLimit(endt, endt_2)`
指定日保证金申购单个代办证券公司当日申购总量限制,与系统参数(证券代码)相关。如果指定日有ETF申购赎回-基本信息,则返回保证金申购单个代办证券公司当日申购总量限制;如果指定日没有ETF申购赎回-基本信息,则返回0。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | --------- | -------------- |
| `endt` | TDateTime | 日期。截止日期 |
| `endt` | TDateTime | 日期。截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//OF159001在2023-05-09保证金申购单个代办证券公司当日申购总量限制。
@@ -272,13 +272,13 @@ return fundEtfInfoSecuritySubscribeLimit(20230509T);
//结果:0
```
### `fundEtfPurchaseRedemptionInfoId()`
## `fund_ETFPurchaseRedemptionInfoID()`
ETF申购赎回-基本信息
返回:bool
### `fundEtfPurchaseRedemptionStocks()`
## `fund_ETFPurchaseRedemptionStocks()`
ETF申购赎回-成分股
+70 -70
View File
@@ -1,6 +1,6 @@
# 基金 / 基金评估
### `fundCalmarRatio(beg_t, end_t, data_select, cycle)`
## `fundCalmarRatio(beg_t, end_t, data_select, cycle)`
基金Calmar。与系统股票pn_stock()、当前时间pn_date()相关。
@@ -13,14 +13,14 @@
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundCalmarRatio(20160101T,20180903T,0,cy_day());
```
### `fundOmega(index_id, beg_t, end_t, data_select, cycle)`
## `fundOmega(index_id, beg_t, end_t, data_select, cycle)`
基金Omega比率。与系统股票pn_stock()、当前时间pn_date()相关。
@@ -34,7 +34,7 @@ Return FundCalmarRatio(20160101T,20180903T,0,cy_day());
返回:float
### `fundRachev(beg_t, end_t, rf, data_select, cycle)`
## `fundRachev(beg_t, end_t, rf, data_select, cycle)`
基金Rachev比率。与系统股票pn_stock()、当前时间pn_date()相关。
@@ -48,29 +48,29 @@ Return FundCalmarRatio(20160101T,20180903T,0,cy_day());
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundRachev(20160101T,20180903T,3,0,cy_day());
```
### `fundSortinoRatio(beg_t, end_t, rf, data_select, annual, cycle)`
## `fundSortinoRatio(beg_t, end_t, rf, data_select, annual, cycle)`
基金索丁诺比率。与系统股票pn_stock()、当前时间pn_date()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `beg_t` | DateTime | 日期类型,开始日期; |
| `end_t` | DateTime | 日期类型,截止日期; |
| `rf` | Real | 实数类型,无风险年收益率(%); |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化; |
| `cycle` | String | 周期类型,周期 |
| 参数 | 类型 | 说明 |
| ------------- | -------- | ------------------------------ |
| `beg_t` | DateTime | 日期类型,开始日期; |
| `end_t` | DateTime | 日期类型,截止日期; |
| `rf` | Real | 实数类型,无风险年收益率(%) |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化; |
| `cycle` | String | 周期类型,周期 |
返回:Real
#### 示例
### 示例
```tsl
//OF1627142016年1月1日到2018年9月3日,无风险年收益率为3,年化的日线净值数据的索丁诺比率。
@@ -79,20 +79,20 @@ return fundSortinoRatio(20160101T,20180903T,3,0,1,cy_day());
//结果:-0.31887
```
### `fundAppraisalRatio(index_id, beg_t, end_t, data_select)`
## `fundAppraisalRatio(index_id, beg_t, end_t, data_select)`
估价比率(估价比率=α系数/残差),也即为信息比率,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `index_id` | String | 指数代码 |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| 参数 | 类型 | 说明 |
| ------------- | ------- | ------------ |
| `index_id` | String | 指数代码 |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `data_select` | Integer | 所选取的数据 |
返回:Real
#### 示例
### 示例
```tsl
//取华安创新2003年10月10日到2012年10月19日之间的估价比率
@@ -101,21 +101,21 @@ ReturnFundAppraisalRatio("SH000001",intToDate(20031010),intToDate(20121022),0);
//结果:0.03157
```
### `fundJensenMeasure(index_id, beg_t, end_t, rf, data_select)`
## `fundJensenMeasure(index_id, beg_t, end_t, rf, data_select)`
返回Jense指数(与系统股票pn_stock()相关)
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `index_id` | String | 指数代码 |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `rf` | Real | 无风险年收益率(%) |
| `data_select` | Integer | 所选取的数据 |
| 参数 | 类型 | 说明 |
| ------------- | ------- | ----------------- |
| `index_id` | String | 指数代码 |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `rf` | Real | 无风险年收益率(%) |
| `data_select` | Integer | 所选取的数据 |
返回:Real
#### 示例
### 示例
```tsl
//取华安创新2003年03月14日到2012年10月19日之间的Jense指数
@@ -124,20 +124,20 @@ return fundJensenMeasure("SH000001",intToDate(20030314),intToDate(20121019),1.98
//结果:0.03575
```
### `fundSharpMeasure(beg_t, end_t, rf, data_select)`
## `fundSharpMeasure(beg_t, end_t, rf, data_select)`
返回Sharp指数(与系统证券pn_stock()相关)
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `rf` | Real | 无风险年收益率(%) |
| `data_select` | Integer | 所选取的数据 |
| 参数 | 类型 | 说明 |
| ------------- | ------- | ----------------- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `rf` | Real | 无风险年收益率(%) |
| `data_select` | Integer | 所选取的数据 |
返回:Real
#### 示例
### 示例
```tsl
//取华安创新2003年3月14日到2012年10月19日之间的Sharp指数
@@ -146,21 +146,21 @@ ReturnFundSharpMeasure(intToDate(20030314),intToDate(20121019),2,0);
//结果:0.04014
```
### `fundTreynorMeasure(index_id, beg_t, end_t, rf, data_select)`
## `fundTreynorMeasure(index_id, beg_t, end_t, rf, data_select)`
返回Treynor指数(与系统股票pn_stock()相关)
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `index_id` | String | 指数代码 |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `rf` | Real | 无风险年收益率(%) |
| `data_select` | Integer | 所选取的数据 |
| 参数 | 类型 | 说明 |
| ------------- | ------- | ----------------- |
| `index_id` | String | 指数代码 |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `rf` | Real | 无风险年收益率(%) |
| `data_select` | Integer | 所选取的数据 |
返回:Real
#### 示例
### 示例
```tsl
//取华安创新2003年03月14日到2012年10月19日之间的Treynor指数
@@ -169,21 +169,21 @@ return fundTreynorMeasure("SH000001",intToDate(20030314),intToDate(20121019),1.9
//结果:0.07722
```
### `fundMeasure(index_id, beg_t, end_t, rf, data_select)`
## `fundMeasure(index_id, beg_t, end_t, rf, data_select)`
返回基金评估常用的指标。只支持日线与周线,若当前基金净值是按周公布的,计算指标包括以下等:(Rp,Rm,Alpha,Beta,Std,SharpMeasure,JensenMeasure,TreynorMeasure,AppraisalRatio,Corr,…)
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `index_id` | String | 指数代码 |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `rf` | Real | 无风险年收益率(%) |
| `data_select` | Integer | 所选取的数据 |
| 参数 | 类型 | 说明 |
| ------------- | ------- | ----------------- |
| `index_id` | String | 指数代码 |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `rf` | Real | 无风险年收益率(%) |
| `data_select` | Integer | 所选取的数据 |
返回:Array
#### 示例
### 示例
```tsl
//取华安创新2012年1月21日到2012年5月21日之间的常用指标
@@ -198,21 +198,21 @@ return fundMeasure("SH000001",intToDate(20210121),intToDate(20210521),14,0);
返回(不完整截图):
```
### `userDefineIndex(stock_arr, beg_t, end_t, rf, use_rf)`
## `userDefineIndex(stock_arr, beg_t, end_t, rf, use_rf)`
用户自定义指数的收益率序列,与系统周期pn_cycle()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `stock_arr` | Array | 指数加权数据,例子如下 |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `rf` | Real | 无风险年收益率(%) |
| `use_rf` | Boolean | 考虑无风险收益率 |
| 参数 | 类型 | 说明 |
| ----------- | ------- | --------------------- |
| `stock_arr` | Array | 指数加权数据,例子如下 |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `rf` | Real | 无风险年收益率(%) |
| `use_rf` | Boolean | 考虑无风险收益率 |
返回:Array
#### 示例
### 示例
```tsl
//取2012年10月10日到2012年10月19日的自定义指数收益率序列
@@ -226,17 +226,17 @@ intToDate(20121010),intToDate(20121019),2,false);
结果:
```
### `zsRfRatio(rf)`
## `zsRfRatio(rf)`
无风险收益率(折算),与系统周期有关
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ---- | ---- | ----------------- |
| `rf` | Real | 无风险年收益率(%) |
返回:Real
#### 示例
### 示例
```tsl
//获得折算后的无风险收益率
+57 -57
View File
@@ -1,12 +1,12 @@
# 基金 / 基金经理
### `fundManagerByEndt()`
## `fundManagerByEndt()`
在任基金经理,与系统参数(基金代码、日期)相关
返回:array
### `fundManagerDataByEndt(fundid, endt)`
## `fundManagerDataByEndt(fundid, endt)`
指定日在任基金经理人信息
@@ -17,7 +17,7 @@
返回:array
### `fundmanagerid2Funds(managerid)`
## `fundmanagerid2Funds(managerid)`
基金经理ID查询所有管理过的基金,与时间无关
@@ -27,7 +27,7 @@
返回:array
### `fundmanagername2Id(managername)`
## `fundmanagername2Id(managername)`
基金经理名称查询基金经理ID
@@ -37,25 +37,25 @@
返回:array
### `fundmanagerid2Fundsendt(managerid, endt)`
## `fundmanagerid2Fundsendt(managerid, endt)`
指定日基金经理ID查询管理的基金代码列表
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ----------- | ------ | ------------------- |
| `managerid` | String | 字符串,基金经理名称 |
| `endt` | Date | 日期,截止日期 |
| `endt` | Date | 日期,截止日期 |
返回:ARRAY
#### 示例
### 示例
```tsl
// 返回基金经理ID为3067在20201009日管理的基金列表
return fundmanagerid2Fundsendt("3067",20201009T);
```
### `fundManagerSaleSharesYear(r_date)`
## `FundManagerSaleShares_Year(r_date)`
获得指定基金指定报告期本年以来赎回份额,系统参数:证券代码
@@ -65,7 +65,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerSaleSharesOfRateYear(r_date)`
## `FundManagerSaleSharesOfRate_Year(r_date)`
获得指定基金指定报告期本年以来赎回份额占基金份额(%),系统参数:证券代码
@@ -75,7 +75,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTotalValueChangeYear(r_date)`
## `FundManagerTotalValueChange_Year(r_date)`
获得指定基金指定报告期本年以来市值变动,系统参数:证券代码
@@ -85,7 +85,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTotalValueChangeLYear(r_date)`
## `FundManagerTotalValueChange_LYear(r_date)`
获得指定基金指定报告期最近1年市值变动,系统参数:证券代码
@@ -95,7 +95,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerSaleSharesOfRateLYear(r_date)`
## `FundManagerSaleSharesOfRate_LYear(r_date)`
获得指定基金指定报告期最近1年赎回份额占基金份额(%),系统参数:证券代码
@@ -105,7 +105,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTotalSharesChangeOfRate2LYear(r_date)`
## `FundManagerTotalSharesChangeOfRate2_LYear(r_date)`
获得指定基金指定报告期最近1年份额变动占基金管理人份额(%),系统参数:证券代码
@@ -115,7 +115,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTotalSharesChangeLYear(r_date)`
## `FundManagerTotalSharesChange_LYear(r_date)`
获得指定基金指定报告期最近1年份额变动,系统参数:证券代码
@@ -125,7 +125,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerBuyValueLYear(r_date)`
## `FundManagerBuyValue_LYear(r_date)`
获得指定基金指定报告期最近1年申购市值,系统参数:证券代码
@@ -135,7 +135,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTotalSharesChangeOfRate2Year(r_date)`
## `FundManagerTotalSharesChangeOfRate2_Year(r_date)`
获得指定基金指定报告期本年以来份额变动占基金管理人份额(%),系统参数:证券代码
@@ -145,7 +145,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTotalSharesChangeOfRateYear(r_date)`
## `FundManagerTotalSharesChangeOfRate_Year(r_date)`
获得指定基金指定报告期本年以来份额变动占基金份额(%),系统参数:证券代码
@@ -155,7 +155,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerSaleSharesLYear(r_date)`
## `FundManagerSaleShares_LYear(r_date)`
获得指定基金指定报告期最近1年赎回份额,系统参数:证券代码
@@ -165,7 +165,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerBuySharesLYear(r_date)`
## `FundManagerBuyShares_LYear(r_date)`
获得指定基金指定报告期最近1年申购份额,系统参数:证券代码
@@ -175,7 +175,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerBuySharesYear(r_date)`
## `FundManagerBuyShares_Year(r_date)`
获得指定基金指定报告期本年以来申购份额,系统参数:证券代码
@@ -185,7 +185,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTotalSharesChangeYear(r_date)`
## `FundManagerTotalSharesChange_Year(r_date)`
获得指定基金指定报告期本年以来份额变动,系统参数:证券代码
@@ -195,7 +195,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerSaleValueYear(r_date)`
## `FundManagerSaleValue_Year(r_date)`
获得指定基金指定报告期本年以来赎回市值,系统参数:证券代码
@@ -205,7 +205,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTotalValueChangeQj(r_date2, r_date)`
## `FundManagerTotalValueChange_QJ(r_date2, r_date)`
获得指定报告期区间指定基金的市值变动,系统参数:证券代码
@@ -216,7 +216,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTradeAmountYear(r_date, t_type)`
## `FundManagerTradeAmount_Year(r_date, t_type)`
获得指定报告期本年以来指定基金管理人交易金额,系统参数:证券代码
@@ -227,7 +227,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTradeAveragePriceLYear(r_date, t_type)`
## `FundManagerTradeAveragePrice_LYear(r_date, t_type)`
获得指定报告期最近1年指定基金管理人交易均价,系统参数:证券代码
@@ -238,7 +238,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTradeAveragePriceYear(r_date, t_type)`
## `FundManagerTradeAveragePrice_Year(r_date, t_type)`
获得指定报告期本年以来指定基金管理人交易均价,系统参数:证券代码
@@ -249,7 +249,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTradeSharesOfRateYear(r_date, t_type)`
## `FundManagerTradeSharesOfRate_Year(r_date, t_type)`
获得指定报告期本年以来指定基金管理人交易份额占基金总份额(%),系统参数:证券代码
@@ -260,7 +260,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTradeAveragePriceQj(r_date2, r_date, t_type)`
## `FundManagerTradeAveragePrice_QJ(r_date2, r_date, t_type)`
获得指定报告期区间指定基金管理人交易均价,系统参数:证券代码
@@ -272,7 +272,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerTradeSharesQj(r_date2, r_date, t_type)`
## `FundManagerTradeShares_QJ(r_date2, r_date, t_type)`
获得指定报告期区间指定基金管理人交易份额,系统参数:证券代码
@@ -284,37 +284,37 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:float
### `fundManagerIdField()`
## `FundManager_IdField()`
基金经理-代码。根据数据库提供商返回对应的值
返回:string
### `fundManagerBirthDateField()`
## `FundManager_BirthDateField()`
基金经理-出生年月。根据数据库提供商返回对应的值
返回:string
### `fundManagerEndDateField()`
## `FundManager_EndDateField()`
基金经理-离职日期。根据数据库提供商返回对应的值
返回:string
### `fundManagerResumeField()`
## `FundManager_ResumeField()`
基金经理-简历。根据数据库提供商返回对应的值
返回:string
### `fundManagerNameField()`
## `FundManager_NameField()`
基金经理-姓名。根据数据库提供商返回对应的值
返回:string
### `fundManagerJsGpgmjz(end_t)`
## `FundManager_js_gpgmjz(end_t)`
全市场股票规模价值风格识别
@@ -324,7 +324,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:array
### `fundManagerJsHyjqd(r_date)`
## `FundManager_js_hyjqd(r_date)`
申万一级行业景气度
@@ -334,7 +334,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:array
### `fundManagerCyjl(manager_id, r_date)`
## `FundManager_CYJL(manager_id, r_date)`
基金经理从业经历
@@ -345,7 +345,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:array
### `fundManagerGlgm(manager_id, r_date)`
## `FundManager_GLGM(manager_id, r_date)`
基金经理管理规模
@@ -356,7 +356,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:array
### `fundManagerJjgssl(manager_id, r_date)`
## `FundManager_JJGSSL(manager_id, r_date)`
基金公司实力
@@ -367,7 +367,7 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:array
### `fundManagerTzzgzd(manager_id, r_date)`
## `FundManager_TZZGZD(manager_id, r_date)`
投资者关注度
@@ -378,19 +378,19 @@ return fundmanagerid2Fundsendt("3067",20201009T);
返回:array
### `indexOfFundManagers(fund_managers, f_mtype, end_t)`
## `indexOfFundManagers(fund_managers, f_mtype, end_t)`
指定日指定类型基金经理指数
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `fund_managers` | Array | 二维数组类型,包含“基金经理代码”及“姓名”字段 |
| `f_mtype` | Integer | 整数类型,基金经理指数类型 |
| `end_t` | Datetime | 日期类型,截止日 |
| 参数 | 类型 | 说明 |
| --------------- | -------- | -------------------------------------------- |
| `fund_managers` | Array | 二维数组类型,包含“基金经理代码”及“姓名”字段 |
| `f_mtype` | Integer | 整数类型,基金经理指数类型 |
| `end_t` | Datetime | 日期类型,截止日 |
返回:Array
#### 示例
### 示例
```tsl
fund_managers := array(("基金经理代码":"1533","姓名":"傅鹏博"));
@@ -400,7 +400,7 @@ return indexOfFundManagers(fund_managers,f_mtype,end_t);
//结果
```
### `fundManagerGetStockHoldings(manager_id, f_mtype, r_date)`
## `FundManager_GetStockHoldings(manager_id, f_mtype, r_date)`
基金经理指定报告期持股明细,其中一、三季报为模拟持仓数据,中报、年报为实际持仓数据
@@ -412,7 +412,7 @@ return indexOfFundManagers(fund_managers,f_mtype,end_t);
返回:array
### `fundManagerPjCwfg(fund_managers, r_date)`
## `FundManager_pj_cwfg(fund_managers, r_date)`
根据基金经理列表计算指定报告期持仓风格评价
@@ -423,7 +423,7 @@ return indexOfFundManagers(fund_managers,f_mtype,end_t);
返回:array
### `fundManagerRiskStyle(manager_id, r_date)`
## `FundManager_RiskStyle(manager_id, r_date)`
基金经理风险风格因子计算模型
@@ -434,13 +434,13 @@ return indexOfFundManagers(fund_managers,f_mtype,end_t);
返回:array
### `fundManager()`
## `Fund_Manager()`
返回指定基金相同管理人列表数据,与系统参数(证券代码)相关。
返回:array
### `fundManagerShareChange(show_number, report_date_show_order)`
## `fund_ManagerShareChange(show_number, report_date_show_order)`
基金管理人份额变动
@@ -451,7 +451,7 @@ return indexOfFundManagers(fund_managers,f_mtype,end_t);
返回:bool
### `fundManagerTradeDetail(show_number, show_type, report_date_show_order)`
## `fund_ManagerTradeDetail(show_number, show_type, report_date_show_order)`
基金管理人交易明细
@@ -463,7 +463,7 @@ return indexOfFundManagers(fund_managers,f_mtype,end_t);
返回:bool
### `fundmanagercrossholdstockQk(fund_admin_name, end_t)`
## `fundmanagercrossholdstock_qk(fund_admin_name, end_t)`
基金管理公司交叉持股情况。
@@ -474,7 +474,7 @@ return indexOfFundManagers(fund_managers,f_mtype,end_t);
返回:array
### `fundManagerCrossHoldStockCall(end_t)`
## `FundManagerCrossHoldStock_Call(end_t)`
所有基金管理公司交叉持股情况。
+131 -120
View File
@@ -1,6 +1,6 @@
# 基金 / 基金收益率
### `fundAlpha(index_id, beg_t, end_t, data_select)`
## `fundAlpha(index_id, beg_t, end_t, data_select)`
返回基金的α系数,与系统证券、周期有关,周期只能用日线、周线。
@@ -13,7 +13,7 @@
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF040001');
@@ -23,7 +23,7 @@ endt:=inttodate(20110910);
return FundAlpha('SH000300',begt,endt,0);
```
### `fundAverageYtm2(begt, end_t)`
## `fundAverageYtm2(begt, end_t)`
返回一段时间的指定周期的收益率(算术平均)(%),与系统证券pn_stock()相关。 注意,该函数只能设置周期为日线或者周线,其他周期则返回0。
@@ -34,7 +34,7 @@ return FundAlpha('SH000300',begt,endt,0);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF040001');
@@ -43,7 +43,7 @@ endt:=inttodate(20110910);
return FundAverageYTM2(begt,endt);
```
### `fundAverageYtm3(beg_t, end_t, rf)`
## `fundAverageYtm3(beg_t, end_t, rf)`
返回基金的区间风险收益率(%),与系统证券pn_stock()相关。
@@ -55,7 +55,7 @@ return FundAverageYTM2(begt,endt);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF040001');
@@ -65,7 +65,7 @@ endt:=inttodate(20110910);
return FundAverageYTM3(begt,endt,2.25);
```
### `fundBeta(index_id, beg_t, end_t, data_select)`
## `fundBeta(index_id, beg_t, end_t, data_select)`
返回基金的β系数,与系统证券pn_stock()相关,与系统证券、周期有关,周期只能用日线、周线
@@ -78,7 +78,7 @@ return FundAverageYTM3(begt,endt,2.25);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF040001');
@@ -88,7 +88,7 @@ endt:=inttodate(20110910);
return FundBeta('SH000300',begt,endt,0);
```
### `fundCorr(index_id, beg_t, end_t, data_select)`
## `fundCorr(index_id, beg_t, end_t, data_select)`
返回某基金与IndexId的相关系数,与系统证券pn_stock()相关。
@@ -101,7 +101,7 @@ return FundBeta('SH000300',begt,endt,0);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF040001');
@@ -110,7 +110,7 @@ endt:=inttodate(20110910);
return FundCorr('SH000001',begt,endt,0);
```
### `fundMaxDrawDown(beg_t, end_t, data_select)`
## `fundMaxDrawDown(beg_t, end_t, data_select)`
基金最大回撤(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -122,14 +122,14 @@ return FundCorr('SH000001',begt,endt,0);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundMaxDrawDown(20160101T,20180903T,0);
```
### `fundMinRecoveryPeriod(beg_t, end_t, data_select, cycle)`
## `fundMinRecoveryPeriod(beg_t, end_t, data_select, cycle)`
基金净值突破前值最长时间。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -142,14 +142,14 @@ Return FundMaxDrawDown(20160101T,20180903T,0);
返回:int
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF090005");
Return FundMinRecoveryPeriod(20160101T,20180903T,0,cy_day());
```
### `fundNavReturn(beg_t, end_t, data_select, annual)`
## `fundNavReturn(beg_t, end_t, data_select, annual)`
基金组合收益(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -162,14 +162,14 @@ Return FundMinRecoveryPeriod(20160101T,20180903T,0,cy_day());
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundNAVReturn(20160101T,20180927T,0,1);
```
### `fundNavReturnDtd(end_t, data_select, annual)`
## `fundNavReturnDtd(end_t, data_select, annual)`
基金本日收益(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -181,14 +181,14 @@ Return FundNAVReturn(20160101T,20180927T,0,1);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundNAVReturnDTD(20180907T,0,1);
```
### `fundNavReturnItd(end_t, data_select, annual)`
## `fundNavReturnItd(end_t, data_select, annual)`
基金成立以来收益(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -200,14 +200,14 @@ Return FundNAVReturnDTD(20180907T,0,1);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundNAVReturnITD(20181008T,0,1);
```
### `fundNavReturnWtd(end_t, data_select, annual)`
## `fundNavReturnWtd(end_t, data_select, annual)`
基金本周收益(%),返回组合周区间收益率(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -219,14 +219,14 @@ Return FundNAVReturnITD(20181008T,0,1);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundNAVReturnWTD(20180907T,0,1);
```
### `fundPna(end_t)`
## `fundPna(end_t)`
返回基金指定日的市净率,不复权,与系统证券pn_stock()相关。
@@ -236,7 +236,7 @@ Return FundNAVReturnWTD(20180907T,0,1);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'SH500001');
@@ -244,7 +244,7 @@ endt:=inttodate(20110910);
return FundPNA(endt);
```
### `fundRSquared(index_id, beg_t, end_t, data_select, cycle)`
## `fundRSquared(index_id, beg_t, end_t, data_select, cycle)`
基金R2。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -258,7 +258,7 @@ return FundPNA(endt);
返回:float
### `fundStdDev(beg_t, end_t, data_select)`
## `fundStdDev(beg_t, end_t, data_select)`
返回基金区间收益率的标准差,与系统证券pn_stock()相关,与系统证券、周期有关,周期只能用日线、周线。
@@ -270,7 +270,7 @@ return FundPNA(endt);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF040001');
@@ -280,7 +280,7 @@ endt:=inttodate(20110910);
return FundStdDev(begt,endt,0) ;
```
### `fundTraingReturn1M(end_t, data_select, annual)`
## `fundTraingReturn1M(end_t, data_select, annual)`
基金最近1个月收益(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -292,14 +292,14 @@ return FundStdDev(begt,endt,0) ;
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundTraingReturn1M(20180928T,0,1);
```
### `fundTraingReturn1Y(end_t, data_select, annual)`
## `fundTraingReturn1Y(end_t, data_select, annual)`
基金最近1年收益(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -311,14 +311,14 @@ Return FundTraingReturn1M(20180928T,0,1);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundTraingReturn1Y(20180928T,0,1);
```
### `fundTraingReturn6M(end_t, data_select, annual)`
## `fundTraingReturn6M(end_t, data_select, annual)`
基金最近6个月收益(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -330,14 +330,14 @@ Return FundTraingReturn1Y(20180928T,0,1);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundTraingReturn6M(20180928T,0,1);
```
### `fundTurnOver(begt, end_t)`
## `fundTurnOver(begt, end_t)`
返回基金的交易周转率(%),不复权,与系统证券pn_stock()相关。
@@ -348,7 +348,7 @@ Return FundTraingReturn6M(20180928T,0,1);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'SH500001');
@@ -357,7 +357,7 @@ endt:=inttodate(20110910);
return FundTurnOver(begt,endt);
```
### `fundVaR(beg_t, end_t, data_select, cycle)`
## `fundVaR(beg_t, end_t, data_select, cycle)`
基金VaR(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
@@ -370,14 +370,14 @@ return FundTurnOver(begt,endt);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundVaR(20160101T,20180927T,0,cy_day());
```
### `fundZjRatio(end_t)`
## `fundZjRatio(end_t)`
返回基金指定日的折价率(%),不复权,与系统证券pn_stock()相关。
@@ -387,7 +387,7 @@ Return FundVaR(20160101T,20180927T,0,cy_day());
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'SH500001');
@@ -395,13 +395,13 @@ endt:=inttodate(20110910);
return FundZjRatio(endt);
```
### `fundZjRatio3()`
## `fundZjRatio3()`
基金的最新折价率(%) 与系统证券pn_stock()及系统时间pn_date()相关。只适用于封闭基金。
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF161226');
@@ -409,21 +409,21 @@ setsysparam(pn_date(),inttodate(20250910));
return FundZjRatio3();
```
### `fundExcessReturn(index_id, beg_t, end_t, data_select, annual)`
## `fundExcessReturn(index_id, beg_t, end_t, data_select, annual)`
基金超额收益(%)。与系统股票pn_stock()、当前时间pn_date()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `index_id` | String | 指数类型,指数代码; |
| `beg_t` | DateTime | 日期类型,开始日期; |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
| 参数 | 类型 | 说明 |
| ------------- | -------- | ------------------------------ |
| `index_id` | String | 指数类型,指数代码; |
| `beg_t` | DateTime | 日期类型,开始日期; |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
返回:Real
#### 示例
### 示例
```tsl
//获取OF001344在一段时间内相对于沪深300的超额收益
@@ -432,21 +432,21 @@ return fundExcessReturn("SH000300",20160101T,20180903T,0,0);
//返回:21.02
```
### `fundMarginalRisk(index_id, beg_t, end_t, data_select, cycle)`
## `fundMarginalRisk(index_id, beg_t, end_t, data_select, cycle)`
基金边际风险。与系统股票pn_stock()、当前时间pn_date()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `index_id` | String | 指数类型,指数代码; |
| `beg_t` | DateTime | 日期类型,开始日期; |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `cycle` | String | 周期类型,周期 |
| 参数 | 类型 | 说明 |
| ------------- | -------- | ------------------------------ |
| `index_id` | String | 指数类型,指数代码; |
| `beg_t` | DateTime | 日期类型,开始日期; |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `cycle` | String | 周期类型,周期 |
返回:Real
#### 示例
### 示例
```tsl
//SH0000182016年1月1日到2018年9月3日,日线净值数据的边际风险。
@@ -454,19 +454,19 @@ return fundMarginalRisk("SH000018",20160101T,20180903T,0,1);
//结果:0.94514
```
### `fundNavReturnYtd(end_t, data_select, annual)`
## `fundNavReturnYtd(end_t, data_select, annual)`
基金本年收益(%),返回组合累计收益率(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
| 参数 | 类型 | 说明 |
| ------------- | -------- | ------------------------------ |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
返回:Real
#### 示例
### 示例
```tsl
//OF1627142018年9月3日,净值数据的本年收益(%)。
@@ -475,23 +475,23 @@ return fundNavReturnYtd(20180903T,0,1);
//结果:-30.67985
```
### `fundTe(index_id, beg_t, end_t, rf, data_select, annual, cycle)`
## `fundTe(index_id, beg_t, end_t, rf, data_select, annual, cycle)`
基金跟踪误差(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `index_id` | String | 指数类型,指数代码; |
| `beg_t` | DateTime | 日期类型,开始日期; |
| `end_t` | DateTime | 日期类型,截止日期; |
| `rf` | Real | 实数类型,无风险年收益率(%); |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化; |
| `cycle` | String | 周期类型,周期 |
| 参数 | 类型 | 说明 |
| ------------- | -------- | ------------------------------ |
| `index_id` | String | 指数类型,指数代码; |
| `beg_t` | DateTime | 日期类型,开始日期; |
| `end_t` | DateTime | 日期类型,截止日期; |
| `rf` | Real | 实数类型,无风险年收益率(%) |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化; |
| `cycle` | String | 周期类型,周期 |
返回:Real
#### 示例
### 示例
```tsl
//SH0000182016年1月1日到2018年9月3日,无风险年收益率为3,年化的日线净值数据的跟踪误差(%)。
@@ -499,18 +499,29 @@ return fundTe("SH000018",20160101T,20180903T,3,0,1,cy_day());
//结果:17.77457
```
### `fundNetAsset(end_t, return_field)`
## `FundNetAsset(end_t, return_field)`
基金净值,取数据基金.净值(328)中基金净值。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | DateTime | 日期类型,截止日期; |
| `return_field` | String | 字符串类型,返回字段名称; |
| 参数 | 类型 | 说明 |
| -------------- | -------- | -------------------------- |
| `end_t` | DateTime | 日期类型,截止日期; |
| `return_field` | String | 字符串类型,返回字段名称; |
返回:Real,实数
## `Fund_NetAsset(end_t, return_field)`
基金净值,取数据基金.净值(328)中基金净值。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
| 参数 | 类型 | 说明 |
| -------------- | -------- | -------------------------- |
| `end_t` | DateTime | 日期类型,截止日期; |
| `return_field` | String | 字符串类型,返回字段名称; |
返回:Real
#### 示例
### 示例
```tsl
//OF1627142018年8月22日的净值。
@@ -519,19 +530,19 @@ return fundNetAsset(20180822T,'单位净值');
//结果:0.9557
```
### `fundTraingReturn2Y(end_t, data_select, annual)`
## `fundTraingReturn2Y(end_t, data_select, annual)`
基金最近2年收益(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
| 参数 | 类型 | 说明 |
| ------------- | -------- | ------------------------------ |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
返回:Real
#### 示例
### 示例
```tsl
//OF1627142018年9月28日,净值数据的最近2年收益(%)。
@@ -540,19 +551,19 @@ return fundTraingReturn2Y(20180928T,0,1);
//结果:-0.21469
```
### `fundTraingReturn3Y(end_t, data_select, annual)`
## `fundTraingReturn3Y(end_t, data_select, annual)`
基金最近3年收益(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
| 参数 | 类型 | 说明 |
| ------------- | -------- | ------------------------------ |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
返回:Real
#### 示例
### 示例
```tsl
//OF1627142018年9月28日,净值数据的最近3年收益(%)。
@@ -561,21 +572,21 @@ return fundTraingReturn3Y(20180928T,0,1);
//结果:3.32472
```
### `fundSemiDeviation(beg_t, end_t, data_select, annual, cycle)`
## `fundSemiDeviation(beg_t, end_t, data_select, annual, cycle)`
基金下方标准差(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `beg_t` | DateTime | 日期类型,开始日; |
| `end_t` | DateTime | 日期类型,截止日; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化; |
| `cycle` | String | 周期类型,周期 |
| 参数 | 类型 | 说明 |
| ------------- | -------- | ------------------------------ |
| `beg_t` | DateTime | 日期类型,开始日; |
| `end_t` | DateTime | 日期类型,截止日; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化; |
| `cycle` | String | 周期类型,周期 |
返回:Real
#### 示例
### 示例
```tsl
//OF1627142016年1月1日到2018年9月27日,年化的日线净值数据的下方标准差(%)。
@@ -584,19 +595,19 @@ return fundSemiDeviation(20160101T,20180927T,0,1,cy_day());
//结果:18.5797
```
### `fundNavReturnQtd(end_t, data_select, annual)`
## `fundNavReturnQtd(end_t, data_select, annual)`
基金本季收益(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
| 参数 | 类型 | 说明 |
| ------------- | -------- | ------------------------------ |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
返回:Real
#### 示例
### 示例
```tsl
//OF1627142018年6月30日,净值数据的本季收益(%)。
@@ -605,19 +616,19 @@ return fundNavReturnQtd(20180630T,0,1);
//结果:-36.96638
```
### `fundNavReturnMtd(end_t, data_select, annual)`
## `fundNavReturnMtd(end_t, data_select, annual)`
基金本月收益(%)。与系统股票pn_stock()、当前时间pn_date(),周期cy_cycle()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
| 参数 | 类型 | 说明 |
| ------------- | -------- | ------------------------------ |
| `end_t` | DateTime | 日期类型,截止日期; |
| `data_select` | Integer | 用户自定义类型,所选取的数据; |
| `annual` | Boolean | 真假类型,是否年化 |
返回:Real
#### 示例
### 示例
```tsl
//OF1627142018年9月27日,净值数据的本月收益(%)。
+86 -86
View File
@@ -1,6 +1,6 @@
# 基金 / 分级基金
### `fundAdjustNav1(end_t)`
## `fundAdjustNav1(end_t)`
获取T-1调整后单位净值(预估净值)。与系统股票pn_stock()相关。 注: T日如果是拆分基准日,那么基金公司将会公布拆分折算后的净值,其与T-1日的量纲不同,此处将对T-1日的净值进行调整至经过拆分折算调整后的净值。 一般用于分级基金
@@ -10,14 +10,14 @@
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF161028");
return FundAdjustNAV1(20180903T);
```
### `fundAdjustNav2(end_t)`
## `fundAdjustNav2(end_t)`
获取T-1调整前单位净值(预估折溢价)。与系统股票pn_stock()相关。
@@ -27,14 +27,14 @@ return FundAdjustNAV1(20180903T);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF161028");
return FundAdjustNAV2(20180822T);
```
### `fundBenchmarkReturn4(end_t)`
## `fundBenchmarkReturn4(end_t)`
基准预估涨幅(%)。与系统股票pn_stock()、当前时间pn_date()相关。
@@ -44,14 +44,14 @@ return FundAdjustNAV2(20180822T);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF161028");
return FundBenchmarkReturn4(20180903T);
```
### `fundCalculatedNav4(end_t)`
## `fundCalculatedNav4(end_t)`
获取基金的母基金预估净值。与系统股票pn_stock()相关。
@@ -61,14 +61,14 @@ return FundBenchmarkReturn4(20180903T);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF161028");
return FundCalculatedNAV4(20180903T);
```
### `fundCalculatedNavAvgError(begt, end_t)`
## `fundCalculatedNavAvgError(begt, end_t)`
获取基金的母基金预估净值相对误差的均值(%),即区间预估与真实净值之差的均值。与系统股票pn_stock()相关。
@@ -79,14 +79,14 @@ return FundCalculatedNAV4(20180903T);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF161028");
return FundCalculatedNAVAvgError(20160101T,20180903T);
```
### `fundHsl(begt, end_t)`
## `fundHsl(begt, end_t)`
分级子基金换手率(%)。与系统股票pn_stock()相关。 注:仅支持分级基金
@@ -97,14 +97,14 @@ return FundCalculatedNAVAvgError(20160101T,20180903T);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"SZ150169");
return FundHSL(20180101T,20180903T);
```
### `fundMarketShare(endt, t)`
## `fundMarketShare(endt, t)`
基金T和T-1流通份额(万),与系统参数(证券代码)相关。
@@ -115,14 +115,14 @@ return FundHSL(20180101T,20180903T);
返回:int
#### 示例
### 示例
```tsl
SetSysParam(PN_Stock(),'OF159001');
return FundMarketShare(20231215T,0);
```
### `fundShareIncrease(endt)`
## `fundShareIncrease(endt)`
基金份额变动数目,数据从基金.份额变动表(324)中取。与系统股票pn_stock()、相关。
@@ -132,14 +132,14 @@ return FundMarketShare(20231215T,0);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF000092");
Return FundShareIncrease(20170703T);
```
### `fundTrackingError(begt, end_t)`
## `fundTrackingError(begt, end_t)`
获取基金的母基金跟踪误差(%),与系统股票pn_stock()相关。
@@ -150,14 +150,14 @@ Return FundShareIncrease(20170703T);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF161028");
return FundTrackingError(20160101T,20180903T);
```
### `fundTrueNavAll(end_t, fund_type)`
## `FundTrueNAV_All(end_t, fund_type)`
获取基金的T日基金真实净值(用于计算折溢价)。与系统股票pn_stock()相关。
@@ -168,7 +168,7 @@ return FundTrackingError(20160101T,20180903T);
返回:float
### `fundVirtualTrackingError(begt, end_t)`
## `fundVirtualTrackingError(begt, end_t)`
获取基金的母基金预估净值相对误差的标准差(%),即区间预估与真实净值之差的均值。与系统股票pn_stock()相关。
@@ -179,37 +179,37 @@ return FundTrackingError(20160101T,20180903T);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF161028");
return FundVirtualTrackingError(20160101T,20180903T);
```
### `getAllStructuredFunds()`
## `getAllStructuredFunds()`
获取所有分级子基金可在交易所交易的母基金,与当前时间pn_date()相关。
返回:Array
#### 示例
### 示例
```tsl
return getAllStructuredFunds();
结果:
```
### `fundHslOfA4(end_t)`
## `fundHslOfA4(end_t)`
获取基金的分级A类换手率(%),与系统股票pn_stock()、当前时间pn_date()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的分级A类换手率(%)
@@ -218,17 +218,17 @@ return fundHslOfA4(20180903T);
//结果:1.48574824
```
### `fundDiscountRatioOfA4(end_t)`
## `fundDiscountRatioOfA4(end_t)`
获取基金的分级A类指定日折溢价率(%),与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的分级A类指定日折溢价率(%)
@@ -237,17 +237,17 @@ return fundDiscountRatioOfA4(20180903T);
//结果:-6.08175474
```
### `fundShareIncreaseofA(end_t)`
## `fundShareIncreaseofA(end_t)`
获取基金的分级A类份额变动数目,数据取表基金.份额变动表(324),与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的分级A类份额增长
@@ -256,17 +256,17 @@ return fundShareIncreaseofA(20180903T);
//结果:-50000
```
### `fundVirtualDiscountRatioOfB4(end_t)`
## `fundVirtualDiscountRatioOfB4(end_t)`
获取基金的分级B类预估折价率(%),与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的分级B类预估折价率(%)
@@ -275,17 +275,17 @@ return fundVirtualDiscountRatioOfB4(20180903T);
//结果:5.00532481
```
### `fundNavLeverage4(end_t)`
## `fundNavLeverage4(end_t)`
获取基金的分级B类净值杠杆,与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的分级B类净值杠杆
@@ -294,17 +294,17 @@ return fundNavLeverage4(20180903T);
//结果:2.07036247
```
### `fundHslOfB4(end_t)`
## `fundHslOfB4(end_t)`
获取基金的分级B类换手率(%),与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的分级B类换手率(%)
@@ -313,13 +313,13 @@ return fundHslOfB4(20180903T);
//结果:1.48574824
```
### `fundShareLeverage()`
## `fundShareLeverage()`
获取基金的份额杠杆,与系统股票pn_stock()相关。
返回:Integer
#### 示例
### 示例
```tsl
//返回基金OF161028的份额杠杆
@@ -328,17 +328,17 @@ return fundShareLeverage();
//结果:2
```
### `fundShareIncreaseofB(end_t)`
## `fundShareIncreaseofB(end_t)`
获取基金的分级B类份额增长,数据取表基金.份额变动表(324),与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Integer
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的分级B类份额增长
@@ -347,17 +347,17 @@ return fundShareIncreaseofB(20180903T);
//结果:-50000
```
### `fundCalculatedNavOfB4(end_t)`
## `fundCalculatedNavOfB4(end_t)`
获取基金的分级B类预估净值,与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的分级B类预估净值
@@ -366,17 +366,17 @@ return fundCalculatedNavOfB4(20180903T);
//结果:0.939
```
### `fundPriceLeverage4(end_t)`
## `fundPriceLeverage4(end_t)`
获取基金的分级B类价格杠杆,与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的分级B类价格杠杆
@@ -385,17 +385,17 @@ return fundPriceLeverage4(20180903T);
//结果:1.96957404
```
### `fundCalculatedNavError4(end_t)`
## `fundCalculatedNavError4(end_t)`
获取基金的母基金预估净值相对误差(%),与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的母基金预估净值相对误差(%)
@@ -404,17 +404,17 @@ return fundCalculatedNavError4(20180903T);
//结果:0
```
### `fundVirtualDiscountRatio4(end_t)`
## `fundVirtualDiscountRatio4(end_t)`
获取基金的母基金预估折价率(%),即区间预估与真实净值之差的均值。与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的母基金预估折价率(%)
@@ -423,17 +423,17 @@ return fundVirtualDiscountRatio4(20180903T);
//结果:-0.72091
```
### `fundVirtualPrice4(end_t)`
## `fundVirtualPrice4(end_t)`
获取基金的母基金虚拟价格。与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的母基金虚拟价格
@@ -442,17 +442,17 @@ return fundVirtualPrice4(20180903T);
//结果:0.964
```
### `fundVirtualNawzf4(end_t)`
## `fundVirtualNawzf4(end_t)`
获取基金预估净值涨幅(%)。与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日的基金预估净值涨幅(%)
@@ -461,17 +461,17 @@ return fundVirtualNawzf4(20180903T);
//结果:-1.5213
```
### `fundShareIncreaseOfRatio(end_t)`
## `fundShareIncreaseOfRatio(end_t)`
获取分级A和B类份额增长率(%)。与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------- |
| `end_t` | DateTime | 日期类型,截止日 |
返回:Real
#### 示例
### 示例
```tsl
//返回基金OF161028在2018年9月3日,获取分级A和B类份额增长率(%)
@@ -480,18 +480,18 @@ return fundShareIncreaseOfRatio(20180903T);
//结果:-0.04951
```
### `getDepositRate(hbid, int_day)`
## `getDepositRate(hbid, int_day)`
指定日指定银行存款利率。与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `hbid` | String | 字符串类型; |
| 参数 | 类型 | 说明 |
| --------- | ------- | ---------------------------------------------- |
| `hbid` | String | 字符串类型; |
| `int_day` | Integer | 整数类型,整型日期,如20250206表示2025年2月6日 |
返回:Real
#### 示例
### 示例
```tsl
//返回2018年9月3日的银行存款利率
@@ -1,6 +1,6 @@
# 基金 / 收益及分配
### `fundChangeInFairValueOfFinancialAssetBondRate(r_date)`
## `FundChangeInFairValueOfFinancialAsset_Bond_Rate(r_date)`
获得指定报告期指定基金债券投资收益占公允价值变动收益(%)=债券投资收益/abs(公允价值变动收益)\*100%,系统参数:证券代码
@@ -10,7 +10,7 @@
返回:float
### `fundChangeInFairValueOfFinancialAssetRate(r_date)`
## `FundChangeInFairValueOfFinancialAsset_Rate(r_date)`
获得指定报告期指定基金交易性金融资产占公允价值变动收益(%)=交易性金融资产/abs(公允价值变动收益)\*100%,系统参数:证券代码
@@ -20,7 +20,7 @@
返回:float
### `fundChangeInFairValueOfFinancialAssetStockRate(r_date)`
## `FundChangeInFairValueOfFinancialAsset_Stock_Rate(r_date)`
获得指定报告期指定基金股票投资收益占公允价值变动收益(%)=股票投资收益/abs(公允价值变动收益)\*100%,系统参数:证券代码
@@ -30,18 +30,18 @@
返回:float
### `fundPfAmount(beg_t, end_t)`
## `fundPfAmount(beg_t, end_t)`
获取基金的区间分红总额(万),与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//取基金金泰2008年2月1日到2010年3月5日之间的分红总额(万)
@@ -50,13 +50,13 @@ return fundPfAmount (intToDate(20080201),intToDate(20100305));
//结果:336476
```
### `fundPfAmount2()`
## `fundPfAmount2()`
基金上市以来分红总额(万),与系统证券pn_stock()和系统时间pn_date()相关。
返回:Real
#### 示例
### 示例
```tsl
//取基金金泰上市以来到2012年8月31日之间的分红总额(万)
@@ -66,18 +66,18 @@ return fundPfAmount2();
//结果:597157
```
### `fundPfAmountIi(beg_t, end_t)`
## `fundPfAmountIi(beg_t, end_t)`
基金区间分红(元/份),与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//取基金金泰2005年2月1日到2012年3月5日之间的分红(元/份)
@@ -86,13 +86,13 @@ return fundPfAmountIi(intToDate(20050201),intToDate(20120305));
//结果:2.35
```
### `fundPfAmountIi2()`
## `fundPfAmountIi2()`
基金上市以来分红(元/份),与系统证券pn_stock()和系统时间pn_date()相关
返回:Real
#### 示例
### 示例
```tsl
//取基金金泰上市以来到2012年8月31日之间的分红(元/份)
@@ -102,18 +102,18 @@ return fundPfAmountIi2 ();
//结果:3.03
```
### `fundPfInfo(beg_t, end_t)`
## `fundPfInfo(beg_t, end_t)`
基金区间分红情况,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
返回:Array
#### 示例
### 示例
```tsl
//取基金金泰2005年2月1日到2012年3月5日之间的分红情况
@@ -122,13 +122,13 @@ return fundPfInfo(intToDate(20050201),intToDate(20120305));
结果:
```
### `fundPfInfo2()`
## `fundPfInfo2()`
基金上市以来分红情况,与系统证券pn_stock()和系统时间pn_date()相关
返回:Array
#### 示例
### 示例
```tsl
//取基金金泰上市以来到2012年8月31日之间的分红情况
@@ -138,18 +138,18 @@ return fundPfInfo2();
结果:
```
### `fundPfPercent(beg_t, end_t)`
## `fundPfPercent(beg_t, end_t)`
基金区间分红(复合比例/份),与系统股票pn_stock()相关
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//取基金金泰2005年2月1日到2012年3月5日之间的分红(复合比例/份)
@@ -158,18 +158,18 @@ return fundPfPercent(intToDate(20050201),intToDate(20120305));
//结果:1.69
```
### `fundCashAndBonusInfo(beg_t, end_t)`
## `fundCashAndBonusInfo(beg_t, end_t)`
基金区间分红和拆分情况,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
返回:Array
#### 示例
### 示例
```tsl
//取基金金泰2005年2月1日到2012年3月5日之间的分红和拆分情况
@@ -178,18 +178,18 @@ return fundCashAndBonusInfo(intToDate(20050201),intToDate(20120305));
结果:
```
### `fundPfNumberIi(beg_t, end_t)`
## `fundPfNumberIi(beg_t, end_t)`
基金区间分红次数,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//取基金金泰2005年2月1日到2012年3月5日之间的分红次数
@@ -198,18 +198,18 @@ return fundPfNumberIi(intToDate(20050201),intToDate(20120305));
//结果:6
```
### `fundDistributionInfo(beg_t, end_t)`
## `fundDistributionInfo(beg_t, end_t)`
区间扩募情况,与系统参数(证券代码)相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | --------- | -------------- |
| `beg_t` | TDateTime | 日期。开始日期 |
| `end_t` | TDateTime | 日期。截止日期 |
返回:Array
#### 示例
### 示例
```tsl
//SH600718在2001-01-01至2010-01-01的扩募情况。
@@ -217,19 +217,19 @@ setSysParam(PN_Stock(),'SH600718');
return fundDistributionInfo(20010101T,20100101T);
```
### `fundChangeInFairValueData(fund_id, r_date, c_type)`
## `fundChangeInFairValueData(fund_id, r_date, c_type)`
获取指定基金指定日交易性金融资产或衍生工具占公允价值变动收益的比值(%)
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `fund_id` | String | 证券,基金代码 |
| `r_date` | Integer | 报告期,指定报告期 |
| `c_type` | Integer | 用户自定义,收益类型 |
| 参数 | 类型 | 说明 |
| --------- | ------- | ------------------- |
| `fund_id` | String | 证券,基金代码 |
| `r_date` | Integer | 报告期,指定报告期 |
| `c_type` | Integer | 用户自定义,收益类型 |
返回:real
#### 示例
### 示例
```tsl
//"OF011837"在2024年报交易性金融资产占公允价值变动收益(%)
@@ -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)`
行业集中度
@@ -1,6 +1,6 @@
# 基金 / 基金管理人份额变动
### `fundManagerBuySharesOfRate(r_date)`
## `fundManagerBuySharesOfRate(r_date)`
获得指定基金指定报告期申购份额占基金份额(%)=指定报告期申购份额/指定报告期基金总份额\*100%,系统参数:证券代码
@@ -10,14 +10,14 @@
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF450005');
return FundManagerBuySharesOfRate(20190630);
```
### `fundManagerBuySharesOfRateLYear(r_date)`
## `FundManagerBuySharesOfRate_LYear(r_date)`
获得指定基金指定报告期最近1年申购份额占基金份额(%),系统参数:证券代码
@@ -27,7 +27,7 @@ return FundManagerBuySharesOfRate(20190630);
返回:float
### `fundManagerBuySharesOfRateQj(r_date2, r_date)`
## `FundManagerBuySharesOfRate_QJ(r_date2, r_date)`
获得指定报告期区间指定基金的申购份额占基金份额(%)=申购总份额/区间内最后报告期基金总份额\*100%,系统参数:证券代码
@@ -38,7 +38,7 @@ return FundManagerBuySharesOfRate(20190630);
返回:float
### `fundManagerBuySharesOfRateYear(r_date)`
## `FundManagerBuySharesOfRate_Year(r_date)`
获得指定基金指定报告期本年以来申购份额占基金份额(%),系统参数:证券代码
@@ -48,7 +48,7 @@ return FundManagerBuySharesOfRate(20190630);
返回:float
### `fundManagerBuySharesQj(r_date2, r_date)`
## `FundManagerBuyShares_QJ(r_date2, r_date)`
获得指定报告期区间指定基金的申购份额总和,系统参数:证券代码
@@ -59,7 +59,7 @@ return FundManagerBuySharesOfRate(20190630);
返回:float
### `fundManagerBuyValue(rdate)`
## `fundManagerBuyValue(rdate)`
获得指定基金指定报告期的申购市值=指定报告期申购份额\*指定报告期基金净值,系统参数:证券代码
@@ -69,14 +69,14 @@ return FundManagerBuySharesOfRate(20190630);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF450005');
return FundManagerBuyValue(20200630);
```
### `fundManagerBuyValueQj(r_date2, r_date)`
## `FundManagerBuyValue_QJ(r_date2, r_date)`
获得指定报告期区间指定基金的申购市值,系统参数:证券代码
@@ -87,7 +87,7 @@ return FundManagerBuyValue(20200630);
返回:float
### `fundManagerBuyValueYear(r_date)`
## `FundManagerBuyValue_Year(r_date)`
获得指定基金指定报告期本年以来申购市值,系统参数:证券代码
@@ -97,7 +97,7 @@ return FundManagerBuyValue(20200630);
返回:float
### `fundManagerSaleSharesOfRateQj(r_date2, r_date)`
## `FundManagerSaleSharesOfRate_QJ(r_date2, r_date)`
获得指定报告期区间指定基金的赎回份额占基金份额(%)=赎回总份额/区间内最后报告期基金总份额\*100%,系统参数:证券代码
@@ -108,7 +108,7 @@ return FundManagerBuyValue(20200630);
返回:float
### `fundManagerSaleSharesQj(r_date2, r_date)`
## `FundManagerSaleShares_QJ(r_date2, r_date)`
获得指定报告期区间指定基金的赎回份额总和,系统参数:证券代码
@@ -119,7 +119,7 @@ return FundManagerBuyValue(20200630);
返回:float
### `fundManagerSaleValue(r_date)`
## `fundManagerSaleValue(r_date)`
获得指定基金指定报告期的赎回市值=指定报告期赎回份额\*指定报告期基金净值,系统参数:证券代码
@@ -129,14 +129,14 @@ return FundManagerBuyValue(20200630);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF450005');
return FundManagerSaleValue(20190630);
```
### `fundManagerSaleValueLYear(r_date)`
## `FundManagerSaleValue_LYear(r_date)`
获得指定基金指定报告期最近1年赎回市值,系统参数:证券代码
@@ -146,7 +146,7 @@ return FundManagerSaleValue(20190630);
返回:float
### `fundManagerSaleValueQj(r_date2, r_date)`
## `FundManagerSaleValue_QJ(r_date2, r_date)`
获得指定报告期区间指定基金的赎回市值,系统参数:证券代码
@@ -157,7 +157,7 @@ return FundManagerSaleValue(20190630);
返回:float
### `fundManagerSharesChangeData(fund_id, r_date, dtype, ctype)`
## `fundManagerSharesChangeData(fund_id, r_date, dtype, ctype)`
获得指定报告期指定基金的基金管理人份额变动市值、比率等指标
@@ -170,7 +170,7 @@ return FundManagerSaleValue(20190630);
返回:float
### `fundManagerTotalSharesChangeOfRate(r_date)`
## `fundManagerTotalSharesChangeOfRate(r_date)`
获得指定基金指定报告期份额变动占基金份额(%)=指定报告期份额变动/指定报告期基金总份额\*100%,系统参数:证券代码
@@ -180,14 +180,14 @@ return FundManagerSaleValue(20190630);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF450005');
return FundManagerTotalSharesChangeOfRate(20190630);
```
### `fundManagerTotalSharesChangeOfRate2Qj(r_date2, r_date)`
## `FundManagerTotalSharesChangeOfRate2_QJ(r_date2, r_date)`
获得指定报告期区间指定基金的份额变动占基金管理人份额(%)=份额变动/期初基金管理人总份额\*100%,系统参数:证券代码
@@ -198,7 +198,7 @@ return FundManagerTotalSharesChangeOfRate(20190630);
返回:float
### `fundManagerTotalSharesChangeOfRateLYear(r_date)`
## `FundManagerTotalSharesChangeOfRate_LYear(r_date)`
获得指定基金指定报告期最近1年份额变动占基金份额(%),系统参数:证券代码
@@ -208,7 +208,7 @@ return FundManagerTotalSharesChangeOfRate(20190630);
返回:float
### `fundManagerTotalSharesChangeOfRateQj(r_date2, r_date)`
## `FundManagerTotalSharesChangeOfRate_QJ(r_date2, r_date)`
获得指定报告期区间指定基金的份额变动占基金份额(%)=份额变动/区间内最后报告期基金总份额\*100%,系统参数:证券代码
@@ -219,7 +219,7 @@ return FundManagerTotalSharesChangeOfRate(20190630);
返回:float
### `fundManagerTotalSharesChangeQj(r_date2, r_date)`
## `FundManagerTotalSharesChange_QJ(r_date2, r_date)`
获得指定报告期区间指定基金的份额变动,系统参数:证券代码
@@ -230,7 +230,7 @@ return FundManagerTotalSharesChangeOfRate(20190630);
返回:float
### `fundManagerTotalValueChange(r_date)`
## `fundManagerTotalValueChange(r_date)`
获得指定基金指定报告期的份额变动市值=指定报告期份额变动\*指定报告期基金净值,系统参数:证券代码
@@ -240,24 +240,24 @@ return FundManagerTotalSharesChangeOfRate(20190630);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'OF450005');
return FundManagerTotalValueChange(20190630);
```
### `fundManagerTotalValue(r_date)`
## `fundManagerTotalValue(r_date)`
获得指定基金指定报告期的期末市值=指定报告期期末份额*指定报告期基金净值,系统参数:证券代码
获得指定基金指定报告期的期末市值=指定报告期期末份额\*指定报告期基金净值,系统参数:证券代码
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| -------- | ------- | ----------------- |
| `r_date` | Integer | 报告期,指定报告期 |
返回:Real
#### 示例
### 示例
```tsl
//"OF450005"2019年中报的期末市值
@@ -266,17 +266,17 @@ return fundManagerTotalValue(20190630);
//结果:31222443.7
```
### `fundManagerSaleSharesOfRate(r_date)`
## `fundManagerSaleSharesOfRate(r_date)`
获得指定基金指定报告期赎回份额占基金份额(%)=指定报告期赎回份额/指定报告期基金总份额*100%,系统参数:证券代码
获得指定基金指定报告期赎回份额占基金份额(%)=指定报告期赎回份额/指定报告期基金总份额\*100%,系统参数:证券代码
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| -------- | ------- | ----------------- |
| `r_date` | Integer | 报告期,指定报告期 |
返回:Real
#### 示例
### 示例
```tsl
//"OF450005"2019年中报赎回份额占基金份额(%)
@@ -285,17 +285,17 @@ return fundManagerSaleSharesOfRate(20190630);
//结果:3.7
```
### `fundManagerTotalSharesOfRate(r_date)`
## `fundManagerTotalSharesOfRate(r_date)`
获得指定基金指定报告期期末份额占基金份额(%)=指定报告期期末份额/指定报告期基金总份额*100%,系统参数:证券代码
获得指定基金指定报告期期末份额占基金份额(%)=指定报告期期末份额/指定报告期基金总份额\*100%,系统参数:证券代码
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| -------- | ------- | ----------------- |
| `r_date` | Integer | 报告期,指定报告期 |
返回:Real
#### 示例
### 示例
```tsl
//"OF450005"2019中报期末份额占基金份额(%)
@@ -304,17 +304,17 @@ return fundManagerTotalSharesOfRate(20190630);
//结果:3.9
```
### `fundManagerTotalSharesChangeOfRate2(r_date)`
## `fundManagerTotalSharesChangeOfRate2(r_date)`
获得指定基金指定报告期份额变动占基金管理人份额(%)=指定报告期份额变动/指定报告期期初基金总份额*100%,系统参数:证券代码
获得指定基金指定报告期份额变动占基金管理人份额(%)=指定报告期份额变动/指定报告期期初基金总份额\*100%,系统参数:证券代码
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| -------- | ------- | ----------------- |
| `r_date` | Integer | 报告期,指定报告期 |
返回:Real
#### 示例
### 示例
```tsl
//"OF450005"2019年中报份额变动占基金管理人份额(%)
@@ -323,21 +323,21 @@ return fundManagerTotalSharesChangeOfRate2(20190630);
//结果:-48.2
```
### `fundManagerSharesChangeDataQj(fund_id, r_date2, r_date, dtype, ctype)`
## `fundManagerSharesChangeDataQj(fund_id, r_date2, r_date, dtype, ctype)`
获得区间内指定基金的基金管理人份额变动数量、金额、市值、比率等指标
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `fund_id` | String | 证券,基金代码 |
| `r_date2` | Integer | 报告期,开始报告期 |
| `r_date` | Integer | 报告期,指定报告期 |
| `dtype` | Integer | 用户自定义,变动类型 |
| `ctype` | Integer | 用户自定义,计算方式 |
| 参数 | 类型 | 说明 |
| --------- | ------- | ------------------- |
| `fund_id` | String | 证券,基金代码 |
| `r_date2` | Integer | 报告期,开始报告期 |
| `r_date` | Integer | 报告期,指定报告期 |
| `dtype` | Integer | 用户自定义,变动类型 |
| `ctype` | Integer | 用户自定义,计算方式 |
返回:real
#### 示例
### 示例
```tsl
//"OF450005"2019年中报至2019年报基金管理人申购份额
+20 -20
View File
@@ -1,6 +1,6 @@
# 基金 / 基金管理人交易明细
### `fundGetManagerTradeSharesData(fund_id, r_date2, r_date, t_type)`
## `fundGetManagerTradeSharesData(fund_id, r_date2, r_date, t_type)`
获取指定基金指定区间基金管理人交易明细数据 当RDate2=RDate时可取指定日数据
@@ -13,7 +13,7 @@
返回:array
### `fundManagerTradeAmountLYear(r_date, t_type)`
## `FundManagerTradeAmount_LYear(r_date, t_type)`
获得指定报告期最近1年指定基金管理人交易金额,系统参数:证券代码
@@ -24,7 +24,7 @@
返回:float
### `fundManagerTradeAmountQj(r_date2, r_date, t_type)`
## `FundManagerTradeAmount_QJ(r_date2, r_date, t_type)`
获得指定报告期区间指定基金管理人交易金额,系统参数:证券代码
@@ -36,7 +36,7 @@
返回:float
### `fundManagerTradeAmountReport(r_date, t_type)`
## `FundManagerTradeAmount_Report(r_date, t_type)`
获得指定报告期指定基金管理人交易金额,系统参数:证券代码
@@ -47,7 +47,7 @@
返回:float
### `fundManagerTradeAveragePriceReport(r_date, t_type)`
## `FundManagerTradeAveragePrice_Report(r_date, t_type)`
获得指定报告期指定基金管理人交易均价,系统参数:证券代码
@@ -58,7 +58,7 @@
返回:float
### `fundManagerTradeSharesLYear(r_date, t_type)`
## `FundManagerTradeShares_LYear(r_date, t_type)`
获得指定报告期最近1年指定基金管理人交易份额,系统参数:证券代码
@@ -69,7 +69,7 @@
返回:float
### `fundManagerTradeSharesOfRateLYear(r_date, t_type)`
## `FundManagerTradeSharesOfRate_LYear(r_date, t_type)`
获得指定报告期最近1年指定基金管理人交易份额占基金总份额(%),系统参数:证券代码
@@ -80,7 +80,7 @@
返回:float
### `fundManagerTradeSharesOfRateQj(r_date2, r_date, t_type)`
## `FundManagerTradeSharesOfRate_QJ(r_date2, r_date, t_type)`
获得指定报告期区间指定基金管理人交易份额占基金总份额(%),系统参数:证券代码
@@ -92,7 +92,7 @@
返回:float
### `fundManagerTradeSharesOfRateReport(r_date, t_type)`
## `FundManagerTradeSharesOfRate_Report(r_date, t_type)`
获得指定报告期指定基金管理人交易份额占基金总份额(%),系统参数:证券代码
@@ -103,7 +103,7 @@
返回:float
### `fundManagerTradeSharesReport(r_date, t_type)`
## `FundManagerTradeShares_Report(r_date, t_type)`
获得指定报告期指定基金管理人交易份额,系统参数:证券代码
@@ -114,7 +114,7 @@
返回:float
### `fundManagerTradeSharesYear(r_date, t_type)`
## `FundManagerTradeShares_Year(r_date, t_type)`
获得指定报告期本年以来指定基金管理人交易份额,系统参数:证券代码
@@ -125,21 +125,21 @@
返回:float
### `fundManagerTradeSharesDataQj(fund_id, r_date2, r_date, t_type, c_type)`
## `fundManagerTradeSharesDataQj(fund_id, r_date2, r_date, t_type, c_type)`
获得指定报告期区间指定基金管理人交易份额、金额、均价、占比等指标
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `fund_id` | String | 证券,基金代码 |
| `r_date2` | Integer | 报告期,开始报告期 |
| `r_date` | Integer | 报告期,指定报告期 |
| `t_type` | Integer | 用户自定义,交易方式 |
| `c_type` | Integer | 用户自定义,计算方式 |
| 参数 | 类型 | 说明 |
| --------- | ------- | ------------------- |
| `fund_id` | String | 证券,基金代码 |
| `r_date2` | Integer | 报告期,开始报告期 |
| `r_date` | Integer | 报告期,指定报告期 |
| `t_type` | Integer | 用户自定义,交易方式 |
| `c_type` | Integer | 用户自定义,计算方式 |
返回:real
#### 示例
### 示例
```tsl
//"OF011837"在2024年报至2025三季报全部基金管理人交易份额
File diff suppressed because it is too large Load Diff
+95 -85
View File
@@ -1,6 +1,6 @@
# 基金 / 基金净值
### `calculateComplexRightQj(nawarr, forefhcf, rateday)`
## `calculateComplexRightQj(nawarr, forefhcf, rateday)`
复杂复权单位净值序列,与系统参数无关。
@@ -12,7 +12,7 @@
返回:array
### `fund7DaysAnnualRate(fundid, endt)`
## `fund7DaysAnnualRate(fundid, endt)`
7日折算的年化收益率(%) 返回指定基金指定日的7日折算的年化收益率(%),非货币型返回0
@@ -23,13 +23,13 @@
返回:float
### `fundIpov()`
## `fundIpov()`
时点净值(ETF/LOF),与系统证券pn_stock()、系统时间pn_date()相关
返回:float
#### 示例
### 示例
```tsl
Setsysparam(pn_stock(),'SZ160215') ;
@@ -37,7 +37,7 @@ SetSysParam(pn_date(),inttodate(20121019));
Return FundIPOV();
```
### `fundMaxMinNaw(beg_t, end_t, _type, return_type)`
## `fundMaxMinNaw(beg_t, end_t, _type, return_type)`
取区间内单位(累计)净值的最大或最小值,与系统证券pn_stock()相关。
@@ -45,19 +45,19 @@ Return FundIPOV();
| ------------- | -------- | ---------- |
| `beg_t` | datetime | 开始日期 |
| `end_t` | datetime | 截止日期 |
| `_type` | int | 返回内容 |
| `_type` | int | 返回内容 |
| `return_type` | int | 返回的类型 |
返回:float
#### 示例
### 示例
```tsl
Setsysparam(pn_stock(),'OF040001') ;
ReturnFundMaxMinNAW(inttodate(20040930),inttodate(20121018),0,0);
```
### `fundNawByRateBegtEndt(begt, endt)`
## `fundNawByRateBegtEndt(begt, endt)`
区间复权单位净值,与系统参数基金代码、复权方式、复权基准日相关。
@@ -68,7 +68,7 @@ ReturnFundMaxMinNAW(inttodate(20040930),inttodate(20121018),0,0);
返回:array
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF000001");
@@ -77,7 +77,7 @@ SetSysParam(PN_RateDay(),-1);
return FundNAWByRateBegtEndt(20210501T,20210514T);
```
### `fundNawByRateEndT(endt)`
## `fundNawByRateEndT(endt)`
指定日复权单位净值,与系统参数基金代码、复权方式、复权基准日相关。
@@ -87,7 +87,7 @@ return FundNAWByRateBegtEndt(20210501T,20210514T);
返回:float
### `fundNawlAccumulativeNetAsset(end_t)`
## `fundNawlAccumulativeNetAsset(end_t)`
基金指定日累计净值,数据取自基金.净值(328)。与系统股票pn_stock()相关。
@@ -97,27 +97,27 @@ return FundNAWByRateBegtEndt(20210501T,20210514T);
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundNAWLAccumulativeNetAsset(20180822T);
```
### `fundNawlj()`
## `fundNawlj()`
最新累计净值,与系统证券pn_stock()和系统时间pn_date()相关。
返回:float
#### 示例
### 示例
```tsl
Setsysparam(pn_stock(),'OF040001') ;
ReturnFundNAWLJ();
```
### `fundNawlNetAsset(end_t)`
## `fundNawlNetAsset(end_t)`
基金截止日单位净值,数据取自基金.净值(328)。与系统股票pn_stock()相关。
@@ -127,20 +127,20 @@ ReturnFundNAWLJ();
返回:float
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),"OF162714");
Return FundNAWLNetAsset(20180822T);
```
### `fundNawZf3()`
## `fundNawZf3()`
最新日收益率(%),与系统证券pn_stock()相关。 对于非货币基金 若无分红 今日净值增长率=(今日净值-昨日净值)/昨日净值 若有分红 今日净值增长率=(今日净值-(昨日净值-分红)/拆分)/((昨日净值-分红)/拆分)。 对于货币基金 今日净值增长率=区间内的复合收益率。
返回:float
#### 示例
### 示例
```tsl
{取华安创新2012年10月19日的最新日收益率(%)
@@ -150,7 +150,7 @@ Setsysparam(pn_stock(),'OF040001') ;
Return FundNAWZf3();
```
### `fundNetAssetperUnitInReportDate(r_date)`
## `fundNetAssetperUnitInReportDate(r_date)`
单位净值(报告期),与系统参数(证券代码)相关。
@@ -160,20 +160,20 @@ Return FundNAWZf3();
返回:float
#### 示例
### 示例
```tsl
SetSysParam(PN_Stock(),'SH500001');
return FundNetAssetperUnitInReportDate(20211231);
```
### `fundZjRatio4()`
## `fundZjRatio4()`
ETF时点折价率,与系统参数(证券代码,时间,周期)相关。
返回:float
#### 示例
### 示例
```tsl
SetSysParam(pn_stock(),"OF512610");
@@ -181,19 +181,19 @@ SetSysParam(PN_Date(),20200924T);
return FundZjRatio4(); //结果:-0.14
```
### `fundMaxMinNaw2(end_t, _type, return_type)`
## `fundMaxMinNaw2(end_t, _type, return_type)`
上市以来至EndT这段时间内单位(累计)净值的最大或最小值,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | Date | 截止日期 |
| `_type` | Integer | 返回内容 |
| 参数 | 类型 | 说明 |
| ------------- | ------- | ---------- |
| `end_t` | Date | 截止日期 |
| `_type` | Integer | 返回内容 |
| `return_type` | Integer | 返回的类型 |
返回:Real
#### 示例
### 示例
```tsl
//返回华安创新上市以来到2012年10月18日之间的最大单位净值
@@ -202,13 +202,13 @@ ReturnFundMaxMinNAW2(intToDate(20121018),0,0);
//结果:4.452
```
### `fundNawdw()`
## `fundNawdw()`
最新单位净值,与系统证券pn_stock()和系统时间pn_date()相关。
返回:Real
#### 示例
### 示例
```tsl
//取华安创新在指定日的单位净值
@@ -218,19 +218,19 @@ return fundNawdw();
//结果:1.86
```
### `fundNawlInfo(beg_t, end_t, _type)`
## `fundNawlInfo(beg_t, end_t, _type)`
取区间内每天的净值(详情),与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| 参数 | 类型 | 说明 |
| ------- | ------- | -------- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `_type` | Integer | 返回类型 |
返回:Array
#### 示例
### 示例
```tsl
//取华安创新2012年10月10日到2012年10月19日之间的单位净值和累计净值
@@ -239,18 +239,18 @@ ReturnFundNAWLInfo(intToDate(20121010),intToDate(20121019),2);
结果:
```
### `fundNawlInfo2(end_t, _type)`
## `fundNawlInfo2(end_t, _type)`
指定日净值数据,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | Date | 截止日期 |
| 参数 | 类型 | 说明 |
| ------- | ------- | -------- |
| `end_t` | Date | 截止日期 |
| `_type` | Integer | 返回类型 |
返回:Real
#### 示例
### 示例
```tsl
//取华安创新2012年10月19日的单位净值和累计净值
@@ -259,18 +259,18 @@ ReturnFundNAWLInfo2 (intToDate(20121019),2);
结果:
```
### `fundNawZf(beg_t, end_t)`
## `fundNawZf(beg_t, end_t)`
区间净值增长率(%),与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//取华安创新2012年10月10日到2012年10月19日之间的区间净值增长率(%)
@@ -279,19 +279,19 @@ ReturnFundNAWZf(intToDate(20121010),intToDate(20121019));
//结果:0.17
```
### `fundNawlInfoFromBegT(beg_t, end_t, _type)`
## `fundNawlInfoFromBegT(beg_t, end_t, _type)`
区间净值详情(以开始日为基准日计算累计净值),与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| 参数 | 类型 | 说明 |
| ------- | ------- | -------- |
| `beg_t` | Date | 开始日期 |
| `end_t` | Date | 截止日期 |
| `_type` | Integer | 返回类型 |
返回:Real
#### 示例
### 示例
```tsl
//取华安创新2012年10月10日到2012年10月19日之间的累计净值
@@ -301,17 +301,17 @@ fundNawlInfoFromBegT(intToDate(20121010),intToDate(20121019),1);
结果:
```
### `fundNawZf4(end_t)`
## `fundNawZf4(end_t)`
指定日收益率(%),与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `end_t` | Date | 截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//取华安创新2012年10月19日的日收益率(%)
@@ -320,7 +320,7 @@ ReturnFundNAWZf4(intToDate(20121019));
//结果:-0.17
```
### `fundNawZfFh(beg_t, end_t)`
## `FundNAWZf_fh(beg_t, end_t)`
区间复合收益率(%) , 与系统股票pn_stock()相关。 对于非货币基金 若区间无分红 区间净值增长率=(截止日净值-开始日昨净值)/开始日昨净值。 若区间有分红 区间净值增长率=(1+拆分前的净值增长率)\*(1+分红拆分日的净值增长率)\*(1+分红拆分日后到截止日之间的净值增长率)-1。 对于货币基金 区间净值增长率=区间内的复合收益率。
@@ -331,13 +331,13 @@ ReturnFundNAWZf4(intToDate(20121019));
返回:float
### `fundIpoc()`
## `fundIpoc()`
时点收盘(ETF/LOF),与系统证券pn_stock()与系统时间pn_date()相关
返回:Real
#### 示例
### 示例
```tsl
//取国泰价值最新时点收盘
@@ -347,17 +347,17 @@ return fundIpoc();
//结果:0.72
```
### `fundNawmwfjjdwsy(end_t)`
## `fundNawmwfjjdwsy(end_t)`
基金截止日每万份基金单位收益,数据取自基金.净值(328)。与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ------------------ |
| `end_t` | DateTime | 日期类型,截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//基金OF090005在2018年8月22日的每万份基金单位收益。
@@ -366,17 +366,17 @@ return fundNawmwfjjdwsy(20180822T);
//结果:0.86
```
### `fundNawzjqrsyzsdnsyl(end_t)`
## `fundNawzjqrsyzsdnsyl(end_t)`
基金截止日最近七日收益折算的年收益率(%),数据取自基金.净值(328)。与系统股票pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | -------- | ------------------ |
| `end_t` | DateTime | 日期类型,截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//基金OF090005在2018年8月22日的最近七日收益折算的年收益率。
@@ -385,18 +385,18 @@ return fundNawzjqrsyzsdnsyl (20180822T);
//结果:3.243
```
### `fundAdjustNaw(end_t, _type)`
## `fundAdjustNaw(end_t, _type)`
指定日基金净值,与系统证券PN_Stock()相关,根据分红拆分计算调整前/后净值
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | Datetime | 日期类型,截止日 |
| `_type` | Integer | 整数类型,返回净值类型 |
| 参数 | 类型 | 说明 |
| ------- | -------- | ---------------------- |
| `end_t` | Datetime | 日期类型,截止日 |
| `_type` | Integer | 整数类型,返回净值类型 |
返回:Real
#### 示例
### 示例
```tsl
setSysParam(Pn_Stock(),"OF000001");
@@ -404,47 +404,57 @@ endt:=20230112T;
return fundAdjustNaw(endt,1);  //0.9952
```
### `calculateRatioRightQj(nawarr, forefhcf, rateday)`
## `calculateRatioRightQj(nawarr, forefhcf, rateday)`
比例复权单位净值序列,与系统参数无关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `nawarr` | table | table,净值序列 |
| `forefhcf` | table | table,分红送股情况 |
| `rateday` | integer | integer,复权基准日 |
| 参数 | 类型 | 说明 |
| ---------- | ------- | ------------------ |
| `nawarr` | table | table,净值序列 |
| `forefhcf` | table | table,分红送股情况 |
| `rateday` | integer | integer,复权基准日 |
返回:array
### `fundNawlNetAssetField()`
## `Fund_NAWLNetAssetField()`
基金净值-单位净值。根据数据库提供商返回对应的值
返回:string
### `fundNawlSumValueField()`
## `Fund_NAWLSumValueField()`
基金净值-净值总额。根据数据库提供商返回对应的值
返回:string
### `fundNawzjqrsyzsdnsylField()`
## `Fund_NAWZJQRSYZSDNSYLField()`
基金净值-最近七日收益折算的年收益率(%)。根据数据库提供商返回对应的值
返回:string
### `fundNaw(_type)`
## `FundNAW(_type)`
净值,与系统证券,时间相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ------- | -------- |
| `_type` | Integer | 净值类型 |
返回:Real,实数
## `Fund_NAW(_type)`
净值,与系统证券,时间相关。
| 参数 | 类型 | 说明 |
| ------- | ------- | -------- |
| `_type` | Integer | 净值类型 |
返回:Real
#### 示例
### 示例
```tsl
//取华安创新的净值截止日期
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff