From 302086b7d54038d45b45cf5bc8b7cfd75dfa1718 Mon Sep 17 00:00:00 2001 From: ddrwode <34234@3来 34> Date: Sat, 28 Feb 2026 13:27:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E7=89=88=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run_bb_full_grid_search.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/run_bb_full_grid_search.py b/run_bb_full_grid_search.py index a9acce2..07a51d1 100644 --- a/run_bb_full_grid_search.py +++ b/run_bb_full_grid_search.py @@ -255,6 +255,13 @@ def run_grid_search( done_combos = 0 for task in tasks: res = _eval_period_task(task) + period = task[0] + # 打印该period的所有结果 + for row in res: + print(f"✓ period={int(row['period']):4d}, std={float(row['std']):7.2f} | " + f"收益: {row['ret_pct']:+7.2f}% | 回撤: {row['max_dd_pct']:6.2f}% | " + f"夏普: {row['sharpe']:7.3f} | 交易: {int(row['n_trades']):6d} | " + f"评分: {row['stable_score']:7.1f}") rows.extend(res) done_periods += 1 done_combos += len(task[1]) @@ -275,6 +282,12 @@ def run_grid_search( for fut in as_completed(future_map): period, stds = future_map[fut] res = fut.result() + # 打印该period的所有结果 + for row in res: + print(f"✓ period={int(row['period']):4d}, std={float(row['std']):7.2f} | " + f"收益: {row['ret_pct']:+7.2f}% | 回撤: {row['max_dd_pct']:6.2f}% | " + f"夏普: {row['sharpe']:7.3f} | 交易: {int(row['n_trades']):6d} | " + f"评分: {row['stable_score']:7.1f}") rows.extend(res) done_periods += 1 done_combos += len(stds) @@ -289,6 +302,12 @@ def run_grid_search( done_combos = 0 for task in tasks: res = _eval_period_task(task) + # 打印该period的所有结果 + for row in res: + print(f"✓ period={int(row['period']):4d}, std={float(row['std']):7.2f} | " + f"收益: {row['ret_pct']:+7.2f}% | 回撤: {row['max_dd_pct']:6.2f}% | " + f"夏普: {row['sharpe']:7.3f} | 交易: {int(row['n_trades']):6d} | " + f"评分: {row['stable_score']:7.1f}") rows.extend(res) done_periods += 1 done_combos += len(task[1])