checking system…
Docs / back / config/arenas/news_event.yaml · line 1
YAML · 110 lines
  1name: news_event
  2description: |
  3  Given a news event or headline, identify which tickers are affected,
  4  in what direction, and at what magnitude. Lightweight — one analyst,
  5  one synthesis — designed to be fired off triggers when a high-impact
  6  wire item lands.
  7
  8  Target shapes accepted:
  9    target = {"event_id": "fed-2026-05-20", "text": "Fed signals rate cut by Q4"}
 10    target = {"text": "NVDA reports record AI revenue, raises guidance"}
 11
 12  Outputs a Prognosis envelope: no BUY/SELL/HOLD (this is an impact map,
 13  not a trade), but the impacted_tickers list is carried in
 14  Prognosis.ideas for downstream consumption.
 15
 16schedule: null
 17output_stream: "maf:arena:news_event:output"
 18max_iterations: 1
 19# target_key is `text` — both triggers and the run dialog always supply
 20# this field. `event_id` is optional metadata when the caller has one;
 21# Target.from_dict still classifies the run as type=event when it's
 22# present.
 23target_key: text
 24applicable_target_types: ["event", "free_text"]
 25
 26llm:
 27  default_provider: ollama
 28  quick_provider: ollama
 29  quick_model: "auto"
 30  deep_provider: ollama
 31  deep_model: "auto"
 32  providers:
 33    ollama:
 34      api_key: "${OLLAMA_API_KEY}"
 35      model: "auto"
 36      base_url: "https://ollama.com/v1"
 37      max_output_tokens: 6144
 38      temperature: 0.3
 39
 40memory: {}
 41
 42sources:
 43  - name: latest_news
 44    adapter: trtools2_news
 45    config: { count: 50 }
 46  - name: knowledge_base
 47    adapter: fomo2_knowledge
 48    config: {}
 49  - name: macro_context
 50    adapter: fred_api
 51    config: {}
 52  - name: web
 53    adapter: web_search
 54    config: {}
 55  - name: eodhd_news
 56    adapter: eodhd
 57    config: { tool: get_news }
 58  - name: eodhd_resolve_ticker
 59    adapter: eodhd
 60    config: { tool: resolve_ticker }
 61
 62# Smart triggers — auto-fire on high-impact news items or on a wire
 63# headline that mentions multiple tickers.
 64triggers:
 65  - name: "high-impact news sentiment"
 66    on_stream: "trtools2:news"
 67    when: "abs(payload.sentiment) > 0.7"
 68    target:
 69      text: "{payload.headline}"
 70    cooldown_s: 120
 71    action_mode: manual
 72  - name: "fomo2 report  propagate as event"
 73    on_stream: "fomo2:reports"
 74    when: "payload.report_id != None"
 75    target:
 76      event_id: "{payload.report_id}"
 77    cooldown_s: 60
 78    action_mode: manual
 79
 80phases:
 81  - name: analysis
 82    pattern: sequential
 83    transition: synthesis
 84    agents:
 85      - name: event_impact_analyst
 86        role: specialist
 87        system_prompt_file: src/maf/prompts/anthropic_fs/agents/event_impact_analyst.md
 88        sources:
 89          - latest_news
 90          - knowledge_base
 91          - macro_context
 92          - web
 93          - eodhd_news
 94          - eodhd_resolve_ticker
 95        llm_tier: deep
 96        max_react_steps: 6
 97
 98  - name: synthesis
 99    pattern: sequential
100    transition: END
101    agents:
102      - name: synthesis_agent
103        role: synthesis
104        # Dedicated MAF-native event-synthesis prompt — propagates
105        # impacted_tickers into Prognosis.ideas and leaves
106        # synthesis_verdict None (this arena does not emit BUY/HOLD/SELL).
107        system_prompt_file: src/maf/prompts/anthropic_fs/agents/event_synthesis.md
108        llm_tier: quick
109        max_react_steps: 1