Skip to content

[codex] Align leveraged combo regime inputs#199

Merged
Pigbibi merged 1 commit into
mainfrom
codex/us-leveraged-combo-regime-402040
Jul 4, 2026
Merged

[codex] Align leveraged combo regime inputs#199
Pigbibi merged 1 commit into
mainfrom
codex/us-leveraged-combo-regime-402040

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • align us_equity_combo_leveraged runtime regime logic with the researched dynamic rule: SPY/QQQ/SOXX MA200 hard defense plus MA20 slope soft-defense metadata
  • add us_equity_combo_leveraged_shadow_402040 config for the 40/20/40 shadow candidate
  • keep existing 35/20/45 config available and update docs/tests

Validation

  • PYTHONPATH=src python3 -m pytest -q → 343 passed, 327 subtests passed
  • python3 -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 → passed
  • git diff --check → passed

Notes

  • This does not enable live trading.
  • 40/20/40 remains shadow_candidate; live promotion still requires platform dry-run evidence and manual approval.

Co-Authored-By: Codex <noreply@openai.com>
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

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.

@Pigbibi Pigbibi merged commit cd959e3 into main Jul 4, 2026
2 checks passed
@Pigbibi Pigbibi deleted the codex/us-leveraged-combo-regime-402040 branch July 4, 2026 14:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant