修正AiQuant策略严格买入预算
This commit is contained in:
@@ -1112,6 +1112,7 @@ pub fn platform_expr_config_from_spec(
|
||||
);
|
||||
if aiquant_profile {
|
||||
cfg.aiquant_transaction_cost = true;
|
||||
cfg.strict_value_budget = true;
|
||||
let trading = spec
|
||||
.runtime_expressions
|
||||
.as_ref()
|
||||
@@ -1174,6 +1175,9 @@ pub fn platform_expr_config_from_spec(
|
||||
{
|
||||
cfg.minimum_commission = None;
|
||||
}
|
||||
if aiquant_profile {
|
||||
cfg.strict_value_budget = true;
|
||||
}
|
||||
|
||||
Ok(cfg)
|
||||
}
|
||||
@@ -1828,6 +1832,7 @@ mod tests {
|
||||
assert!(cfg.aiquant_transaction_cost);
|
||||
assert!(cfg.daily_top_up_enabled);
|
||||
assert!(cfg.retry_empty_rebalance);
|
||||
assert!(cfg.strict_value_budget);
|
||||
|
||||
let explicit_off = serde_json::json!({
|
||||
"engineConfig": {
|
||||
|
||||
Reference in New Issue
Block a user