财经新闻深度分析技能
v1.0.1财经新闻深度分析技能。从多个财经源抓取内容,进行情感分析(利好/利空/中性)、影响评估(行业/公司/市场)、关键信息提取,生成专业投资简报。支持 A 股/港股/美股、行业板块、个股分析。
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description match the provided code and SKILL.md: the code includes source lists, stock mapping, sentiment rules and report generation. The declared capabilities (scrape 12+ finance sources, sentiment/impact analysis, stock mapping) align with the code and instructions. One minor note: SKILL.md mentions optional API integrations (e.g., 财联社 API, 聚宽) but the skill does not declare or require any env vars for API keys.
Instruction Scope
Instructions direct the agent to scrape web sources (via an OpenClaw browser tool or RSS/API), run fetch_news.py, and save reports/caches under finance-news/. This is within the stated purpose. The skill also defines broad auto-trigger keywords (many company/industry names), so it may activate frequently when those appear in conversation — not malicious but a privacy/verbosity consideration. The workflow references writing/reading config.json, cache/, and reports/ (expected for this functionality).
Install Mechanism
No install spec — files are included and the runtime uses only Python standard library by default. requirements.txt lists optional third-party packages but does not force downloads. No remote download/execute behavior or non-standard installers were present.
Credentials
The skill requests no environment variables or credentials (primary credential: none), which is appropriate for pure web-scraping. SKILL.md mentions optional third-party APIs that ‘‘need Key’’ but these are optional and not declared as required env vars — the mismatch is a small transparency issue (you should only supply keys if you intend to enable those integrations).
Persistence & Privilege
always is false. disable-model-invocation is false (normal) so the agent may invoke the skill autonomously when triggers match. The skill writes its own reports/cache under its directory (normal). It does not request system-wide config changes or cross-skill credentials.
Assessment
This skill appears to do what it says: scrape public finance sites, run keyword-based sentiment/impact analysis, associate stocks, and save reports locally. Before installing: (1) Be aware it will write files under a local finance-news/ directory (reports and cache). (2) It can be configured to use optional APIs that require keys — only provide API keys if you trust the skill and know which service the key is for; the skill does not require any credentials by default. (3) The skill defines many trigger keywords (company names, industries) and may activate frequently in conversational contexts — if you want to limit auto-invocation, adjust triggers or disable autonomous invocation. (4) If you plan to run cron jobs, review the cron payloads to ensure they only call the intended script. (5) As always when running web-scrapers, confirm you comply with the target sites' terms of service. If you want higher assurance, inspect the full fetch_news.py implementation (network calls and parsing) or run it in a sandboxed environment first.Like a lobster shell, security has layers — review code before you run it.
latest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Finance News Pro - 财经新闻深度分析
专业级财经新闻聚合与分析,为投资决策提供信息优势。
🎯 核心优势(相比 news-aggregator)
| 维度 | news-aggregator | finance-news-pro |
|---|---|---|
| 财经源数量 | 3 个(墙街见闻等) | 12+ 专业财经源 |
| 情感分析 | ❌ 无 | ✅ 利好/利空/中性 |
| 影响评估 | ❌ 无 | ✅ 行业/公司/市场三级 |
| 个股关联 | ❌ 无 | ✅ 自动识别提及股票 |
| A 股/港股/美股 | ❌ 混合 | ✅ 分类标注 |
| 行业板块 | ❌ 无 | ✅ 自动归类 |
| 投资建议 | ❌ 无 | ✅ 谨慎/关注/回避 |
| 定时推送 | ❌ 手动 | ✅ cron 支持 |
| 环境依赖 | Python+Playwright | 仅需浏览器/API |
📡 数据源(12+ 财经源)
快讯类(实时)
| 源 | URL | 特点 |
|---|---|---|
| 财联社 | https://www.cls.cn/telegraph | 7×24 小时电报,最快 |
| 华尔街见闻 | https://www.wallstreetcn.com/live | 宏观 + 市场 |
| 东方财富 | https://news.eastmoney.com/kx/ | A 股聚焦 |
| 雪球 | https://xueqiu.com/hots | 社区热点 |
深度类(分析)
| 源 | URL | 特点 |
|---|---|---|
| 财新 | https://www.caixin.com/ | 深度调查 |
| 第一财经 | https://www.yicai.com/ | 产业分析 |
| 界面新闻 | https://www.jiemian.com/ | 商业报道 |
| 晚点 LatePost | https://www.postlate.cn/ | 科技商业 |
宏观/政策
| 源 | URL | 特点 |
|---|---|---|
| 央行官网 | http://www.pbc.gov.cn/ | 货币政策 |
| 证监会 | http://www.csrc.gov.cn/ | 监管动态 |
| 国家统计局 | http://www.stats.gov.cn/ | 经济数据 |
港美股
| 源 | URL | 特点 |
|---|---|---|
| 富途牛牛 | https://www.futunn.com/learn | 港美股资讯 |
| 老虎证券 | https://www.tigerbrokers.com/ | 美股分析 |
| Seeking Alpha | https://seekingalpha.com/ | 美股深度 |
🔧 使用方法
触发条件
用户提到以下任意关键词时自动激活:
- "财经新闻"、"财经简报"、"财经"
- "股市新闻"、"美股"、"港股"、"A 股"
- "今日行情"、"市场动态"、"投资新闻"
- 具体公司名("宁德时代"、"腾讯"、"特斯拉"等)
- 具体行业("新能源"、"芯片"、"AI"、"金融"等)
基础用法
# 获取今日财经简报(所有源)
python fetch_news.py
# 指定源(逗号分隔)
python fetch_news.py --source cls,wallstreet,eastmoney
# 指定市场
python fetch_news.py --market A # A 股
python fetch_news.py --market HK # 港股
python fetch_news.py --market US # 美股
# 关键词监控(自动扩展)
python fetch_news.py --keyword "AI,算力,英伟达"
python fetch_news.py --keyword "宁德时代,比亚迪" # 新能源
python fetch_news.py --keyword "银行,保险,券商" # 金融板块
定时推送(cron)
# 每天早上 8 点推送财经简报
openclaw cron add --name "财经早报" --schedule "0 8 * * 1-5" --payload "systemEvent:finance-news --brief"
# 每个交易日收盘后(15:30)推送复盘
openclaw cron add --name "收盘复盘" --schedule "30 15 * * 1-5" --payload "systemEvent:finance-news --summary"
📊 输出格式(专业投资简报)
# 📈 财经简报 - 2026-03-13 14:00
## 🔥 头条焦点(3-5 条)
### 1. [标题](链接) 🟢利好
- **来源**: 财联社 | **时间**: 14:32
- **影响**: 行业 > 公司 > 市场
- **相关股票**: 宁德时代 (300750.SZ), 比亚迪 (002594.SZ)
- **摘要**: 一句话核心信息
- **解读**: 深度分析(背景、影响、持续性)
- **操作建议**: 关注/谨慎/回避
---
## 📉 市场动态
### A 股
- 上证指数:XXXX 点 (±X.XX%)
- 创业板指:XXXX 点 (±X.XX%)
- 北向资金:净流入 XX 亿
### 港股
- 恒生指数:XXXX 点 (±X.XX%)
- 恒生科技:XXXX 点 (±X.XX%)
### 美股期货
- 道指:±X.XX%
- 纳指:±X.XX%
- 标普:±X.XX%
---
## 🏦 行业动态
### 新能源 🟢
- 利好:政策补贴延续
- 关注:宁德时代、比亚迪
### 科技 🔴
- 利空:出口限制升级
- 回避:芯片制造
---
## ⚠️ 风险提示
1. 地缘政治风险(伊朗局势)
2. 美联储加息预期
3. 个股财报季波动
---
## 📊 情绪指标
- 整体情绪:偏多 (65% 利好)
- 成交量:放大/萎缩
- 资金流向:北向流入 XX 亿
🧠 情感分析规则
利好信号 🟢
- 政策扶持/补贴
- 业绩超预期
- 订单/合同签署
- 产品涨价
- 回购/增持
- 并购重组
- 技术突破
- 行业景气度提升
利空信号 🔴
- 监管处罚/调查
- 业绩暴雷
- 订单取消
- 产品降价
- 减持/质押
- 诉讼/纠纷
- 技术失败
- 行业需求下滑
中性信号 ⚪
- 人事变动
- 常规公告
- 会议/活动
- 数据发布(无惊喜)
🎯 影响评估框架
一级:市场级(影响全市场)
- 货币政策(加息/降息)
- 财政政策(减税/刺激)
- 地缘政治(战争/贸易)
- 重大经济数据(GDP/CPI)
二级:行业级(影响特定行业)
- 行业政策(补贴/限制)
- 技术变革(颠覆性创新)
- 供需变化(产能/需求)
- 原材料价格(油价/芯片)
三级:公司级(影响单家公司)
- 财报业绩
- 产品发布
- 管理层变动
- 诉讼/处罚
📋 个股关联规则
自动识别
从新闻文本中提取:
- 股票名称: 宁德时代、贵州茅台、腾讯控股
- 股票代码: 300750.SZ, 600519.SH, 0700.HK
- 公司别名: 宁德、茅台、腾讯
映射表(示例)
{
"宁德时代": {"code": "300750.SZ", "market": "A", "sector": "新能源"},
"比亚迪": {"code": "002594.SZ", "market": "A", "sector": "新能源"},
"腾讯": {"code": "0700.HK", "market": "HK", "sector": "科技"},
"英伟达": {"code": "NVDA", "market": "US", "sector": "芯片"}
}
⚠️ 使用规则
- 时效性优先: 快讯类新闻 30 分钟内必须抓取
- 交叉验证: 重大新闻需 2+ 源确认
- 不荐股: 只提供信息,不做买卖建议
- 风险提示: 每条新闻标注风险等级
- 来源标注: 必须注明新闻来源
- 时间戳: 精确到分钟
- 链接可点: 所有新闻保留原链接
- 中文输出: 默认简体中文,保留英文专有名词
🔄 工作流
用户请求
↓
选择数据源(默认 12 源)
↓
并行抓取(浏览器/API)
↓
情感分析(利好/利空/中性)
↓
影响评估(市场/行业/公司)
↓
个股关联(自动识别)
↓
生成简报(标准模板)
↓
保存 + 展示
💾 数据存储
目录结构
finance-news/
├── reports/ # 简报存档
│ └── 2026-03/
│ ├── 2026-03-13_morning.md
│ └── 2026-03-13_evening.md
├── cache/ # 原始数据缓存
│ └── 2026-03-13/
│ ├── cls.json
│ └── wallstreet.json
└── config/
├── stocks.json # 个股映射表
└── keywords.json # 关键词扩展
缓存策略
- 快讯类:5 分钟过期
- 深度类:1 小时过期
- 宏观数据:24 小时过期
🚀 高级功能
1. 关键词监控
# 监控特定股票
openclaw finance-news --watch "宁德时代,比亚迪,特斯拉"
# 监控行业
openclaw finance-news --watch "AI,算力,大模型"
# 监控宏观
openclaw finance-news --watch "CPI,利率,美联储"
2. 异动提醒
当监控关键词出现时:
- 利好新闻 → 立即推送
- 利空新闻 → 立即推送 + 风险提示
- 重大新闻 → 推送 + 深度分析
3. 周报/月报
# 生成周报
openclaw finance-news --weekly
# 生成月报
openclaw finance-news --monthly
4. 投资组合跟踪
# 添加持仓
openclaw finance-news --portfolio-add "宁德时代 1000 股"
# 查看持仓新闻
openclaw finance-news --portfolio-only
🛠️ 技术实现
核心脚本
fetch_news.py - 新闻抓取与分析核心
# 抓取所有源
python fetch_news.py --source all --limit 15
# 指定源
python fetch_news.py --source cls,wallstreet,eastmoney
# 关键词过滤
python fetch_news.py --keyword "AI,算力,英伟达"
# 市场过滤
python fetch_news.py --market A # A 股相关
python fetch_news.py --market HK # 港股相关
python fetch_news.py --market US # 美股相关
config.json - 配置文件
stocks: 个股映射表(名称→代码/市场/板块)keywords: 关键词自动扩展规则sentiment: 情感分析关键词库
抓取方案
方案 A:浏览器抓取(推荐)
使用 OpenClaw 浏览器工具直接抓取网页,无需 API Key。
# 示例:使用 browser 工具抓取
browser.open(url="https://www.cls.cn/telegraph")
browser.snapshot()
# 解析页面内容,提取新闻
方案 B:RSS 聚合
部分源提供 RSS Feed:
方案 C:API 对接
- 财联社 API(需 Key)
- 聚宽数据(需 Key)
- 新浪财经 API(免费):http://finance.sina.com.cn/
📝 示例输出
# 📈 财经简报 - 2026-03-13 14:30
## 🔥 头条焦点
### 1. [央行降准 0.25 个百分点,释放长期资金约 5000 亿元](https://...) 🟢利好
- **来源**: 财联社 | **时间**: 14:15
- **影响**: 市场级 > 银行板块 > 全行业
- **相关股票**: 招商银行 (600036.SH), 工商银行 (601398.SH)
- **摘要**: 央行宣布降准,释放 5000 亿流动性
- **解读**: 年内首次降准,释放稳增长信号,利好银行、地产、基建等资金敏感行业
- **操作建议**: 关注银行、基建板块
### 2. [宁德时代发布新电池技术,续航提升 30%](https://...) 🟢利好
- **来源**: 华尔街见闻 | **时间**: 13:45
- **影响**: 行业级 > 公司级
- **相关股票**: 宁德时代 (300750.SZ), 比亚迪 (002594.SZ)
- **摘要**: 宁德时代发布神行电池 2.0,续航突破 1000km
- **解读**: 技术领先行业 2-3 年,巩固龙头地位,可能引发行业技术迭代
- **操作建议**: 关注新能源产业链
---
## 📊 市场情绪
- 整体情绪:偏多 (70% 利好)
- 成交量:放大 15%
- 北向资金:净流入 80 亿
🎓 与 news-aggregator 对比总结
| 维度 | news-aggregator | finance-news-pro |
|---|---|---|
| 定位 | 通用新闻聚合 | 专业财经分析 |
| 用户 | 普通用户 | 投资者/交易员 |
| 深度 | 信息汇总 | 情感分析 + 影响评估 |
| 输出 | 新闻列表 | 投资简报 |
| 时效 | 小时级 | 分钟级 |
| 准确性 | 中 | 高(交叉验证) |
| 可操作性 | 低 | 高(含建议) |
使用建议:
- 普通新闻 → news-aggregator
- 财经投资 → finance-news-pro
📋 技能触发规则
激活关键词
当用户消息包含以下任意内容时,激活此技能:
通用财经:
- "财经"、"金融"、"股市"、"行情"、"大盘"
- "新闻"、"简报"、"早报"、"晚报"、"复盘"
- "投资"、"理财"、"基金"、"股票"
市场:
- "A 股"、"港股"、"美股"、"科创板"、"创业板"
- "上证"、"深证"、"恒生"、"纳指"、"道指"
- "北向资金"、"南向资金"、"成交量"
公司名 (自动映射到股票):
- 宁德时代、比亚迪、贵州茅台、腾讯、阿里巴巴
- 苹果、微软、英伟达、特斯拉、AMD
行业:
- "新能源"、"光伏"、"风电"、"电池"
- "芯片"、"半导体"、"AI"、"算力"
- "银行"、"保险"、"券商"、"地产"
- "医疗"、"医药"、"消费"、"科技"
执行流程
1. 解析用户请求
↓
2. 确定参数(源、市场、关键词)
↓
3. 调用 fetch_news.py 抓取
↓
4. 情感分析 + 股票关联
↓
5. 生成 Markdown 报告
↓
6. 保存并展示给用户
输出控制
- 默认: 完整简报(头条 + 市场情绪)
- --brief: 精简版(仅头条 5 条)
- --fast: 仅快讯源(财联社 + 华尔街见闻)
- --summary: 收盘复盘模式(含涨跌统计)
- --weekly: 周报模式(周汇总 + 热点回顾)
最后更新:2026-03-13 版本:1.0.0 作者:夏夏 😘
Files
5 totalSelect a file
Select a file to preview.
Comments
Loading comments…
