Surface TQQQ risk controls in notifications#142
Conversation
There was a problem hiding this comment.
💡 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")), |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Tests