From f5406be04f7adb5339a5b9a1ee6f30237e6730d1 Mon Sep 17 00:00:00 2001 From: aszerW Date: Sun, 21 Jun 2026 14:15:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20detail=20JSON=E5=AF=BC=E5=87=BA=E6=97=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0greedy=5Fweights=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题:greedy模式下greedy_weights没有被导出到detail JSON 修复:在export_results的days_out.append中添加greedy_weights字段 验证结果(select_num=1, greedy模式): - 62.8%天数:1个信号(ETF池充足,100%集中) - 36.0%天数:2个信号(ETF池不足,发生顺延) - 1.2%天数:3个信号(ETF池严重不足) 示例:短债(1ETF)25% + 黄金(4ETF)75% = 100% --- rotation/simple_rotation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rotation/simple_rotation.py b/rotation/simple_rotation.py index 9ae6d4f..c02074a 100644 --- a/rotation/simple_rotation.py +++ b/rotation/simple_rotation.py @@ -1354,6 +1354,7 @@ class SimpleRotationStrategy: 'is_rebalance': rec['is_rebalance'], 'signals': signals, 'holdings': holdings, + 'greedy_weights': rec.get('greedy_weights'), 'added': rec['added'], 'removed': rec['removed'], 'assets': assets,