feat: DSA full integration — mo_bridge v2 + strategy_lifecycle injection
mo_bridge.py (rewrite): - get_stock_news(): DSA SearchService 7 engines → MoFin analysis context - get_market_review(): DSA run_market_review() with 24h cache - get_stock_analysis(): DSA AgentExecutor.run() with 15 strategies - enrich_analysis_context(): one-call context injection strategy_lifecycle.py: - reassess_with_context() now injects DSA market + news context - Auto-detects HK vs A-share region for market review - Graceful fallback if DSA unavailable
This commit is contained in:
@@ -1282,6 +1282,17 @@ def reassess_with_context(code, name, price, cost, shares, current_action,
|
||||
news_sentiment = {}
|
||||
fund = {}
|
||||
|
||||
# ── DSA 集成:注入大盘复盘 + 新闻情报 ──────────────────────────
|
||||
try:
|
||||
from mo_bridge import enrich_analysis_context
|
||||
region = "hk" if len(str(code)) == 5 and str(code)[0] in ('0','1') else "cn"
|
||||
dsa_ctx = enrich_analysis_context(stock_code=code, stock_name=name,
|
||||
region=region, include_news=True)
|
||||
if dsa_ctx:
|
||||
macro_desc = (macro_desc + "\n\n" + dsa_ctx).strip()
|
||||
except Exception:
|
||||
pass # DSA 不可用时静默跳过
|
||||
|
||||
enriched, factors = enrich_timing_signal(
|
||||
base_signal=result.get("timing_signal", ""),
|
||||
macro_desc=macro_desc,
|
||||
|
||||
Reference in New Issue
Block a user