QMT · 内置 Python引用函数
get_factor_table
获取因子指数数据
原型
get_factor_table(extdataname)
参数
| 参数 | 类型 | 说明 |
|---|---|---|
| extdataname | 官方标注 factor | 扩展数据展示的因子指数名称,例如 流动性因子5分位#1。 |
返回值
pandas.Dataframe Columns: time:时间戳 stock:股票代码 weight:权重 value:值
示例
以下代码依据官方示例整理缩进,并将旧式 print 写法改为函数调用;账号使用占位值。
def init(ContextInfo):
print(get_factor_table('流动性因子5分位#1'))
版本与原文差异
官方原例缺少字符串左引号;本页仅补齐引号,参数标签 extdataname 取自官方参数说明。该接口依赖第三方库 pyarrow。
官方来源
迅投 QMT 官方函数检索表,条目 get_factor_table。本页属于 QMT 内置 Python 接口;原站函数检索表同时收录其他语言,不能按网页路径将本条目误归为 VBA。网页核对日期:2026-10-11。