1name: sector_pulse 2description: | 3 Agnostic pulse arena that works on either a single ticker or a sector. 4 5 Target shapes accepted (auto-detected by Target.from_dict): 6 target = {"ticker": "NVDA"} # type=ticker 7 target = {"sector": "AI semis", "tickers": ["NVDA","AMD","AVGO"]} # type=sector 8 target = {"tickers": ["NVDA","AMD","AVGO"]} # type=tickers 9 10 Demonstrates the auto-prune pattern: specialists declare which target 11 types they apply to via ``applicable_target_types``. At runtime the 12 arena builds a pruned phase graph — ticker-only specialists are skipped 13 on sector runs and vice versa. 14 15 Outputs a Prognosis envelope: BUY/SELL/HOLD for ticker mode, a 16 structured statement + peer-set ideas for sector mode. 17 18schedule: null 19output_stream: "maf:arena:sector_pulse:output" 20max_iterations: 1 21applicable_target_types: ["ticker", "sector", "tickers"] 22 23llm: 24 default_provider: ollama 25 quick_provider: ollama 26 quick_model: "auto" 27 deep_provider: ollama 28 deep_model: "auto" 29 providers: 30 ollama: 31 api_key: "${OLLAMA_API_KEY}" 32 model: "auto" 33 base_url: "https://ollama.com/v1" 34 max_output_tokens: 8192 35 temperature: 0.3 36 37memory: {} 38 39# Sources — superset of what either mode needs. Auto-prune at the agent 40# layer keeps each specialist focused. 41sources: 42 # Ticker-mode sources (1m pulse around a single name) 43 - name: bars_1m 44 adapter: trtools2_bars 45 config: { timeframe: 1m, count: 80 } 46 applicable_target_types: ["ticker"] 47 - name: indicators 48 adapter: trtools2_indicators 49 config: { count: 50 } 50 applicable_target_types: ["ticker"] 51 - name: kronos_forecast_1m 52 adapter: kronos_forecast 53 config: { timeframe: 1m } 54 applicable_target_types: ["ticker"] 55 - name: mirofish_crowd 56 adapter: mirofish_sim 57 config: {} 58 applicable_target_types: ["ticker"] 59 60 # Sector-mode sources (peer comps + landscape) 61 - name: peer_snapshot 62 adapter: trtools2_api 63 config: { query_type: snapshot } 64 applicable_target_types: ["sector", "tickers"] 65 - name: peer_bars_history 66 adapter: trtools2_api 67 config: { query_type: bars, timeframe: 1d, lookback_days: 30 } 68 applicable_target_types: ["sector", "tickers"] 69 - name: macro_context 70 adapter: fred_api 71 config: {} 72 applicable_target_types: ["sector", "tickers"] 73 - name: sector_graph 74 adapter: fomo2_knowledge 75 config: {} 76 applicable_target_types: ["sector"] 77 78 # Universal sources (any target type) 79 - name: latest_news 80 adapter: trtools2_news 81 config: { count: 30 } 82 # no applicable_target_types → applies to all 83 - name: eodhd_fundamentals 84 adapter: eodhd 85 config: { tool: get_fundamentals } 86 - name: eodhd_news 87 adapter: eodhd 88 config: { tool: get_news } 89 90# Smart triggers — auto-fire on Kronos directional calls (ticker mode) or 91# MiroFish crowd-sim tagging multiple tickers (sector mode). 92triggers: 93 - name: "kronos high-confidence ticker pulse" 94 on_stream: "kronos:forecasts:emitted" 95 when: "payload.prob_up > 0.75 or payload.prob_up < 0.25" 96 target: 97 ticker: "{payload.symbol}" 98 cooldown_s: 120 99 action_mode: semi 100 - name: "mirofish multi-ticker sector hint" 101 on_stream: "mirofish:sims:emitted" 102 when: "payload.tickers != [] and payload.tickers != None" 103 target: 104 tickers: "{payload.tickers}" 105 cooldown_s: 300 106 action_mode: manual 107 108phases: 109 - name: analysis 110 pattern: parallel 111 transition: synthesis 112 agents: 113 # Ticker-mode specialists — auto-pruned for sector/tickers targets 114 - name: price_pulse 115 role: specialist 116 applicable_target_types: ["ticker"] 117 sources: [bars_1m, indicators, kronos_forecast_1m] 118 system_prompt_file: src/maf/arenas/trading_intelligence/prompts/price_analyst.txt 119 llm_tier: quick 120 max_react_steps: 3 121 - name: kronos_specialist 122 role: specialist 123 applicable_target_types: ["ticker"] 124 sources: [kronos_forecast_1m] 125 system_prompt_file: src/maf/arenas/trading_intelligence/prompts/kronos_specialist.txt 126 llm_tier: quick 127 max_react_steps: 2 128 - name: crowd_proxy 129 role: specialist 130 applicable_target_types: ["ticker"] 131 sources: [mirofish_crowd] 132 system_prompt_file: src/maf/arenas/trading_intelligence/prompts/crowd_proxy.txt 133 llm_tier: quick 134 max_react_steps: 2 135 136 # Sector-mode specialists — auto-pruned for single-ticker targets 137 - name: sector_reader 138 role: specialist 139 applicable_target_types: ["sector", "tickers"] 140 sources: [latest_news, sector_graph, macro_context, eodhd_news] 141 system_prompt_file: src/maf/prompts/anthropic_fs/agents/sector_reader.md 142 llm_tier: deep 143 max_react_steps: 5 144 - name: comps_spreader 145 role: specialist 146 applicable_target_types: ["sector", "tickers"] 147 sources: [peer_snapshot, peer_bars_history, eodhd_fundamentals] 148 system_prompt_file: src/maf/prompts/anthropic_fs/agents/comps_spreader.md 149 llm_tier: quick 150 max_react_steps: 5 151 152 # Universal: news + fundamentals analyst runs in both modes 153 - name: news_analyst 154 role: specialist 155 # no applicable_target_types → runs for any target 156 sources: [latest_news, eodhd_news, eodhd_fundamentals] 157 system_prompt_file: src/maf/arenas/trading_intelligence/prompts/news_analyst.txt 158 llm_tier: quick 159 max_react_steps: 3 160 161 - name: synthesis 162 pattern: sequential 163 transition: END 164 agents: 165 - name: synthesis_agent 166 role: synthesis 167 # Uses the Anthropic-FS note_writer for sector/tickers, default for ticker 168 # (synthesis_agent reads whatever signals are present so this is safe) 169 system_prompt_file: src/maf/arenas/trading_intelligence/prompts/synthesis_agent.txt 170 llm_tier: deep 171 max_react_steps: 1