Apply small-account whole-share compatibility#71
Conversation
9aa09c8 to
5240979
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5240979a64
ℹ️ 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".
| safe_haven_symbols = set(allocation.get("safe_haven_symbols", ())) | ||
| candidate_symbols = tuple( | ||
| symbol for symbol in target_values if symbol not in safe_haven_symbols |
There was a problem hiding this comment.
Normalize safe-haven symbols before candidate filtering
When risk_symbols/income_symbols are empty, this branch compares targets keys to safe_haven_symbols without case normalization, so mixed-case plans (for example targets using "BOXX" and safe_haven_symbols containing "boxx") will incorrectly treat safe-haven assets as substitution candidates. In that case, the new small-account projection can zero a safe-haven target below 1 share price, which skips intended cash-substitute buys and leaves cash idle for pure safe-haven allocations.
Useful? React with 👍 / 👎.
Applies the small-account whole-share compatibility layer in LongBridge value-target execution after safe-haven cash substitution. This lets small accounts sell unbuyable oversized sleeves, such as a single SOXX share whose 20% target cannot buy one share, then redeploy into buyable risk targets.
Validation: