Explain rebalance denial reasons
This commit is contained in:
@@ -678,6 +678,22 @@ fn rebalance_optimizer_skips_unfunded_buy_when_existing_position_cannot_sell() {
|
||||
.unwrap_or(0),
|
||||
10_000
|
||||
);
|
||||
assert!(
|
||||
report
|
||||
.diagnostics
|
||||
.iter()
|
||||
.any(|line| line.contains("rebalance_target_denied symbol=000001.SZ side=sell")),
|
||||
"expected locked position denial diagnostics, got {:?}",
|
||||
report.diagnostics
|
||||
);
|
||||
assert!(
|
||||
report
|
||||
.diagnostics
|
||||
.iter()
|
||||
.any(|line| line.contains("rebalance_buy_reduced symbol=000002.SZ")),
|
||||
"expected unfunded buy reduction diagnostics, got {:?}",
|
||||
report.diagnostics
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user