统一表达式策略成本风控来源
This commit is contained in:
@@ -1022,11 +1022,9 @@ impl PlatformExprStrategy {
|
||||
}
|
||||
|
||||
fn cost_model(&self) -> ChinaAShareCostModel {
|
||||
let mut model = if self.config.aiquant_transaction_cost {
|
||||
ChinaAShareCostModel::aiquant_default()
|
||||
} else {
|
||||
ChinaAShareCostModel::default()
|
||||
};
|
||||
let mut model = ChinaAShareCostModel::from_trading_constraints(
|
||||
self.config.risk_config.trading_constraints,
|
||||
);
|
||||
if let Some(value) = self.config.commission_rate {
|
||||
model.commission_rate = value;
|
||||
}
|
||||
|
||||
@@ -3762,11 +3762,14 @@ fn broker_uses_board_specific_min_quantity_and_step_size_for_buy_sizing() {
|
||||
)
|
||||
.expect("dataset");
|
||||
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(
|
||||
ChinaAShareCostModel::default(),
|
||||
ChinaEquityRuleHooks::default(),
|
||||
PriceField::Open,
|
||||
);
|
||||
)
|
||||
.with_risk_config(risk_config);
|
||||
|
||||
let report = broker
|
||||
.execute(
|
||||
|
||||
Reference in New Issue
Block a user