移除策略级盘后撮合模式
This commit is contained in:
@@ -26,9 +26,6 @@ use crate::strategy::{
|
||||
TargetPortfolioOrderPricing,
|
||||
};
|
||||
|
||||
pub const POST_CLOSE_FIXED_PRICE_EFFECTIVE_DATE: NaiveDate =
|
||||
NaiveDate::from_ymd_opt(2026, 7, 6).expect("valid post-close effective date");
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum BacktestError {
|
||||
#[error(transparent)]
|
||||
@@ -1973,16 +1970,6 @@ where
|
||||
})
|
||||
.filter(|date| self.config.end_date.map(|end| *date <= end).unwrap_or(true))
|
||||
.collect::<Vec<_>>();
|
||||
if self.broker.matching_type() == MatchingType::PostCloseFixedPrice
|
||||
&& calendar_dates
|
||||
.first()
|
||||
.is_some_and(|date| *date < POST_CLOSE_FIXED_PRICE_EFFECTIVE_DATE)
|
||||
{
|
||||
return Err(BacktestError::Execution(format!(
|
||||
"post_close_fixed_price is unavailable before {}",
|
||||
POST_CLOSE_FIXED_PRICE_EFFECTIVE_DATE
|
||||
)));
|
||||
}
|
||||
let has_decision_inputs = |date: NaiveDate| {
|
||||
!self.data.factor_snapshot_rows_on(date).is_empty()
|
||||
&& !self.data.candidate_snapshot_rows_on(date).is_empty()
|
||||
|
||||
Reference in New Issue
Block a user