From bb04864436379fd8e7165d456bb15bad58470195 Mon Sep 17 00:00:00 2001 From: boris Date: Wed, 8 Jul 2026 05:20:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E8=A1=A5=E4=BB=93=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E8=AF=8A=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fidc-core/src/platform_expr_strategy.rs | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/crates/fidc-core/src/platform_expr_strategy.rs b/crates/fidc-core/src/platform_expr_strategy.rs index 776720e..67c08ce 100644 --- a/crates/fidc-core/src/platform_expr_strategy.rs +++ b/crates/fidc-core/src/platform_expr_strategy.rs @@ -2283,9 +2283,21 @@ impl PlatformExprStrategy { loop { let mut budget_working_symbols = slot_working_symbols.clone(); budget_working_symbols.extend(same_bar_buy_symbols.iter().cloned()); - if Self::effective_slot_count(&budget_working_symbols, slot_blocking_symbols) - >= selection_limit - { + let effective_slot_count = + Self::effective_slot_count(&budget_working_symbols, slot_blocking_symbols); + if effective_slot_count >= selection_limit { + if debug_daily_top_up { + daily_top_up_debug_notes.push(format!( + "daily_top_up_stop date={} reason=slot_full effective_slots={} selection_limit={} slot_working={} same_bar_buys={} slot_blocking={} current_position={}", + execution_date, + effective_slot_count, + selection_limit, + slot_working_symbols.len(), + same_bar_buy_symbols.len(), + slot_blocking_symbols.len(), + current_position_symbol.unwrap_or("-") + )); + } break; } let value_symbols = budget_working_symbols.clone(); @@ -2328,6 +2340,15 @@ impl PlatformExprStrategy { )); } if slot_buy_cash <= 0.0 || available_buy_cash < slot_buy_cash * 0.5 { + if debug_daily_top_up { + daily_top_up_debug_notes.push(format!( + "daily_top_up_stop date={} reason=insufficient_cash slot_buy_cash={:.4} available_cash={:.4} current_position={}", + execution_date, + slot_buy_cash, + available_buy_cash, + current_position_symbol.unwrap_or("-") + )); + } break; } @@ -2415,6 +2436,19 @@ impl PlatformExprStrategy { } } if !attempted_any || !filled_any { + if debug_daily_top_up { + daily_top_up_debug_notes.push(format!( + "daily_top_up_stop date={} reason=no_candidate attempted_any={} filled_any={} current_position={} attempted_buys={} exit_symbols={} pending_full_close={} delayed_sold={}", + execution_date, + attempted_any, + filled_any, + current_position_symbol.unwrap_or("-"), + intraday_attempted_buys.len(), + exit_symbols.len(), + pending_full_close_symbols.len(), + delayed_sold_symbols.len() + )); + } break; } }