You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(sentiment): harden news layer -- market-flow filter, evidence floor, event-override off by default
Follow-up to the 2026-06-15 M27 sentiment IC diagnosis. The event_taxonomy
0.65 override was measured net-negative for IC across every variant tested
(event delta -0.0027 / -0.0146 / -0.0280), and noisy non-company headlines
drove individual-stock whipsaws (兆易 603986: 2 sector-IPO headlines, 0 company
news -> -71.3 sentiment).
Changes:
- event_taxonomy: market/fund-flow/list headlines are filtered before
classification so they cannot misfire as hard corporate events (for example,
"下滑" inside "市场下滑"). Adds is_market_flow / is_company_specific /
company_specific_titles helpers.
- event_score: the 0.65 override blend is now gated by
settings.sentiment_event_override_enabled (default OFF). Matched event types
are still reported for observability; raw sentiment is kept. Re-enableable for
a clean single-provider OOS re-test.
- sentiment.analyze_news: evidence floor returns neutral 0 and skips the LLM
when a window has no company-specific headline. Mixed windows now send only
company-specific titles into the LLM prompt/cache/event scoring.
- postmarket and backtest news-cache paths pass stock name+symbol aliases when
available, so cross-company contamination filtering is not production-only.
- m27_alpha_diagnostic --event-ab forces the override ON so it keeps measuring
the override's counterfactual IC effect independent of the production default.
Verification:
- PYTHONPATH=. pytest -q tests/test_news_sentiment_pack.py tests/test_m27_alpha_event_universe.py tests/test_m27_m28_integration.py tests/test_tavily_news.py tests/test_sentiment_cache.py tests/test_llm_runtime_provider.py
-> 46 passed / 1 skipped
- make verify PYTHON=/Users/zeeechenn/mingcang/.venv/bin/python
-> ruff clean, mypy clean, backend pytest 1224 passed / 6 skipped; local
frontend step not runnable in this linked worktree because frontend
node_modules is absent
- GitHub Actions on PR #20 after force-push -> backend lint/typecheck, backend
tests, frontend test/build, and security/dependency audit all passed for both
push and pull_request runs
This is a defensive change (removes a measured drag + adds robustness); it does
not manufacture new sentiment alpha. Production adoption for live test2 signals
should wait for a clean single-provider OOS confirmation (epoch reset).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments