fix: inject specialist desks context into pattern suggestion prompt

suggest_patterns_from_market_context() was missing the specialist desk
block that score_patterns_with_context() already received. All 7 desks
(forex, metals, agri, energy, indices, crypto, bonds) with their
fundamentals, macro sensitivity, and upcoming reports are now injected
so the AI can generate targeted patterns per desk rather than generic ones.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OpenSquared
2026-06-23 13:41:50 +02:00
parent 91f12e177f
commit 70a9e2b569

View File

@@ -1480,6 +1480,11 @@ Additional rules:
portfolio_section = f"\n{portfolio_context_block}\n" if portfolio_context_block else ""
convergence_section = f"\n{convergence_block}\n" if convergence_block else ""
# Inject all specialist desks — helps AI generate patterns across all asset classes
_all_desks = {"forex", "metals", "agri", "energy", "indices", "crypto", "bonds"}
specialist_block_suggest = _build_specialist_context_block(_all_desks)
specialist_section = f"\n{specialist_block_suggest}\n" if specialist_block_suggest else ""
_sg_budget = _cycle_meta.get("trade_budget_eur", 5000)
_sg_h_min = _cycle_meta.get("preferred_horizon_min", 30)
_sg_h_max = _cycle_meta.get("preferred_horizon_max", 180)
@@ -1494,7 +1499,7 @@ Additional rules:
user = f"""You are a senior geopolitical and financial strategist, expert in options.
{_suggest_mandate}
{macro_block}{geo_block}{lessons_block}{reliability_block}{iv_block}
{macro_block}{geo_block}{lessons_block}{reliability_block}{iv_block}{specialist_section}
{temporal_news_block}
## Market prices (D-1 change)
{market_block}