Add Schwab precheck and probe windows#53
Conversation
51bf677 to
b1da234
Compare
b1da234 to
520fa38
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51bf67728b
ℹ️ 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".
| sweep_quantity = cash_sweep_sale_quantity_to_fund_buy( | ||
| int(quantities[cash_sweep_symbol]), | ||
| funding_buy_candidates, | ||
| ) |
There was a problem hiding this comment.
Recompute sweep funding after earlier sell orders
This fallback sweep-sale path can over-sell cash_sweep_symbol when other symbols were already sold earlier in the same cycle. cash_sweep_sale_quantity_to_fund_buy uses base_buying_power from the pre-sell portfolio, so proceeds from those prior sells are not considered before computing sweep_quantity; in mixed rebalance scenarios this can trigger an unnecessary extra sweep SELL and create avoidable churn/fees. The funding calculation should run after sell proceeds are reflected (or after post-sell refresh) before placing this additional sweep order.
Useful? React with 👍 / 👎.
Add
/precheckand/probeentrypoints, silence successful precheck/probe notifications, and keep the execution path unchanged for the close-window run.Tests: