Skip to content

Surface TQQQ risk controls in notifications#142

Merged
Pigbibi merged 4 commits into
mainfrom
codex/tqqq-risk-control-notices
Jun 9, 2026
Merged

Surface TQQQ risk controls in notifications#142
Pigbibi merged 4 commits into
mainfrom
codex/tqqq-risk-control-notices

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • surface TQQQ volatility-delever diagnostics through decision mapping and notification rendering
  • add bilingual risk-control notification copy, including hysteresis-hold wording
  • report small-account whole-share cash retention as an explanatory note instead of showing only no rebalance
  • bump QuantPlatformKit and UsEquityStrategies pins so live Docker installs the merged QPK#88 and UsEquityStrategies#111 changes

Tests

  • PYTHONPATH=/home/ubuntu/Projects/LongBridgePlatform:/home/ubuntu/Projects/QuantPlatformKit/src:/home/ubuntu/Projects/UsEquityStrategies/src:/home/ubuntu/Projects/HkEquityStrategies/src /home/ubuntu/Projects/UsEquitySnapshotPipelines/.venv/bin/python -m unittest tests.test_decision_mapper.DecisionMapperTests.test_maps_hybrid_decision_from_snapshot_source tests.test_notifications.NotificationTests.test_heartbeat_renders_tqqq_volatility_delever_risk_control tests.test_notifications.NotificationTests.test_heartbeat_renders_tqqq_volatility_delever_hysteresis_risk_control tests.test_rebalance_service.RebalanceServiceNotificationTests.test_tqqq_delevered_qqq_target_below_one_share_reports_cash_reason tests.test_rebalance_service.RebalanceServiceNotificationTests.test_tqqq_delevered_qqqm_target_is_executable_for_small_account
  • /home/ubuntu/Projects/UsEquitySnapshotPipelines/.venv/bin/python -m py_compile decision_mapper.py tests/test_decision_mapper.py

@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: 779ebbe817

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

"risk_control_tqqq_volatility_delever_applied",
window=window,
volatility=_format_percent(execution.get("dual_drive_volatility_delever_metric")),
threshold=_format_percent(execution.get("dual_drive_volatility_delever_threshold")),

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 Show the effective dynamic delever threshold

When the TQQQ profile runs in rolling_percentile mode, the strategy emits both the fixed fallback dual_drive_volatility_delever_threshold and the effective dual_drive_volatility_delever_dynamic_threshold; this line always renders the fixed fallback. In cycles where the rolling p90 threshold differs from 28%, the alert will say the volatility crossed the wrong threshold even though the effective threshold is already copied into execution, so the risk-control notification can mislead operators about why the delever happened.

Useful? React with 👍 / 👎.

@Pigbibi Pigbibi merged commit 7b2f9ee into main Jun 9, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/tqqq-risk-control-notices branch June 9, 2026 05:39
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