Skip to content

[codex] guard crypto equity combo exits and rotation config#56

Merged
Pigbibi merged 1 commit into
mainfrom
codex/crypto-equity-combo-guarded
Jul 4, 2026
Merged

[codex] guard crypto equity combo exits and rotation config#56
Pigbibi merged 1 commit into
mainfrom
codex/crypto-equity-combo-guarded

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Apply BTC Z-Score exit exposure to the combo BTC target instead of leaving it only in metadata.
  • Filter trend-only kwargs away from BTC DCA and avoid duplicate DCA kwargs that caused plan fallback.
  • Pass trend rotation controls through the combo leg and add regression coverage for Z-Score and rotation refresh lock behavior.

Test Plan

  • PYTHONPATH=src:/Users/lisiyi/Projects/QuantPlatformKit/src python3 -m pytest -q tests
  • python3 -m ruff check .
  • PYTHONPATH=/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/CryptoStrategies/src python3 -m pytest -q tests/test_runtime_config_support.py tests/test_strategy_loader.py tests/test_strategy_runtime.py tests/test_notify_i18n.py in BinancePlatform
  • PYTHONPATH=src:scripts python3 scripts/research_crypto_combo_backtest.py --json-output

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 139681b into main Jul 4, 2026
3 checks passed
@Pigbibi Pigbibi deleted the codex/crypto-equity-combo-guarded branch July 4, 2026 03:17

@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: 091b4657ef

ℹ️ 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 +467 to +468
zscore_exit_allow_outside_execution_window=bool(
config.get("zscore_exit_allow_outside_execution_window", 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 Forward the strategy date into the DCA overlay

When zscore_exit_allow_outside_execution_window is set to False, the downstream BTC DCA plan decides whether the Z-score overlay is in-window from its as_of argument (kwargs.get("as_of")); this entrypoint now forwards the flag but still never forwards ctx.as_of, so the DCA code falls back to the wall-clock date. Backtests/replays or delayed evaluations can therefore skip or apply the combo BTC exit based on today rather than the StrategyContext date; pass as_of=ctx.as_of with the DCA-related kwargs.

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