Skip to content

fix(risk): empty book weights must not defeat small-account hold - #606

Merged
Pigbibi merged 1 commit into
mainfrom
fix/runtime-risk-hold-empty-weights
Sep 17, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/runtime-risk-hold-empty-weights

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat empty current-weight maps as unavailable (None) for small-account hold
  • Prevents false “worsening” rejects when the book cannot be resolved
  • Adds regression coverage for current_portfolio_weights={}

Test plan

  • pytest tests/test_risk_gate.py -k small_account_hold

Made with Cursor

…hold

An empty weight map was treated as a zero book, so non-worsening checks
failed closed as false worsening and kept rejecting overrun hold targets.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Pigbibi
Pigbibi merged commit 0f2fde6 into main Sep 17, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/runtime-risk-hold-empty-weights branch September 17, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant