88 lines
4.1 KiB
Markdown
88 lines
4.1 KiB
Markdown
# 应用专题 / 指数研究
|
|
|
|
## `etf_getWeightFromPCfByEndt(fundid, endt, t, typ)`
|
|
|
|
声明:function
|
|
|
|
根据 ETF 申购赎回明细计算 T 日末权重
|
|
|
|
<!-- tags: 查询 组合权重 资产配置 指数 -->
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
| -------- | -------- | -------------------------------------------- |
|
|
| `fundid` | string | 字符串,ETF 代码 |
|
|
| `endt` | datetime | 截止日 |
|
|
| `t` | array | 变参返回,函数计算结果 |
|
|
| `typ` | integer | 整数,收盘价类型,0:默认,系统昨收,1:昨收 |
|
|
|
|
返回:array
|
|
|
|
## `etFs_getWeightFromPCfByEndt(etfs, endt, close_type, return_array)`
|
|
|
|
声明:function
|
|
|
|
多个 ETF 篮子数据
|
|
|
|
<!-- tags: 查询 组合权重 资产配置 指数 -->
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
| -------------- | -------- | -------------------------------------------- |
|
|
| `etfs` | any | ETF 列表 |
|
|
| `endt` | datetime | 截止日 |
|
|
| `close_type` | integer | 整数,收盘价类型,0:默认,系统昨收,1:昨收 |
|
|
| `return_array` | array | 一维字符串数组,返回结果字段,有以下可选 |
|
|
|
|
返回:array
|
|
|
|
## `getBkWeightByDate_withEtfPcf(index_id, end_t, t)`
|
|
|
|
声明:function
|
|
|
|
基于 ETF 篮子(PCF)数据估计指数权重
|
|
|
|
<!-- tags: 查询 组合权重 资产配置 基准指数 指数产品 交易日期 日期时间 指数 -->
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
| ---------- | -------- | ---------------------- |
|
|
| `index_id` | string | 指数代码 |
|
|
| `end_t` | datetime | 截止日 |
|
|
| `t` | array | 变参返回,函数计算结果 |
|
|
|
|
返回:boolean
|
|
|
|
## `index_getBkWeigthtWithPCfAdjuseByEndt(index_id, endt, fit_stock_num, et_flist, cal_type)`
|
|
|
|
声明:function
|
|
|
|
根据 ETF 篮子数据预测调样后指数样本开盘权重,利用了 GetBkWeightByDate 的结果再结合
|
|
|
|
<!-- tags: 查询 预估 组合权重 资产配置 基准指数 指数产品 指数 -->
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
| --------------- | -------- | -------------------------------------------------------- |
|
|
| `index_id` | string | 指数代码 |
|
|
| `endt` | datetime | 截止日 |
|
|
| `fit_stock_num` | integer | 整数,用于估计的前 N 样本数 |
|
|
| `et_flist` | array | 一维字符串数组,ETF 列表,缺省时默认取所有跟踪指数的 ETF |
|
|
| `cal_type` | integer | 整数,估计方式,0:最小二乘估计,1:基准比例估计 |
|
|
|
|
返回:array
|
|
|
|
## `index_getPCfWeightStatByEndt(index_id, endt, close_type, crn_n, options)`
|
|
|
|
声明:function
|
|
|
|
根据指定指数获取其 ETF 持仓预估成分权重
|
|
|
|
<!-- tags: 查询 统计 汇总 预测 组合权重 资产配置 仓位 基准指数 -->
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
| ------------ | -------- | ------------------------------------------------------------------------------------------- |
|
|
| `index_id` | string | 指数代码 |
|
|
| `endt` | datetime | 截止日 |
|
|
| `close_type` | integer | 整数,收盘价类型,0:默认,系统昨收,1:昨收 |
|
|
| `crn_n` | integer | 整数,作为基准的头部个股个数,默认 |
|
|
| `options` | array | 一维字符串数组,可选项 下标 取值 含义 是否规模加权 0:等权 1:规模加权 控制相对比的加权方式 |
|
|
|
|
返回:array
|