Bk_DA
简述
对大盘涨跌贡献值(区间)。
(1)RightType=0时,为“总股本加权”的加权方法;
(2)RightType=1时,为“流通股本加权”的加权方法;
(3)板块对大盘涨跌贡献值的算法:DA=(VC-PC)*IC/MC
VC:板块在EndT的市值;
PC:板块在BegT的市值;
IC:基准指数在EndT的收盘;
MC:基准板块在BegT的市值。
Bk_DA(BegT:TDateTime;EndT:TDateTime;RightType:Ingeter;IndexId:String;MarketName:String):Real
名称 | 类型 | 说明 |
---|
BegT | TDateTime | 日期,开始日期; |
EndT | TDateTime | 日期,截止日期; |
RightType | Ingeter | 整数,加权方法;
 |
IndexId | String | 字符串,指数代码; |
MarketName | String | 字符串,市场名称。 |
返回 | Real | 实数,同比的百分比值。 |
oV:=BackUpSystemParameters2();
//加权方式为'流通股本加权
BegT:=inttodate(20110101);
EndT:=inttodate(20111231);
bk:=getbkbydate('SH000300',EndT);
savebk('我的沪深300','用户板块',bk);
setsysparam(pn_bk(),'我的沪深300');
Return BK_DA(BegT,EndT,1,"SH000001","上证A股;深证A股");
//结果:-258.46。
StocksDA