refactor(B组清理): 归档strategy_tree/branch_evaluator/prune_branches/branch_scanner,detect_scenario→market_regime

- 归档4个B组模块: strategy_tree.py/branch_evaluator.py/prune_branches.py/branch_scanner.py
  按方法论:只有重评才能改信号和操作,B组的分支扫描/评估/剪枝越权
- stale_push_wlin.py: detect_scenario→market_regime.load_market_regime()
- strategy_lifecycle.py: detect_scenario→market_regime.load_market_regime(),筹码权重改用温区
- import_holding_xls.py: 移除init_default_branches调用(分支概念已移除)
- per_stock_reassess.py: 移除init_default_branches调用(分支概念已移除)
- 清理mofin_db.py/strategy_lifecycle.py残留注释引用
- 关键脚本语法全部通过
This commit is contained in:
xxm
2026-08-20 14:20:14 +08:00
parent 80eb051e6f
commit 04faf4ed15
10 changed files with 1664 additions and 2 deletions
+1 -1
View File
@@ -2076,7 +2076,7 @@ def write_holding_strategy(conn, code: str, name: str, data: dict,
# ── 策略参数权威保护(2026-08-19 重写:白名单机制,根治交叉覆写)──
# 只有 LLM 重评路径(per_stock_12d/batch_12d) 和 提拔(promote) 能写策略参数。
# 其他调用方(辅助模块/默认write_holding_strategy):保留 DB 当前参数,不覆写。
# 解决:无 per_stock_12d 快照的票(如00020)参数被辅助模块(clean_watchlist/branch_scanner等)反复覆写。
# 解决:无 per_stock_12d 快照的票(如00020)参数被辅助模块(clean_watchlist等)反复覆写。
_PARAM_WHITELIST = ('per_stock_12d', 'batch_12d', 'promote')
if source_trigger not in _PARAM_WHITELIST:
try:
+1 -1
View File
@@ -19,7 +19,7 @@ import technical_analysis as ta
import multi_timeframe as mtf
from mo_data import read_portfolio, read_decisions, read_watchlist
from mo_models import is_hk_stock
from strategy_tree import detect_scenario
from market_regime import load_market_regime
# ─── 策略准入门禁 — 硬性质量红线 ───────────────────────────────
# 每一条策略写入前必须过此门禁。不过的不得写入DB/JSON,