Investment Scanner
确定性金融投资信号扫描工作流。双数据源(Google News RSS + blogwatcher RSS)+ 聚簇引擎 + LLM 格式化输出。
架构
Google News RSS (6源: Funding/M&A/IPO/AI Tech/Energy/Biotech)
↓
过滤 + 行业分类
↓
┌─── 聚簇引擎(实体提取 + Jaccard token 相似度)───┐
│ │
blogwatcher RSS (9源: FT/WSJ/Bloomberg/TC/BI 等) ←──┘
↓
LLM 格式化 → 中文投资信号日报
安装步骤
1. 复制 skill 到 Hermes skills 目录
# Mac
cp -r investment-scanner ~/.hermes/skills/finance/investment-scanner
# Windows
cp -r investment-scanner ~/AppData/Local/hermes/skills/finance/investment-scanner
2. 安装 Python 依赖
pip install feedparser requests
3. 安装 blogwatcher-cli(完整双源必需)
blogwatcher 提供 9 个高质量金融 RSS 源(FT、WSJ、Bloomberg 等),未安装时脚本只走 Google News 6 源。
# Mac
brew install blogwatcher-cli
# 或
go install github.com/nicobk/blogwatcher-cli@latest
# Windows (winget)
winget install blogwatcher-cli
# 或下载 release: https://github.com/nicobk/blogwatcher-cli/releases
安装后验证:
blogwatcher-cli --version
4. 配置 blogwatcher 源
脚本会自动使用 ~/.config/hermes/skills/blogwatcher/ 下的配置。如果你是全新安装,需要先添加金融 RSS 源:
blogwatcher-cli add --url "https://www.ft.com/rss/home" --name "FT"
blogwatcher-cli add --url "https://feeds.a.dj.com/rss/RSSMarketsMain.xml" --name "WSJ"
blogwatcher-cli add --url "https://www.bloomberg.com/feed/podcast/etf-report.xml" --name "Bloomberg"
blogwatcher-cli add --url "https://techcrunch.com/feed/" --name "TechCrunch"
blogwatcher-cli add --url "https://www.businessinsider.com/feed" --name "BusinessInsider"
blogwatcher-cli add --url "https://search.cnbc.com/rs/search/combinedcms/view.xml?partnerId=wrss01&id=10001147" --name "CNBC"
blogwatcher-cli add --url "https://finance.yahoo.com/news/rssindex" --name "YahooFinance"
blogwatcher-cli add --url "https://www.theinformation.com/feed" --name "TheInformation"
blogwatcher-cli add --url "https://www.ft.com/alphaville?format=rss" --name "FTAlphaville"
5. 代理配置(blogwatcher 需要)
blogwatcher 的 Go HTTP 客户端默认不跟随 RSS 重定向,需要配合代理使用:
export HTTP_PROXY=http://127.0.0.1:7897
export HTTPS_PROXY=http://127.0.0.1:7897
首次运行时加上 --unsafe-client 标志:
blogwatcher-cli --unsafe-client scan
使用方式
手动运行
cd ~/.hermes/skills/finance/investment-scanner/scripts
python investment_scanner.py
输出 JSON 到 stdout,日志到 stderr。
历史模式(回溯 N 个月)
python investment_scanner.py --historical 3
需要 mimo_search.py 在同目录下。
定时任务
通过 Hermes cron 设置:
schedule: "25 9 * * 1,3,5" # 每周一三五 9:25
script: investment_scanner.py
输出格式
{
"scan_time": "ISO时间",
"cutoff": "起始时间",
"total_fetched": 总抓取数,
"total_matched": 过滤后数,
"signals": [
{
"title": "标题",
"sector": "行业分类",
"amount": "金额(如有)",
"source": "来源",
"link": "链接",
"cluster_size": 聚簇大小,
"cluster_sources": ["来源1", "来源2"]
}
]
}
行业分类
AI/半导体、新能源、医药生物、军工国防、金融科技、矿业资源、消费科技、其他
LLM 格式化 Prompt
运行脚本后,将 JSON 输出交给 LLM,按以下要求格式化:
- 按行业分类列出最重要的 5-10 条信号
- 有金额的优先展示
- 每条一行,格式:🔴/🟡/🟢 + 行业 + 标题 + 金额(如有)+ 来源
- 红色=重大(>$1B 或行业巨头),黄色=中等,绿色=一般
- 多源合并的事件标注「多源确认」
- 最后附一句市场情绪总结
注意事项
- Reuters RSS 已关闭(404),暂无替代
- blogwatcher Go 客户端默认不跟随重定向,需
--unsafe-client+ 代理 - 聚簇引擎使用 Union-Find 算法,阈值:entity_sim ≥ 0.50,token_sim ≥ 0.30
- Windows 上 blogwatcher 路径:
~/.local/bin/blogwatcher-cli.exe - Mac 上 blogwatcher 路径:
/usr/local/bin/blogwatcher-cli