Apply small-account whole-share compatibility#7
Conversation
4f4e018 to
9692af9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f4e018c91
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| plan = _apply_small_account_whole_share_compatibility( | ||
| plan, | ||
| market_data_port=market_data_port, | ||
| ) |
There was a problem hiding this comment.
Propagate whole-share-adjusted targets to caller-visible plan
Apply the whole-share compatibility layer before execution result reporting, not only inside execute_value_target_plan: these lines mutate plan locally for order generation, but run_strategy_cycle still reports allocation from the original pre-execution plan (application/rebalance_service.py uses its outer plan at result assembly). When a positive target is projected to zero here, submitted orders follow the adjusted targets while API/notification output still shows the old nonzero target, creating inconsistent and misleading cycle results.
Useful? React with 👍 / 👎.
Applies the small-account whole-share compatibility layer in Firstrade value-target planning after safe-haven cash substitution. Unbuyable positive target values are projected to cash before sell and buy planning.
Validation: