← 返回 Skills 市场
Sentiment Analyzer
作者
zhaocaixia888
· GitHub ↗
· v1.0.1
· MIT-0
45
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install zcx-sentiment-analyzer
功能描述
Analyze market sentiment from news articles, social media posts, and financial headlines. Extract bullish/bearish signals, keyword trends, and sentiment scor...
使用说明 (SKILL.md)
Sentiment Analyzer — 市场情绪分析
Extract and quantify market sentiment from financial news, social media, and headlines. Supports Chinese and English with domain-specific keyword dictionaries.
Quick Start
Core Sentiment Analysis
# Chinese/English sentiment keywords
BULLISH = {
"利好", "大涨", "突破", "反弹", "看多", "做多", "抄底", "放量上涨",
"金叉", "上攻", "拉升", "启动", "触底反弹", "企稳回升",
"增持", "回购", "政策支持", "降息", "放水", "宽松",
"rally", "breakout", "bullish", "surge", "upgrade", "outperform",
"beat earnings", "guidance up", "buyback", "dividend increase"
}
BEARISH = {
"利空", "大跌", "跌破", "回调", "看空", "做空", "逃顶", "放量下跌",
"死叉", "下探", "杀跌", "出货", "暴雷", "崩盘", "阴跌",
"减持", "解禁", "加息", "收紧", "紧缩", "贸易战",
"crash", "plunge", "bearish", "downgrade", "sell-off", "underperform",
"miss earnings", "guidance down", "layoff", "investigation"
}
def analyze_text(text):
"""Analyze sentiment of a single text."""
bullish = sum(1 for kw in BULLISH if kw in text)
bearish = sum(1 for kw in BEARISH if kw in text)
total = bullish + bearish
if total == 0:
return {"sentiment": "neutral", "score": 0.0, "bullish": 0, "bearish": 0}
score = (bullish - bearish) / total
if score > 0.2: sent = "bullish"
elif score \x3C -0.2: sent = "bearish"
else: sent = "neutral"
return {"sentiment": sent, "score": round(score, 2), "bullish": bullish, "bearish": bearish}
Batch Analysis
def batch_analyze(headlines):
"""Analyze a list of headlines."""
results = [analyze_text(h) for h in headlines]
bullish = sum(1 for r in results if r["sentiment"] == "bullish")
bearish = sum(1 for r in results if r["sentiment"] == "bearish")
neutral = sum(1 for r in results if r["sentiment"] == "neutral")
avg = sum(r["score"] for r in results) / len(results) if results else 0
return {
"total": len(headlines),
"bullish": bullish,
"bearish": bearish,
"neutral": neutral,
"bullish_pct": round(bullish / len(headlines) * 100, 1) if headlines else 0,
"avg_score": round(avg, 2),
"overall": "bullish" if bullish > bearish else ("bearish" if bearish > bullish else "mixed")
}
Trending Keywords
from collections import Counter
import re
def extract_keywords(headlines, top_n=10):
"""Extract most frequent market keywords from headlines."""
all_words = []
for h in headlines:
words = re.findall(r'[\w\u4e00-\u9fff]+', h)
all_words.extend(w for w in words if len(w) > 1)
counter = Counter(all_words)
return counter.most_common(top_n)
Data Sources
# Sina Finance headlines
curl -s "https://finance.sina.com.cn/" | grep -oP '(?\x3C=\x3Ca[^>]*>)[^\x3C]+' | head -20
# East Money news
curl -s "https://quote.eastmoney.com/" | grep -oP '[\u4e00-\u9fff]{4,}' | head -30
# Weibo trending (public)
curl -s "https://weibo.com/ajax/side/hotSearch"
Format Output
Daily Sentiment Report
🔍 市场情绪快报 (2026-05-22)
📰 新闻情绪分析 (共15条)
• 看多: 6条 (40.0%) 🟢
• 看空: 4条 (26.7%) 🔴
• 中性: 5条 (33.3%) ⚪
• 平均得分: +0.15 (偏多)
🔥 热门关键词
利好(3) 突破(2) 政策支持(2) 反弹(2)
利空(2) 回调(2) 加息(1) 放量(1)
📊 品种情绪分时
• 焦炭 🟢 +0.45 螺纹 🟢 +0.30
• 沪铜 🟡 +0.10 原油 🟡 +0.05
• 纯碱 🔴 -0.35 玻璃 🔴 -0.28
⚠️ 情绪分析仅供参考,不构成交易建议
News Item Analysis
📰 [标题] 央行降准0.5个百分点 释放长期资金约1万亿
📊 情绪: bullish 🟢 (得分: +0.67)
🔑 关键词: 降准(利好), 释放资金(利好), 宽松
💡 影响: 利好股市,利多银行/地产板块
Trend Tracking
📈 品种情绪趋势 (近7天)
品种 周一 周二 周三 周四 周五 方向
焦炭 +0.2 +0.3 +0.1 +0.4 +0.5 ↗️
螺纹 -0.1 -0.3 -0.2 0.0 +0.3 ↗️
纯碱 -0.4 -0.5 -0.3 -0.6 -0.4 ↘️
Use Cases
- Pre-market check: Scan overnight news sentiment before trading
- Position monitoring: Track sentiment changes for held positions
- Earnings season: Analyze sentiment around earnings reports
- Contrarian signals: Extreme sentiment (90%+ one direction) often signals reversal
- Sector rotation: Compare sentiment across sectors to identify rotation
Notes
- This is keyword-based sentiment analysis, NOT deep NLP
- Works better with longer texts (headlines + first paragraph)
- Chinese sentiment keywords need regular maintenance (new slang emerges)
- Combine with volume/price data for confirmation signals
- For production, consider finBERT or other pre-trained financial NLP models
安全使用建议
Before installing, understand that the skill may guide your agent to fetch public market pages with curl and produce rough keyword-based sentiment summaries. Treat the output as informational analysis, not financial advice.
能力评估
Purpose & Capability
The stated purpose is analyzing Chinese and English market sentiment from provided text, headlines, and public financial/social sources; the artifact content matches that purpose.
Instruction Scope
Instructions are limited to user-directed sentiment scoring, batch analysis, keyword extraction, and report formatting, with a clear note that results are not trading advice.
Install Mechanism
The package contains only a markdown SKILL.md file and declares curl as a required binary; no install script, executable payload, dependency package, or mutation step is present.
Credentials
Network access through curl is used to fetch public finance and social-media pages, which is proportionate to the skill but should be expected by users.
Persistence & Privilege
No background workers, persistence, privilege escalation, credential access, local indexing, file mutation, or session/profile use is described or present.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install zcx-sentiment-analyzer - 安装完成后,直接呼叫该 Skill 的名称或使用
/zcx-sentiment-analyzer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Initial release on ClawHub
元数据
常见问题
Sentiment Analyzer 是什么?
Analyze market sentiment from news articles, social media posts, and financial headlines. Extract bullish/bearish signals, keyword trends, and sentiment scor... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 45 次。
如何安装 Sentiment Analyzer?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install zcx-sentiment-analyzer」即可一键安装,无需额外配置。
Sentiment Analyzer 是免费的吗?
是的,Sentiment Analyzer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Sentiment Analyzer 支持哪些平台?
Sentiment Analyzer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Sentiment Analyzer?
由 zhaocaixia888(@zhaocaixia888)开发并维护,当前版本 v1.0.1。
推荐 Skills