Fix DCA-derived IBIT zscore settings#143
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR ReviewPlease ensure a human reviewer checks this PR before merging. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2afbebe8b
ℹ️ 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".
| dca_controls = _extract_dca_control_fields(extra_variables) | ||
| ibit_zscore_exit_controls = _extract_ibit_zscore_exit_control_fields(extra_variables) | ||
| _extract_ibit_zscore_exit_control_fields(extra_variables) | ||
| effective_dca_mode = _effective_dca_mode(args, runtime_target["strategy_profile"], dca_controls) |
There was a problem hiding this comment.
Honor preserved smart DCA when deriving IBIT Z-score
When an IBIT account already has DCA_MODE=smart and the dispatch omits DCA controls (for example, a manual run that only changes reserved cash or execution mode), this defaults effective_dca_mode to fixed before reading/preserving the existing variable. Later _dca_extra_variables omits DCA_MODE, so _preserve_reserved_cash_fields keeps the old smart DCA value, but the plugin mounts, scheduler, and IBIT_ZSCORE_EXIT_* variables were generated for fixed mode, leaving a smart-DCA account with the z-score plugin disabled and the monthly scheduler. Derive this from the current/preserved DCA setting or require the DCA control whenever these derived settings are recomputed.
Useful? React with 👍 / 👎.
Summary
Validation