StocksZfMatrix
简述
计算一组股票的区间收益率序列
StocksZfMatrix(StockArr:Array; BegT:TDateTime;EndT:TDateTime;RightType:Int);Array;
名称 | 类型 | 说明 |
---|
StockArr | Array | 一组股票(一维字符串数组) |
BegT | TDateTime | 起始日期 |
EndT | TDateTime | 截止日期 |
RightType | Int | 加权方式,具体取值如下:
显示名 |
取值 |
总股本加权 |
0 |
流通股本加权 |
1 |
算术平均 |
4 |
|
返回 | Array | 二维数组(第一列为日期,第二列为涨幅) |
//提取沪深300在20091231的成分股于2010年1月份的周收益率
d := inttodate(20091231);
begt := inttodate(20100101);
endt := inttodate(20100131);
setsysparam(pn_cycle(),cy_week()); //设置周期为周线
stockArr := getbkbydate('SH000300',d);
return StocksZfMatrix(stockArr,begt,endt,4);
结果如下:
StocksZf