refactor: 优化回归实验配置和模型参数
- 将因子定义、模型参数、日期配置提取为模块级常量 - 优化 LightGBM 参数(降低过拟合风险) - LightGBMModel 支持 params 字典参数传入 - 修复 StockFilter 创业板排除逻辑(支持 301xxx) - 添加 experiment/output 到 .gitignore
This commit is contained in:
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user