统一表达式策略成本风控来源

This commit is contained in:
boris
2026-07-02 22:59:45 +08:00
parent 25cc643f34
commit 564a2fb9b2
2 changed files with 7 additions and 6 deletions
@@ -1022,11 +1022,9 @@ impl PlatformExprStrategy {
} }
fn cost_model(&self) -> ChinaAShareCostModel { fn cost_model(&self) -> ChinaAShareCostModel {
let mut model = if self.config.aiquant_transaction_cost { let mut model = ChinaAShareCostModel::from_trading_constraints(
ChinaAShareCostModel::aiquant_default() self.config.risk_config.trading_constraints,
} else { );
ChinaAShareCostModel::default()
};
if let Some(value) = self.config.commission_rate { if let Some(value) = self.config.commission_rate {
model.commission_rate = value; model.commission_rate = value;
} }
@@ -3762,11 +3762,14 @@ fn broker_uses_board_specific_min_quantity_and_step_size_for_buy_sizing() {
) )
.expect("dataset"); .expect("dataset");
let mut portfolio = PortfolioState::new(10_500.0); let mut portfolio = PortfolioState::new(10_500.0);
let mut risk_config = FidcRiskControlConfig::default();
risk_config.static_rules.reject_kcb_buy = false;
let broker = BrokerSimulator::new_with_execution_price( let broker = BrokerSimulator::new_with_execution_price(
ChinaAShareCostModel::default(), ChinaAShareCostModel::default(),
ChinaEquityRuleHooks::default(), ChinaEquityRuleHooks::default(),
PriceField::Open, PriceField::Open,
); )
.with_risk_config(risk_config);
let report = broker let report = broker
.execute( .execute(