Skip to content

Include dynamic volatility context in Telegram logs#78

Merged
Pigbibi merged 1 commit into
mainfrom
telegram-dynamic-volatility-context-20260610
Jun 9, 2026
Merged

Include dynamic volatility context in Telegram logs#78
Pigbibi merged 1 commit into
mainfrom
telegram-dynamic-volatility-context-20260610

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add SOXL dynamic volatility Telegram translations in zh/en
  • include dynamic threshold fields in signal_snapshot logs
  • add snapshot coverage for rolling-threshold metadata

Verification

  • PYTHONPATH=/home/ubuntu/Projects/QuantPlatformKit/src python -m pytest tests/test_signal_snapshot.py -q
  • PYTHONPATH=/home/ubuntu/Projects/QuantPlatformKit/src python - <<'PY' ... direct build_translator smoke test
  • python -m py_compile notifications/telegram.py application/signal_snapshot.py tests/test_rebalance_service.py tests/test_signal_snapshot.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: b79a863596

ℹ️ 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 notifications/telegram.py
"blend_gate_reason_rsi_cap": "RSI 超阈值",
"blend_gate_reason_bollinger_cap": "突破布林上轨",
"blend_gate_reason_volatility_delever": "{symbol} {window} 日年化波动率 {volatility} 高于 {threshold},SOXL 转向 {redirect_symbol}",
"blend_gate_reason_volatility_delever_dynamic": "{symbol} {window} 日年化波动率 {volatility} 高于实际阈值 {threshold}({threshold_detail}),SOXL 转向 {redirect_symbol}",

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 Localize nested threshold detail before formatting

When the strategy emits this new dynamic volatility reason in the same structured signal_display format used by the rest of the Telegram renderer, threshold_detail is another translation key such as blend_gate_volatility_threshold_detail_dynamic: .... _localize_structured_text only recursively localizes reason/reasons, so this template inserts that raw key and arguments into the alert instead of the intended human-readable dynamic/fixed threshold text; the new Telegram context is therefore not actually readable for dynamic volatility signals unless threshold_detail is localized before formatting.

Useful? React with 👍 / 👎.

@Pigbibi Pigbibi merged commit 1c7bbad into main Jun 9, 2026
1 check passed
@Pigbibi Pigbibi deleted the telegram-dynamic-volatility-context-20260610 branch June 9, 2026 20:49
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