diff --git a/sanguo_portfolio/strategies/value_selection.py b/sanguo_portfolio/strategies/value_selection.py index 704977c..af71006 100644 --- a/sanguo_portfolio/strategies/value_selection.py +++ b/sanguo_portfolio/strategies/value_selection.py @@ -280,7 +280,10 @@ class ValueSelectionStrategy: cfg.earnings_growth_low, cfg.earnings_growth_high, ) - out = list(l1 & l2 & l3 & l4 & l5 & l6) + # sorted 定序:set 迭代顺序受 PYTHONHASHSEED 每进程随机化 → 跨进程 + # 回测 trades/stocks_selected 乱序(2026-08-15 TET Phase2 老vs老对照实锤); + # sorted 恢复可复现性,选股集合与顺序无关的下游语义不变 + out = sorted(l1 & l2 & l3 & l4 & l5 & l6) logger.info( "[%s] L1=%d L2=%d L3=%d L4=%d L5=%d L6=%d → final=%d", date_str, len(l1), len(l2), len(l3), len(l4), len(l5), len(l6),