refactor: 优化回归实验配置和模型参数

- 将因子定义、模型参数、日期配置提取为模块级常量
- 优化 LightGBM 参数(降低过拟合风险)
- LightGBMModel 支持 params 字典参数传入
- 修复 StockFilter 创业板排除逻辑(支持 301xxx)
- 添加 experiment/output 到 .gitignore
This commit is contained in:
2026-03-05 00:38:20 +08:00
parent 3b42093100
commit 5a1f278df8
5 changed files with 183 additions and 1350 deletions

View File

@@ -15,7 +15,7 @@ class StockFilterConfig:
基于股票代码进行过滤,不依赖外部数据。
Attributes:
exclude_cyb: 是否排除创业板300xxx
exclude_cyb: 是否排除创业板300xxx, 301xxx
exclude_kcb: 是否排除科创板688xxx
exclude_bj: 是否排除北交所(.BJ 后缀)
exclude_st: 是否排除ST股票需要外部数据支持
@@ -41,8 +41,8 @@ class StockFilterConfig:
"""
result = []
for code in codes:
# 排除创业板300xxx
if self.exclude_cyb and code.startswith("300"):
# 排除创业板300xxx, 301xxx
if self.exclude_cyb and code.startswith(("300", "301")):
continue
# 排除科创板688xxx
if self.exclude_kcb and code.startswith("688"):