From 60bfa28ef0c6b4d3a2d91daabbcd506c79c7764d Mon Sep 17 00:00:00 2001 From: boris Date: Mon, 6 Jul 2026 10:23:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=AD=A3=E8=8A=82=E6=B8=85?= =?UTF-8?q?=E4=BB=93=E6=89=A7=E8=A1=8C=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/fidc-core/src/platform_expr_strategy.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/fidc-core/src/platform_expr_strategy.rs b/crates/fidc-core/src/platform_expr_strategy.rs index 2b74291..b047cf0 100644 --- a/crates/fidc-core/src/platform_expr_strategy.rs +++ b/crates/fidc-core/src/platform_expr_strategy.rs @@ -7965,6 +7965,7 @@ impl Strategy for PlatformExprStrategy { } if in_skip_window { + let seasonal_exit_time = self.intraday_execution_start_time(); let mut pending_highlimit_kept = 0usize; for symbol in ctx.portfolio.positions().keys() { if delayed_sold_symbols.contains(symbol) { @@ -7981,8 +7982,8 @@ impl Strategy for PlatformExprStrategy { symbol: symbol.clone(), target_value: 0.0, style: AlgoOrderStyle::Twap, - start_time: Some(delayed_limit_exit_time), - end_time: Some(delayed_limit_exit_time), + start_time: Some(seasonal_exit_time), + end_time: Some(seasonal_exit_time), reason: "seasonal_stop_window".to_string(), }); self.forget_position_entry_date(symbol); @@ -11980,8 +11981,8 @@ mod tests { .. } if symbol == other_symbol && *target_value == 0.0 - && *start_time == Some(NaiveTime::from_hms_opt(9, 31, 0).unwrap()) - && *end_time == Some(NaiveTime::from_hms_opt(9, 31, 0).unwrap()) + && *start_time == Some(NaiveTime::from_hms_opt(10, 18, 0).unwrap()) + && *end_time == Some(NaiveTime::from_hms_opt(10, 18, 0).unwrap()) && reason == "seasonal_stop_window" )), "{:?}", @@ -12274,8 +12275,8 @@ mod tests { .. } if symbol == other_symbol && *target_value == 0.0 - && *start_time == Some(NaiveTime::from_hms_opt(9, 31, 0).unwrap()) - && *end_time == Some(NaiveTime::from_hms_opt(9, 31, 0).unwrap()) + && *start_time == Some(NaiveTime::from_hms_opt(10, 18, 0).unwrap()) + && *end_time == Some(NaiveTime::from_hms_opt(10, 18, 0).unwrap()) && reason == "seasonal_stop_window" )), "{:?}",