feat: 因子引擎字段验证改进、股票池过滤修复及实验模块增强
1. 因子引擎字段验证改进 - 新增 SchemaCache.get_all_fields() 方法,返回所有可用字段集合 - 修改 match_fields_to_tables(),对不存在的字段抛出明确错误 - 错误信息包含可用字段列表提示,帮助用户检查拼写 2. 股票池过滤修复 - 修复北交所股票排除逻辑:将识别方式从代码前缀(8/4开头)改为.BJ后缀 - 更新文档注释,明确北交所股票识别规则 3. 实验模块增强 - 新增 regression.py 实现回归实验逻辑 - 新增 output/ 目录存放实验输出结果
This commit is contained in:
@@ -17,7 +17,7 @@ class StockFilterConfig:
|
||||
Attributes:
|
||||
exclude_cyb: 是否排除创业板(300xxx)
|
||||
exclude_kcb: 是否排除科创板(688xxx)
|
||||
exclude_bj: 是否排除北交所(8xxxxxx, 4xxxxxx)
|
||||
exclude_bj: 是否排除北交所(.BJ 后缀)
|
||||
exclude_st: 是否排除ST股票(需要外部数据支持)
|
||||
"""
|
||||
|
||||
@@ -47,8 +47,8 @@ class StockFilterConfig:
|
||||
# 排除科创板(688xxx)
|
||||
if self.exclude_kcb and code.startswith("688"):
|
||||
continue
|
||||
# 排除北交所(8xxxxxx 或 4xxxxxx)
|
||||
if self.exclude_bj and (code.startswith("8") or code.startswith("4")):
|
||||
# 排除北交所(.BJ 后缀)
|
||||
if self.exclude_bj and code.endswith(".BJ"):
|
||||
continue
|
||||
result.append(code)
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user