信义光能问题修复:两层级过滤+趋势检查

Bug 1 — strategy_lifecycle.py: enrich_timing_signal 用 factors[-1] 当信号
  信义光能: base_signal=neutral, factors=[大盘中性,行业偏弱,高估值]
  旧逻辑: factors[-1]='行业偏弱'→成为timing_signal→无效信号
  新逻辑: 先找有效操作方向(买入/加仓/观望/持有/关注/信号不充分),
          找不到→信号不充分。不再从上下文因子里拼凑信号。

Bug 2 — stale_push_wlin.py: 信号过滤太松
  旧逻辑: 只跳过特定关键词(等企稳/关注/信号不充分/持有)
  新逻辑: 信号必须含"买入"或"加仓"才进推荐,其他一律跳过

Check 3 — 趋势检查(新增)
  fetch_trend_data(): 取实时行情+30日K线计算MA排列
  空头排列/弱势震荡→不推荐
  药明康德通过(多头排列+买入信号)  信义光能不通过(空头+行业偏弱)
This commit is contained in:
知微
2026-06-24 14:39:50 +08:00
parent e83dfc415d
commit 8f830b8de2
6 changed files with 351 additions and 106 deletions
+5 -5
View File
@@ -108,7 +108,7 @@
"date": "2026-06-24",
"high": 88.32,
"low": 82.78,
"close": 83.45
"close": 83.44
}
],
"00700": [
@@ -1004,7 +1004,7 @@
"date": "2026-06-24",
"high": 168.6,
"low": 160.0,
"close": 165.6
"close": 166.0
}
],
"06869": [
@@ -1284,7 +1284,7 @@
"date": "2026-06-24",
"high": 68.8,
"low": 65.74,
"close": 66.41
"close": 66.52
}
],
"300548": [
@@ -2316,7 +2316,7 @@
"date": "2026-06-24",
"high": 745.2,
"low": 660.01,
"close": 705.0
"close": 704.0
}
],
"688802": [
@@ -2610,7 +2610,7 @@
"date": "2026-06-24",
"high": 52.43,
"low": 49.03,
"close": 49.1
"close": 49.12
}
],
"002171": [