跳过零管理费无效集合复制

This commit is contained in:
boris
2026-08-26 06:38:19 +08:00
parent 782bc640ff
commit 8b246a63f0
+9 -2
View File
@@ -2952,9 +2952,15 @@ where
merge_broker_report(&mut directive_report, futures_daily_settlement_report);
let futures_expiration_report = self.settle_futures_expirations(execution_date);
merge_broker_report(&mut directive_report, futures_expiration_report);
let management_fee_report = if portfolio.management_fee_rate() <= 0.0 {
BrokerExecutionReport::default()
} else {
// The strategy context needs an immutable view while the
// engine mutably invokes the strategy. Avoid cloning these
// potentially large sets unless management fees are enabled.
let dynamic_universe_snapshot = self.dynamic_universe.clone();
let subscriptions_snapshot = self.subscriptions.clone();
let management_fee_report = self.apply_management_fee(
self.apply_management_fee(
execution_date,
decision_date,
decision_index,
@@ -2965,7 +2971,8 @@ where
&mut process_events,
result.order_events.as_slice(),
result.fills.as_slice(),
)?;
)?
};
merge_broker_report(&mut directive_report, management_fee_report);
publish_phase_event(
&mut self.strategy,