comparable-company-analysis

v1.0.0

金融领域的可比公司分析工具,通过行业分析法对目标公司与可比公司整合经营指标、估值倍数和统计基准比较。目前仅支持A股上市公司分析。输入单一公司问句后,调用可比公司接口并生成主题化Excel报告。适用于快速对比目标公司与同业在经营、财务、估值维度的差异。

0· 310·2 current·2 all-time
byFinancial AI Analyst@financial-ai-analyst

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for financial-ai-analyst/comparable-company-analysis.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "comparable-company-analysis" (financial-ai-analyst/comparable-company-analysis) from ClawHub.
Skill page: https://clawhub.ai/financial-ai-analyst/comparable-company-analysis
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: EM_API_KEY
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 comparable-company-analysis

ClawHub CLI

Package manager switcher

npx clawhub@latest install comparable-company-analysis
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股可比公司分析) match the code and SKILL.md. The skill contacts an Eastmoney API endpoint and generates a themed Excel — EM_API_KEY is the expected credential for that service.
Instruction Scope
SKILL.md and the two included Python scripts describe only: call the comparable‑company API, normalize results, and build an Excel report. The code only reads the provided query and EM_API_KEY, performs an HTTP POST to the declared Eastmoney URL, and writes an Excel file to a local subfolder; it does not attempt to read unrelated system files or other environment variables.
Install Mechanism
No install spec (instruction-only) and code files are included in the bundle — no remote downloads. Note: code imports openpyxl but the SKILL.md does not list Python dependency installation steps; the user must ensure required Python packages (e.g., openpyxl) are installed.
Credentials
Only one env var (EM_API_KEY) is required and is directly used for the Eastmoney API call. This is proportionate to the stated purpose. EM_API_KEY is sensitive and will be sent in the request header to the advertised domain.
Persistence & Privilege
Skill does not request persistent/always privileges. It writes output Excel files under a local folder (default miaoxiang/comparable_company_analysis) — this is consistent with report generation and limited in scope.
Assessment
This skill appears internally consistent, but before installing: 1) Confirm you trust the EM_API_KEY provider (https://ai.eastmoney.com) because the key is sent to that service. 2) Install required Python packages (openpyxl) in your environment — SKILL.md does not list them. 3) Expect the skill to create Excel files under ./miaoxiang/comparable_company_analysis; check and control that folder if you have sensitive working directories. 4) Because the skill's source and homepage are unknown, prefer using an API key with limited scope and rotate it if you stop using the skill. 5) If you need assurance about data handling, inspect the included scripts locally (they do not persist raw API payload to disk but do include the API response in memory and write the formatted Excel).

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

Runtime requirements

EnvEM_API_KEY
latestvk978tp7tzt6tk2zmvd1m3smv4x8508ff
310downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0

可比公司分析

密钥来源与安全说明

  • 本技能仅使用一个环境变量:EM_API_KEY
  • EM_API_KEY 用于可比公司分析接口鉴权。
  • 禁止在代码、提示词、日志或输出文件中硬编码/明文暴露密钥。

功能范围

触发规则(何时使用本技能)

  • 用户明确提出“可比公司分析”“同业对比”“经营+估值横向比较”等诉求。
  • 输入中包含单一、可识别的公司名称或股票代码。
  • 目标是评估目标上市公司的行业定位及竞争位置。
  • 关注目标公司与同业在经营、财务、估值维度的差异。
  • 需要用于投资标的筛选、基本面研判或价值投资参考。
  • 涉及并购/投资场景下的估值比较与异常值判断。

不触发规则(何时不要使用本技能)

  • 需求聚焦于大盘、板块指数或市场整体情绪,而非单一公司对比。
  • 问题核心是宏观政策、利率、流动性等宏观层面分析。
  • 目标公司商业模式高度独特,缺乏可比上市公司样本。
  • 目标实体为私营公司,或为高度多元化、不可横向比较的综合集团。
  • 需求是从市场主线中发掘方向或构建候选标的池。
  • 需求包含盘中实时异动监控或交易提醒。
  • 需求主题为基金筛选或债券点评,不属于公司可比分析范畴。

脚本说明

1. 取数脚本 scripts/get_data.py

  • 仅负责调用接口并标准化结果
  • 不保存接口原始数据到本地文件
  • 输出字段:headersection_financesection_valuationrecords

2. 制表脚本 scripts/excel_theme.py

  • 基于 get_data.py 输出生成主题化 Excel
  • 复现目标样式(深蓝顶栏 + 双节表格)
  • 保存路径默认:miaoxiang/comparable_company_analysis/

前提条件

1. 注册东方财富妙想账号

访问 https://ai.eastmoney.com/mxClaw 注册账号并获取 API Key。

2. 配置 Token

# macOS 添加到 ~/.zshrc,Linux 添加到 ~/.bashrc
export EM_API_KEY="your_api_key_here"

然后根据系统执行对应的命令:

macOS:

source ~/.zshrc

Linux:

source ~/.bashrc

快速开始

输入query规范

若要查询某上市公司可比公司,则输入query为某上市公司名称即可,比如东方财富

1. 仅取数调试

python3 {baseDir}/scripts/get_data.py --query "东方财富"

2. 一键生成Excel可视化报告

python3 {baseDir}/scripts/excel_theme.py --query "东方财富"

输出文件说明

文件说明
comparable_company_analysis_<ID>.xlsx可比公司分析可视化Excel报告

输出规范

读取可视化Excel报告信息,针对问句、输入内容,进行回答,输出目标公司与可比公司的财务、估值差异分析,以及差异背后的业务原因和战略根源解释。

分析示例(比亚迪 vs 长城汽车 2018-2022年):

  • 2018年和2019年:比亚迪净利润明显低于长城汽车
  • 2020年:新能源汽车全面发展浪潮下,比亚迪新能源汽车产销量逐渐增加,净利润显著上升并超过长城汽车
  • 2022年:随着新能源汽车技术不断迭代更新,净利润实现质的飞跃,远远超越长城汽车

常见问题

错误:EM_API_KEY is required.
→ 需先配置 EM_API_KEY,请联系官网获取并手动配置。

错误:目前仅支持A股上市公司进行可比公司分析
→ 目前仅支持A股上市公司,不支持港美股、退市股等。尽量输入查询为A股上市公司名称,满足输入规范。

注意:目前仅支持单一上市公司进行可比公司分析
→ 如果输入多实体,则只会返回第一个实体的可比公司分析。

注意:财务指标和估值情况两个章节的公司列表可能不一样
→ 因为存在同业公司目前未披露最新报告期定报,此时该公司仅返回估值情况数据。

注意:不同指标的统计字段可能不一样
→ 如果有效可比公司低于2家,统计上失效,会降低报告严谨度。

合规说明

  • 结果仅供参考,不构成投资建议。
  • 接口失败时返回明确错误,不得编造分析结论。
  • 输出中的指标名称和顺序需与固定列定义保持一致。

Comments

Loading comments...