[codex] Align leveraged combo regime inputs#199
Conversation
Co-Authored-By: Codex <noreply@openai.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 117c156416
ℹ️ 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".
| def _resolve_regime(market_data: dict[str, Any] | None) -> dict[str, object]: | ||
| raw = market_data if isinstance(market_data, dict) else {} | ||
| above_ma200 = { | ||
| symbol: _market_bool(raw, f"{symbol.lower()}_above_ma200", True) |
There was a problem hiding this comment.
Require the new regime inputs before defaulting risk-on
When the platform sends the prior SPY-only market_data (the manifest/entrypoint still only require the generic market_data input), this True fallback marks any missing QQQ/SOXX MA200 field as above trend. For the new 352045/402040 shadow configs that claim the backtest used SPY/QQQ/SOXX hard-defense inputs, a dry-run can therefore remain risk-on during a QQQ or SOXX MA200 break instead of failing fast or entering hard defense, invalidating the shadow observation.
Useful? React with 👍 / 👎.
Summary
us_equity_combo_leveragedruntime regime logic with the researched dynamic rule: SPY/QQQ/SOXX MA200 hard defense plus MA20 slope soft-defense metadataus_equity_combo_leveraged_shadow_402040config for the 40/20/40 shadow candidateValidation
PYTHONPATH=src python3 -m pytest -q→ 343 passed, 327 subtests passedpython3 -m ruff check src/us_equity_strategies/strategies/us_equity_combo_leveraged.py src/us_equity_strategies/combo_entrypoints.py tests/test_us_equity_combo.py→ passedgit diff --check→ passedNotes
shadow_candidate; live promotion still requires platform dry-run evidence and manual approval.