FundDeviationDegree_HYHJ
简述
行业偏离合计=sum(abs(Wi-Bi))/2
其中,Wi是基金持有行业i的市值占净值比;Bi是基准在行业i上的权重;
FundDeviationDegree_HYHJ(Rdate:Integer;PorType:Integer;IndustryType:Integer):Real
| 名称 | 类型 | 说明 |
|---|
| Rdate | Integer | 报告期,指定报告期 |
| PorType | Integer | 用户自定义,占比计算方式
|
显示名 |
取值 | |
占净值比例(%) |
"占净值比例(%)" | |
占市值比例(%) |
"占市值比例(%)" |
|
| IndustryType | Integer | 用户自定义,行业类型
|
显示名 |
取值 | |
申万一级行业 |
1 | |
证监会一级行业 |
2 | |
中证一级行业 |
3 |
|
| 返回 | Real | 行业偏离度(%) |
// 获取"OF510500"报告期20250630的行业偏离度(%),
//使用申万一级行业,按占净值比例(%)计算
FundID:="OF510500";
Setsysparam(Pn_stock(),FundID);
RDate:=20250630;
return FundDeviationDegree_HYHJ(RDate,'占净值比例(%)',1);
//结果:1.829