调整回测撮合为分钟线执行价语义

This commit is contained in:
boris
2026-06-26 17:03:48 +08:00
parent 380c34aa66
commit a131c761e5
8 changed files with 59 additions and 66 deletions
@@ -190,7 +190,7 @@ fn engine_preloads_declared_decision_quotes_for_current_positions() {
ChinaEquityRuleHooks,
PriceField::Last,
)
.with_matching_type(MatchingType::NextMinuteLast)
.with_matching_type(MatchingType::MinuteLast)
.with_intraday_execution_start_time(t(10, 40, 0));
let config = BacktestConfig {
initial_cash: 10_000.0,
@@ -385,7 +385,7 @@ fn engine_reuses_preloaded_decision_quotes_without_loader_call() {
ChinaEquityRuleHooks,
PriceField::Last,
)
.with_matching_type(MatchingType::NextMinuteLast)
.with_matching_type(MatchingType::MinuteLast)
.with_intraday_execution_start_time(t(10, 40, 0));
let config = BacktestConfig {
initial_cash: 10_000.0,
@@ -587,7 +587,7 @@ fn engine_loads_distinct_decision_quote_times_on_same_day() {
ChinaEquityRuleHooks,
PriceField::Last,
)
.with_matching_type(MatchingType::NextMinuteLast)
.with_matching_type(MatchingType::MinuteLast)
.with_intraday_execution_start_time(t(10, 40, 0));
let config = BacktestConfig {
initial_cash: 10_000.0,
+1 -1
View File
@@ -1842,7 +1842,7 @@ fn engine_sweeps_futures_order_book_depth_when_available() {
ChinaEquityRuleHooks::default(),
PriceField::Last,
)
.with_matching_type(MatchingType::CounterpartyOffer);
.with_matching_type(MatchingType::MinuteBestCounterparty);
let mut engine = BacktestEngine::new(
data,
FuturesDepthLimitOrderStrategy,
@@ -349,7 +349,7 @@ fn broker_delayed_limit_open_sell_uses_minute_price() {
ChinaEquityRuleHooks::default(),
PriceField::Last,
)
.with_matching_type(MatchingType::NextMinuteLast)
.with_matching_type(MatchingType::MinuteLast)
.with_intraday_execution_start_time(NaiveTime::from_hms_opt(9, 31, 0).unwrap())
.with_volume_limit(false)
.with_liquidity_limit(false);
@@ -2888,7 +2888,7 @@ fn broker_uses_best_own_price_for_intraday_matching() {
ChinaEquityRuleHooks::default(),
PriceField::Last,
)
.with_matching_type(MatchingType::NextMinuteBestOwn);
.with_matching_type(MatchingType::MinuteBestOwn);
let report = broker
.execute(
@@ -3003,7 +3003,7 @@ fn broker_uses_best_counterparty_price_for_intraday_matching() {
ChinaEquityRuleHooks::default(),
PriceField::Last,
)
.with_matching_type(MatchingType::NextMinuteBestCounterparty);
.with_matching_type(MatchingType::MinuteBestCounterparty);
let report = broker
.execute(