Ask HN: 我的多智能体金融情绪分析架构

1作者: CLCKKKKK6 个月前
Hello HN, 我是一名大学生,正在构建一个用于个人使用的金融情报终端。目标是在“内幕消息”和社交媒体上的情绪变化成为主流头条新闻之前捕捉它们。 我很乐意听取您对架构和逻辑的反馈。 技术栈: 后端:Python (PM2 管理) LLM:OpenAI GPT 5.2 用于高层次分析 + GPT-5-mini 用于新闻过滤和市场数据收集 (通过 API) 前端:Next.js + Tailwind + Recharts 架构 (有趣的部分): 1. 收集器 我没有立即调用 LLM,而是每 30 分钟运行一次原始抓取器,目标是: - Nitter 实例 (用于 Twitter/X 数据,没有 API 限制)。 - GNews RSS (用于官方头条新闻)。 - DuckDuckGo (用于一般论坛讨论)。 - 1 分钟 OHLC 数据 (通过 yfinance) 以监控价格微观结构。 2. Agentic 系统 我将分析分为两个角色: - 市场 Agent:分析 30 分钟窗口的 1 分钟 K 线数据。它寻找“V 型反弹”、“闪崩”或“量能耗尽”等模式 (这些是简单的百分比变化指标所遗漏的)。 - 新闻 Agent:分析来自抓取器的消息和事件,并可以确定是否在市场开盘期间唤醒待命的高级 Agent 以应对“紧急情况”。 - 高级 Agent:接收清理后的新闻流 + 市场 Agent 的技术总结。它生成一个情绪得分 (-10 到 +10) 和一个理由。如果价格在未来几个小时内可能会发生很大变化,它会创建一个“红色警报”。 - 待命 Agent:分析新闻并在互联网上搜索证据,以确定是否向用户发送警报。 3. 前端 为了更好地显示信息,我使用 Next.js + Tailwindcss 进行了前端代码编写。即将发布带有 i18n 的更新版本。 我对 HN 的问题: 延迟与深度:目前,AI 分析周期需要大约 3 分钟。对于“波段交易”来说,这很好,但如果有一种更好的模式可以流式传输部分更新到前端,而无需等待完整的分析完成,这会有帮助吗? 幻觉风险:我强制 LLM 验证日期,但有时它仍然将“重新发布的旧闻”视为新事件。你们如何为新闻 Agent 设计验证层? 实用性:我刚刚完成了这个 Agentic 系统,并且根据 Agentic 系统的信息,这是我第一天交易,目前盈利 +0.8%。我很乐意听取有更多交易经验的人的建议。此外,如果您想预览系统的输出,请随时与我联系。 一些截图在这里:https://x.com/CLCKKKKK/status/2006085046269337799?s=20 我的电子邮件:yiz29@illinois.edu 谢谢!
查看原文
Hello HN,<p>I’m a college student building a financial intelligence terminal for personal use. The goal is to capture &quot;whisper numbers&quot; and sentiment shifts in social media before they hit mainstream headlines.<p>I would love your feedback on the architecture and logic.<p>The Stack:<p>Backend: Python (PM2 managed)<p>LLM: OpenAI GPT 5.2 for high level analysis + GPT-5-mini for news filter and market data collection (via API)<p>Frontend: Next.js + Tailwind + Recharts<p>The Architecture (The interesting part):<p>1. The Collector<p>Instead of hitting the LLM immediately, I run a raw scraper every 30 minutes targeting:<p>- Nitter instances (for Twitter&#x2F;X data without API limits).<p>- GNews RSS (for official headlines).<p>- DuckDuckGo (for general forum chatter).<p>- 1-min OHLC Data (via yfinance) to monitor price micro-structure.<p>2. The Agentic System<p>I split the analysis into two roles:<p>- Market Agent: Analyzes the 30-minute window of 1-min candle data. It looks for patterns like &quot;V-shape recovery,&quot; &quot;Flash crash,&quot; or &quot;Volume exhaustion&quot; (things a simple % change metric misses).<p>- News Agent: Analyzes the messages and events from the scrapper, and it can determine whether to wake up on-call senior agent for &quot;emergency&quot; during market open time.<p>- Senior Agent: Receives the cleaned news stream + the Market Agent&#x27;s technical summary. It produces a Sentiment Score (-10 to +10) and a rationale. It creates a &quot;red alert&quot; if the price will probably be changing a lot in the next several hours.<p>- On-call Agent: Analyzes the news and search the internet for proofs and determine whether to send alert to users or not.<p>3. The Frontend<p>To better display information, I vibe coded a Next.js + Tailwindcss frontend. An updated version with i18n will soon be published.<p>My Questions for HN:<p>Latency vs. Depth: Currently, the AI analysis cycle takes ~3 minutes. For &quot;swing trading&quot; this is fine, but will it help if there&#x27;s a better pattern to stream partial updates to the frontend without waiting for the full analysis to complete?<p>Hallucination Risks: I force the LLM to verify dates, but sometimes it still treats a &quot;re-posted old news&quot; as a new event. How do you guys architect verification layers for news agents?<p>Practicability: I just finished this agentic system, and it&#x27;s my first day trading according to the info from the agentic system and it&#x27;s currently +0.8% profit. I&#x27;d love advice from someone with more trading experience. Also, feel free to reach out to me if you want a preview of the system&#x27;s output.<p>Some screenshots here: https:&#x2F;&#x2F;x.com&#x2F;CLCKKKKK&#x2F;status&#x2F;2006085046269337799?s=20<p>My email: yiz29@illinois.edu<p>Thanks!