Skip to content

Guard zero-equity value target translation - #134

Merged
Pigbibi merged 1 commit into
mainfrom
fix/zero-equity-decision-guard
Jun 3, 2026
Merged

Guard zero-equity value target translation#134
Pigbibi merged 1 commit into
mainfrom
fix/zero-equity-decision-guard

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • mark value-target decisions as no_execute when runtime portfolio_total_equity is non-positive
  • avoid translating value targets to weights with total_equity=0 while preserving diagnostics
  • add regression coverage for empty/new accounts

Validation

  • PYTHONPATH=.:../QuantPlatformKit/src:../UsEquityStrategies/src:../HkEquityStrategies/src uv run --no-project --with pytest --with pandas pytest tests/test_decision_mapper.py -q
  • PYTHONPATH=.:../QuantPlatformKit/src:../UsEquityStrategies/src:../HkEquityStrategies/src uv run --no-project --with ruff ruff check decision_mapper.py tests/test_decision_mapper.py

@Pigbibi
Pigbibi merged commit bf4556d into main Jun 3, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/zero-equity-decision-guard branch June 3, 2026 04: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