4.0 KiB
4.0 KiB
金融函数 - 指数 / 指数成分
函数
getBkWeightByDate(index_id, end_t, t, cal_type)
获取指数历史指定日的成份股权重。 注意,数据有来自于指数提供商或者天软预估。比如沪深300,每个月月末,指数提供商将月末的成分股信息及全部发送给天软,在本月末至下月末的日期之间的权重,来自于天软预估,即根据最近一次指数提供商提供的权重数据及成分股的涨幅,计算其权重。
| 参数 | 类型 | 说明 |
|---|---|---|
index_id |
string | 指数代码 |
end_t |
datetime | 截止日 |
t |
array | 函数查询结果(指数成份股权重) |
cal_type |
string | 取值和对应含义如下表,具体说明详见说明文档关于增加指数成份权重及访问方法 |
返回:bool
indexIndusNoNCode(endt, topn, industype)
第N名行业的名称
| 参数 | 类型 | 说明 |
|---|---|---|
endt |
datetime | 日期,截止日期 |
topn |
any | 整型,第N |
industype |
any | 整型,行业类别 |
返回:string
indexIndusNoNWeight(endt, topn, industype)
指定日第N名行业的权重
| 参数 | 类型 | 说明 |
|---|---|---|
endt |
datetime | 日期,截止日期 |
topn |
any | 整型,第N |
industype |
any | 整型,行业类别 |
返回:float
indexIndusSumNWeight(endt, topn, industype)
获取指定指数前N行业的权重(行业集中度(%))
| 参数 | 类型 | 说明 |
|---|---|---|
endt |
datetime | 日期,截止日期 |
topn |
any | 整型,前N |
industype |
any | 整型,行业类别 |
返回:float
indexIndusWeightByDate(industryname, endt, industype)
获取指定日指定行业在指定指数中的权重(%) 。 可以获取证监会一级/二级,中证一级/二级,申万一级/二级 的行业权重。其中, 1)证监会和中证只按照当前最新的行业分类统计, 2)申万可根据历史的行业分类统计 。
| 参数 | 类型 | 说明 |
|---|---|---|
industryname |
string | 字符串,行业名称 |
endt |
datetime | 日期,截止日期 |
industype |
any | 整型,行业类别 |
返回:float
indexStockNoNCode(endt, topn)
第N名股票的代码
| 参数 | 类型 | 说明 |
|---|---|---|
endt |
datetime | 日期,截止日期 |
topn |
any | 整型,第N |
返回:float
indexStockNoNWeight(endt, topn)
指定日第N名股票权重
| 参数 | 类型 | 说明 |
|---|---|---|
endt |
datetime | 日期,截止日期 |
topn |
any | 整型,第N |
返回:float
indexStockSumNWeight(endt, topn)
指定指数前N证券的权重(股票集中度(%))
| 参数 | 类型 | 说明 |
|---|---|---|
endt |
datetime | 日期,截止日期 |
topn |
any | 整型,前N |
返回:float
indexStockWeightByDate(stockid, endt)
获取指定日指定股票在指定指数中的权重(%)
| 参数 | 类型 | 说明 |
|---|---|---|
stockid |
any | Index,股票代码 |
endt |
datetime | 日期,截止日期 |
返回:float
indexWeightFirstday()
返回指定指数权重开始日,与系统参数(证券代码)相关。
返回:datetime