Stock Analysis

v1.0.9

提供A股个股及市场多维度深度分析,涵盖基本面、资金面、技术面、筹码和舆情,给出评分及买卖操作建议。

0· 157·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for derrors/stock-analysis-report.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Stock Analysis" (derrors/stock-analysis-report) from ClawHub.
Skill page: https://clawhub.ai/derrors/stock-analysis-report
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install stock-analysis-report

ClawHub CLI

Package manager switcher

npx clawhub@latest install stock-analysis-report
Security Scan
Capability signals
Requires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (A股个股与市场深度分析) align with required items: Python runtime, LLM API credentials, optional data/search API keys. Required env vars and binaries declared (LLM_API_KEY, LLM_BASE_URL, LLM_MODEL, python3) are appropriate for an LLM-driven analysis skill that fetches market/news data.
Instruction Scope
SKILL.md and source code show the agent collects market data, financials, chip/资金/技术 metrics and full news bodies (when Miaoxiang is used) and sends structured prompts + news text to the configured LLM. That behavior is expected for generating analysis but does mean user data (news, stock metadata, and any inputs) will be transmitted to the LLM endpoint.
Install Mechanism
Install is a standard pip install -r requirements.txt (openai, efinance, akshare, httpx, pandas, etc.). No arbitrary URL downloads or extract steps detected; installation uses PyPI packages which is proportionate to a Python analysis tool.
Credentials
Requested environment variables are limited and relevant: LLM credentials (primary) and optional API keys for news/search/data providers. No unrelated cloud credentials or broad secrets are requested.
Persistence & Privilege
Skill is not forced always-on (always:false). It does not request system-wide configuration changes in the provided files. Autonomous invocation (disable-model-invocation:false) is standard and expected for skills.
Assessment
This skill appears coherent and implements what it advertises, but note: (1) it sends news bodies and stock data to whatever LLM endpoint you configure—ensure LLM_BASE_URL and LLM_API_KEY point to a trusted provider because sensitive or proprietary content will be transmitted; (2) pip installing the requirements will pull third‑party packages from PyPI—review requirements.txt and run installs in a controlled environment if you are cautious; (3) optional data/search API keys (MX_APIKEY, SERPAPI_KEY, etc.) give the skill access to paid/third-party services—only provide keys you trust; (4) if you need a higher privacy guarantee, inspect src/llm/client.py to see exactly what fields are sent to the model and consider redacting or minimizing data before calling the LLM.

Like a lobster shell, security has layers — review code before you run it.

latestvk9706e1ckcga1sw5z19v3mcqen85b564
157downloads
0stars
10versions
Updated 6d ago
v1.0.9
MIT-0

A股股票市场分析 Skill

功能

个股分析

输入股票代码,输出结构化分析结果:

  • 基本面:净利润、营收、ROE、毛利率、资产负债率、机构持股比例、盈利预测
  • 估值:PE(TTM)、PB、历史分位
  • 资金面:主力资金流向(超大单/大单/中单/小单净额)、DDX/DDY/DDZ 指标
  • 技术面:MA5/MA10/MA20/MA60 均线、多头排列、乖离率、量比
  • 筹码分布:获利比例、平均成本、集中度
  • 舆情情报:妙想金融资讯(新闻/研报/公告,LLM 分析)+ 多引擎新闻搜索
  • 实时行情:当前价、涨跌幅、成交量、换手率
  • 分析结论:评分 + 操作方向 + 买卖点位 + 检查清单 + 风险提示

市场分析

每日 A 股市场复盘:

  • 主要指数(上证/深证/创业板)
  • 涨跌统计(涨跌家数、涨停跌停数)
  • 板块排名(领涨/领跌 Top5)
  • 市场情绪判断 + 操作建议

使用方式

生成分析报告(推荐)

# 个股分析报告 → 保存到 reports/{代码}_{日期}.md
python3 {baseDir}/scripts/report.py stock 600519

# 市场分析报告 → 保存到 reports/market_{日期}.md
python3 {baseDir}/scripts/report.py market

# 同时输出 JSON
python3 {baseDir}/scripts/report.py stock 600519 --json

# 自定义输出目录
python3 {baseDir}/scripts/report.py stock 600519 -o ./my-reports

JSON 输出

python3 {baseDir}/scripts/analyze_stock.py 600519
python3 {baseDir}/scripts/analyze_market.py

Handler 调用

from src.index import handler
result = await handler({"mode": "stock", "code": "600519"})
result = await handler({"mode": "market"})
result = await handler({"mode": "stock", "code": "600519", "save": True})
result = await handler({"mode": "stock", "code": "600519", "save": True, "output_dir": "./reports"})

输入格式

字段类型必填说明
modestring"stock" 或 "market"
codestringmode=stock时必填A股股票代码,如 "600519"
saveboolean是否保存 Markdown 报告到 reports/ 目录
output_dirstring自定义报告输出目录(需 save=true)

输出格式

个股分析结果

{
  "stock_code": "600519",
  "stock_name": "贵州茅台",
  "core_conclusion": "一句话核心结论",
  "score": 75,
  "action": "买入/观望/卖出",
  "trend": "看多/震荡/看空",
  "buy_price": 1800.0,
  "stop_loss_price": 1700.0,
  "target_price": 2000.0,
  "checklist": [{"condition": "...", "status": "✅/❌", "detail": "..."}],
  "risk_alerts": ["风险1", "风险2"],
  "positive_catalysts": ["利好1"],
  "strategy": "买卖策略建议",
  "stock_info": {"code": "600519", "name": "贵州茅台", "industry": "白酒", "market_cap": 2200000000000},
  "realtime": {"price": 1800.0, "change_pct": 1.5, "turnover_rate": 0.8},
  "tech": {"ma5": 1780.0, "ma10": 1760.0, "ma20": 1740.0, "ma60": 1700.0, "is_bullish_alignment": true, "bias": 2.1, "volume_ratio": 1.2},
  "chip": {"profit_ratio": 75.0, "avg_cost": 1720.0, "concentration": 12.5},
  "capital_flow": {"super_large_net": 500000000, "large_net": 200000000, "ddx": 0.26, "ddy": 0.15, "ddz": 5.3},
  "valuation": {"pe_ttm": 28.5, "pb": 8.2, "pe_percentile": 45.0, "pb_percentile": 30.0},
  "financial": {"net_profit": 55000000000, "revenue": 120000000000, "roe": 30.5, "gross_margin": 91.2, "debt_ratio": 25.3, "institution_holding_pct": 65.0},
  "news": [{"title": "...", "snippet": "资讯摘要", "date": "2025-01-15", "source": "中泰证券·研报·买入", "info_type": "report"}],
  "raw_report": "LLM完整分析报告(Markdown)",
  "disclaimer": "仅供参考,不构成投资建议"
}

市场分析结果

{
  "date": "2025-01-15",
  "core_conclusion": "一句话核心结论",
  "indices": [{"name": "上证指数", "close": 3200.0, "change_pct": 0.5}],
  "statistics": {"up_count": 3000, "down_count": 1500, "limit_up_count": 50},
  "top_sectors": [{"name": "半导体", "change_pct": 3.2}],
  "bottom_sectors": [{"name": "房地产", "change_pct": -1.5}],
  "sentiment": "偏多/中性/偏空",
  "strategy": "操作建议",
  "raw_report": "LLM完整复盘报告(Markdown)"
}

数据源

推荐配置:妙想金融

配置 MX_APIKEY 后,妙想金融自动成为行情数据、财务/资金/估值、资讯搜索的最高优先级数据源,覆盖能力最全、数据质量最高。推荐优先配置。

👉 前往 妙想 Skills 页面 获取 API Key

行情数据

三级自动容灾,并行竞争 + 超时控制:

优先级数据源覆盖能力需要 Key
0妙想金融行情 + 财务 + 资金 + 估值MX_APIKEY
1Efinance行情 + 板块 + 市场统计
2AkShare行情 + 筹码 + 板块
  • 配置 MX_APIKEY 后妙想自动成为最高优先级;未配置时从 Efinance 开始
  • 所有数据源并行请求,按优先级取第一个有效结果;日K线取行数最多的结果
  • 单数据源超时 10 秒自动降级,任一数据源异常不影响整体分析

资讯搜索

五级自动容灾,串行降级:

优先级搜索引擎返回内容需要 Key
0妙想搜索完整正文 + 新闻/研报/公告 + 机构评级MX_APIKEY
1SerpAPIsnippetSERPAPI_KEY
2TavilysnippetTAVILY_KEY
3BravesnippetBRAVE_KEY
4BochasnippetBOCHA_KEY
  • 妙想搜索返回完整正文,直传 LLM 进行分析;其他引擎仅返回 snippet
  • 研报类型含机构名称和评级(如"中泰证券·研报·买入"),LLM 可据此参考机构观点

详见 references/data-sources.md。

性能特性

  • 并行数据采集:个股分析的 7 个数据维度(日K线、实时行情、筹码、资金、估值、财务、资讯)并行获取,总耗时取决于最慢的单项
  • 并行数据源竞争:同一数据维度在多个数据源间并行请求,按优先级取第一个有效结果
  • 超时保护:单数据源请求超时 10 秒自动降级,避免阻塞
  • 资讯正文直传:妙想资讯返回完整正文,直传 LLM 在最终分析时一并阅读,保留完整投资信息

环境变量

变量必填说明
LLM_API_KEYLLM API Key
LLM_BASE_URLOpenAI 兼容 API 地址
LLM_MODEL模型名称
MX_APIKEY妙想金融 API Key(前往获取),配置后自动成为行情数据 + 财务/资金/估值 + 资讯搜索第一优先级
SERPAPI_KEYSerpAPI 搜索 Key
TAVILY_KEYTavily 搜索 Key
BRAVE_KEYBrave 搜索 Key
BOCHA_KEY博查搜索 Key

注意事项

  • Efinance / AkShare 为免费接口,无需注册;妙想金融需配置 MX_APIKEY
  • 分析结果仅供参考,不构成投资建议

Comments

Loading comments...