A-share financial news analyst. Collects news from 3 sources (Eastmoney/Futu/Tonghuashun), analyzes each news to identify affected stocks/sectors using AI knowledge, cross-validates with PandaAI real-time price/volume/amplitude/margin/industry data. Outputs investment bank-style terminal report + Parquet. Use when user asks to analyze A-share news, understand what stocks are affected by today's news, or get a structured market overview.
Ships in news-sentiment-analyst. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A 股财经新闻分析 — 采集 → AI 分析(自主识别股票) → PandaAI 多维度验证 → 投行级报告
当你触发此 skill 时,严格按以下步骤执行:
if [ ! -f .env ]; then
echo "PandaAI 未配置。"
echo "配置后可以获取实时股价、振幅、成交额、融资方向、行业分类等数据来验证分析。"
echo "请在 .env 文件中填入:"
echo " PANDA_DATA_USERNAME=86手机号"
echo " PANDA_DATA_PASSWORD=密码"
fi
用户拒绝配置时跳过验证步骤,核心新闻分析不受影响。
python scripts/collector.py --date $(date +%Y-%m-%d) --max-news 30 --output /tmp/collector_output.json
读取输出的 JSON,获取新闻列表和市场背景数据(板块涨幅 TOP5、北向资金等)。
对每条新闻,你作为 A 股分析师,自主分析:
输出格式(每条新闻一个对象,保存为 JSON 数组):
{
"news_title": "新闻原标题",
"affected_stocks": [
{"name": "股票名称", "code": "300750", "impact": "positive", "reason": "简短原因"}
],
"affected_sectors": ["新能源"],
"sentiment": "positive",
"reasoning": "一句话因果推理"
}
股票代码必须是 6 位数字,不确定时留空,不要猜测。
分析完毕后保存 JSON:
cat > /tmp/analysis_output.json << 'EOF'
[
{"news_title":"...", "affected_stocks":[...], "affected_sectors":[...], "sentiment":"...", "reasoning":"..."}
]
EOF
收集所有涉及股票代码。如果列表不为空且有 PandaAI 配置:
python scripts/verifier.py --codes 300750,600519 --date $(date +%Y-%m-%d) --output /tmp/verify_output.json
验证器返回每只股票的增强数据:
python scripts/reporter.py \
--analysis /tmp/analysis_output.json \
--verify /tmp/verify_output.json \
--market /tmp/collector_output.json \
--trade-date $(date +%Y-%m-%d) \
--output-dir output
报告包含 5 个 Section + 情绪总览:
| Section | 内容 |
|---|---|
| Section I | 执行摘要 — 新闻覆盖、股票数量、情绪分布、活跃板块 |
| Section II | 市场概况 — 指数、北向资金、板块涨幅 TOP5 |
| Section III | 主题分析 — 按主题分组(地缘/科技/政策/资金等),逐条标注情绪、关联股票及PandaAI实时数据 |
| Section IV | 股票数据面板 — 9 列表格(代码/名称/行业/收盘/涨跌幅/振幅/成交额/融资变化/5日涨跌/分析观点) |
| Section V | 核心观察 — 基于实际数据动态生成(涨跌幅极端值/高波动标的/成交集中度/预期偏差/融资情绪/板块强弱),无硬编码结论 |
| Sentiment | 情绪总览 — 正面/负面/中性比例 |
报告所有观察结论均通过
_compute_observations()函数基于实际数据计算,每日自动适配当天数据特征。
将 reporter 生成的报告展示给用户,附上关键发现。
output/news_analysis_YYYY-MM-DD.parquet — 结构化分析数据(含增强 PandaAI 验证字段)| 参数 | 默认值 | 说明 |
|---|---|---|
| --date | 今天 | 交易日期 |
| --max-news | 30 | 最大分析条数 |
| --news-type | all | macro / company / all |
| 参数 | 说明 |
|---|---|
| --codes | 股票代码逗号分隔, 如 300750,600519 |
| --date | 交易日期 |
| --output | JSON 输出路径 |
| 参数 | 说明 |
|---|---|
| --analysis | AI 分析 JSON 路径 |
| --verify | PandaAI 验证 JSON 路径 |
| --market | 市场背景 JSON 路径 |
| --trade-date | 交易日期 |
| --output-dir | Parquet 输出目录 |
| --no-rich | 禁用 rich 格式 |
| 字段 | 说明 |
|---|---|
| price_1d | 当日涨跌幅(%) |
| price_5d | 5日涨跌幅(%) |
| close/open/high/low | OHLCV 价格 |
| amplitude | 振幅(%, (high-low)/pre_close) |
| volume | 成交量(股) |
| amount / amount_b | 成交额(元/亿元) |
| num_trades | 成交笔数 |
| margin | 融资方向(up/down) |
| margin_change_pct | 融资余额变化率(%) |
| industry | 行业分类 |
| stock_name | 股票名称 |
.env 文件已 gitignoreWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/news-sentiment-analyst:news-sentiment-analystfrom news-sentiment-analyst
news-sentiment-analyst@quantskills is listed by quantskills/registry — review the source before installing
npx claudepluginhub quantskills/registry --plugin news-sentiment-analyst