refactor(notifications): migrate to shared renderer_base#308
Conversation
…-share compatibility QQQM (TQQQ's unlevered sleeve in tqqq_growth_income) was not in the whole-share retention whitelist. When the strategy's target for QQQM was below 1 share price, the small account compatibility layer zeroed the target, creating an artificial sell signal. After selling, the system couldn't buy back because the target (below 1 share) couldn't be fulfilled, leaving the account in cash. Add QQQM to: - SMALL_ACCOUNT_EXISTING_WHOLE_SHARE_RETENTION_SYMBOLS (unconditional) - SMALL_ACCOUNT_EXISTING_WHOLE_SHARE_RETENTION_MIN_TARGET_SHARE_RATIO_BY_SYMBOL (0.85) - SMALL_ACCOUNT_WHOLE_SHARE_BOOTSTRAP_MIN_TARGET_SHARE_RATIO_BY_SYMBOL (0.85) Co-Authored-By: Claude <noreply@anthropic.com>
|
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. |
This comment has been minimized.
This comment has been minimized.
0c0149a to
d054f39
Compare
|
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. |
Replace the per-symbol hardcoded whitelist with a universal rule: if the account already holds a symbol (>0 shares) AND the strategy wants to keep >= 85% of 1 share's value, retain the position. This prevents the sell-then-fail-to-rebuy cycle for ALL symbols, not just those in the whitelist. Genuine reductions (target << 85% of 1 share) are NOT blocked — the sell proceeds normally. The 0.85 default threshold means: - QQQM $262.74 target vs $292.42 price → 90% → retain - SOXX $155 target vs $537 price → 29% → sell (genuine reduction) Legacy whitelist (TQQQ, SOXL) and per-symbol ratio overrides (e.g. SOXX:0.90) are kept as safety nets. Co-Authored-By: Claude <noreply@anthropic.com>
d054f39 to
abc2d36
Compare
|
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. |
Co-Authored-By: Claude <noreply@anthropic.com>
|
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. |
Co-Authored-By: Claude <noreply@anthropic.com>
|
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. |
Summary
Replace duplicated helpers with imports from
quant_platform_kit.notifications.renderer_base.Depends on: QuantPlatformKit#200
Changes
notifications/renderers.py: 681 → 427 lines (-254)_LONG_BRIDGE_ZH_NOTIFICATION_REPLACEMENTS_format_source_input_line/_append_source_input_line_build_benchmark_lines/_has_benchmark_context_localize_timing_contractthin wrapper (LB notification localisation fallback)🤖 Generated with Claude Code