Skip to content

feat: harden SOXL RSI2 compounding acceptance#290

Closed
Pigbibi wants to merge 2 commits into
mainfrom
codex/t4s5-soxl-constrained-compounding-v1-20260723
Closed

feat: harden SOXL RSI2 compounding acceptance#290
Pigbibi wants to merge 2 commits into
mainfrom
codex/t4s5-soxl-constrained-compounding-v1-20260723

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Implements the frozen T4/S5 acceptance hardening for research-only SOXL RSI(2) evidence.\n\nValidation: focused pytest, cached Ruff, compileall, and git diff --check.

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

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

🤖 Codex PR Review

🚫 Merge blocked: 1 serious issue(s) found in high-risk files

🚫 Blocking Issues

These issues must be fixed before this PR can be merged:

1. 🟠 [HIGH] Reliability in src/us_equity_strategies/research/soxl_core_optimization.py

This changes the outcome value on the success path from CHARACTERIZATION_CANDIDATE_FOUND to COMPOUNDING_CANDIDATE_FOUND while keeping schema at qsl.research.soxl_rsi2_mean_reversion.v1. Any current v1 consumer keyed to the old enum will now misclassify or reject successful results on this reachable branch, which is a wire-compatibility break under an unchanged contract. (line 1065)

Suggestion: Keep the existing success enum for the v1 payload, or bump the schema/version and update all readers/readback code to accept the new enum before emitting it.

ℹ️ Other Findings

1. 🟡 [MEDIUM] Reliability in src/us_equity_strategies/research/soxl_core_optimization.py

The new winner is None branch emits the same v1 schema with locked_winner: null and an evidence_gates object reduced to a single key. This PR treats that branch as a normal evidence_valid=True result, so existing v1 readers that deserialize locked_winner as a string or expect the full gate map can now fail or silently drop diagnostics on that path. (line 1007)

Suggestion: Preserve the existing field types and key set for the v1 contract on the no-winner branch, or publish this shape change under a new schema version and migrate consumers explicitly.


Review by Codex PR Review bot • PR

@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: 7420f39d0e

ℹ️ 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".

Comment thread src/us_equity_strategies/research/soxl_core_optimization.py
Comment thread src/us_equity_strategies/research/soxl_core_optimization.py Outdated
Co-Authored-By: Codex <noreply@openai.com>

@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: df47e8fcd7

ℹ️ 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".

Comment on lines +920 to +922
metrics = _volatility_metrics_with_soxx(points, soxx, raw_start, raw_end)
selected_points = points[raw_start - BASELINE_WINDOW_DAYS:raw_end - BASELINE_WINDOW_DAYS + 1]
selected_soxx = soxx[raw_start - 1:raw_end + 1]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Include the prior close in the SOXX drawdown path

selected_soxx correctly starts at raw_start - 1 for the new return/CAGR comparisons, but metrics is built with _volatility_metrics_with_soxx, whose SOXX drawdown still starts at raw_start. Thus, when SOXX falls on the first session of a validation/test/holdout window, the strategy drawdown includes that session relative to its prior-session starting equity while soxx_close_path_max_drawdown omits it. The new final-holdout drawdown gate can therefore incorrectly reject a candidate (or report an incorrect benchmark-relative drawdown); compute the benchmark drawdown over the same prior-close-to-final-close path.

Useful? React with 👍 / 👎.

@Pigbibi Pigbibi closed this Jul 23, 2026
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