微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📊

一键生成专业级股票基本面全景报告

Stock Fundamentals · v0.1.2
专业技能 安全 A 级 作者 youpele52 公开目录收录
1.3k 下载 0 安装 3.5k 收藏 9 浏览

简介

本地运行 Python 脚本,通过 yfinance 抓取 Yahoo Finance 数据,快速生成个股基本面分析报告,涵盖估值、盈利、财务健康等 20+ 指标,无需 API 密钥。

原始描述

Run local script to analyze stock fundamentals (P/E, EPS, margins, debt, ROE, analyst targets) using yfinance. Use exec tool to run: uv run /root/.openclaw/w...

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/stock-fundamentals/
其它 Agent解压到它自己的 skills 目录,目录名用 stock-fundamentals

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

中文使用说明 来自收录源

核心用法

stock-fundamentals 是一款本地执行的股票基本面分析工具,基于 yfinance 库从 Yahoo Finance 获取数据。用户通过 uv run 命令直接运行 Python 脚本,无需手动配置虚拟环境或安装依赖,系统会自动解析脚本头部的依赖声明并完成隔离环境的构建。

使用场景

  • 需要快速获取某只股票的完整基本面画像
  • 对比多维度指标(P/E、ROE、负债率、分析师目标价等)
  • 初步筛选投资标的或验证估值假设

典型命令

uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py AAPL

支持全球多市场股票代码,包括美股(AAPL)、德股(RHM.DE)、英股(SHEL.L)、日股(7203.T)等,以及加密货币(BTC-USD)。

显著优点

  1. 零配置启动:uv run 自动处理依赖,用户无需关心 Python 环境
  2. 数据维度全面:覆盖估值、盈利能力、成长性、财务健康、股东回报、市场预期六大模块
  3. 智能生成摘要:自动输出「Fundamental Highlights」叙事总结和「Potential Watch Items」风险标记
  4. 多市场兼容:支持 10+ 交易所的后缀格式
  5. 离线友好:本地执行,不依赖外部 API 密钥配额

潜在局限

  • 数据源单一:完全依赖 Yahoo Finance,存在数据延迟、缺失或调整风险
  • 非实时数据:财务数据基于季度/年度报告,非日内更新
  • 无历史对比:不提供多季度趋势图表或同业对标功能
  • ETF 支持有限:基金类产品基本面字段可能缺失
  • 无深度分析:仅输出原始指标,不含 DCF 模型或情景测算

适合人群

  • 需要快速基本面快照的个人投资者
  • 进行初筛阶段的量化研究者
  • 对估值指标敏感的价值投资者
  • 不愿维护 Python 环境的轻度技术用户

常规风险

风险类型 说明
数据准确性 Yahoo Finance 数据未经审计,可能与公司财报存在差异
时效性 季度数据更新滞后,重大事件(并购、重组)可能未反映
市场覆盖 小盘股、OTC 市场数据质量不稳定
工具依赖 依赖 uv 和 yfinance 的维护状态,版本更新可能引入 breaking change
投资决策 基本面指标仅为参考,不构成买卖建议

技能正文


name: stock-fundamentals description: "Run local script to analyze stock fundamentals (P/E, EPS, margins, debt, ROE, analyst targets) using yfinance. Use exec tool to run: uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py . No API key required." homepage: https://finance.yahoo.com metadata: {"clawdbot":{"emoji":"📊","requires":{"bins":["uv"]}}}

Skill: Stock Fundamentals

When to use

  • The user wants a quick fundamental read on a stock beyond the current price.
  • The user wants valuation, profitability, growth, balance sheet, cash flow, dividend, or analyst expectation context for a company.
  • The user asks about P/E ratio, EPS, revenue, margins, debt, ROE, ROA, free cash flow, or analyst targets.
  • The user asks "is [company] a good buy?" or "what are the fundamentals for [company]?"

When NOT to use

  • The user only wants the current price or daily movement → use stock-price-checker-pro
  • The user wants broad market/macro news → use market-news-brief
  • The user wants a full equity research report combining all signals → use equity-research

Commands

Analyze a stock's fundamentals

uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py <TICKER>

uv run reads the inline dependency block at the top of main.py and auto-installs yfinance in an isolated environment. No pip install or venv setup needed.

Examples

# US stocks
uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py AAPL
uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py TSLA
uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py MSFT
uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py NVDA
uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py AMZN

# European stocks
uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py RHM.DE
uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py SAP.DE
uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py ASML.AS

# UK stocks
uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py SHEL.L

# ETFs (limited fundamentals available)
uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py SPY

Ticker Format Reference

Market Format Example
US stocks Plain AAPL, NVDA
German stocks .DE suffix RHM.DE, SAP.DE
UK stocks .L suffix SHEL.L, BP.L
Dutch stocks .AS suffix ASML.AS
Japanese .T suffix 7203.T
Korean .KS suffix 005930.KS
Crypto -USD BTC-USD, ETH-USD

Output

The command returns a structured fundamentals report including:

  • Header — company name, sector, industry, market cap
  • Valuation — Trailing P/E, Forward P/E, PEG Ratio, Price/Sales, Price/Book, EV/EBITDA
  • Profitability — Gross Margin, Operating Margin, Net Margin, ROE, ROA
  • Growth — Revenue Growth (YoY), Earnings Growth (YoY)
  • Financial Health — Total Cash, Total Debt, Debt/Equity, Current Ratio
  • Shareholder Return — Dividend Yield, Payout Ratio
  • Forward View — Analyst Target Price, Recommendation, Next Earnings Date
  • Fundamental Highlights — auto-generated narrative summary
  • Potential Watch Items — auto-generated risk flags

Notes

  • Do NOT use web search or curl to look up fundamentals — always use this script.
  • Do NOT use the stock-fundamentals.sh bash wrapper — call uv run src/main.py directly as shown above.
  • uv run handles all dependencies automatically — no manual environment setup needed.
  • Data is sourced from Yahoo Finance via yfinance. Results reflect the latest available data.
  • For companies with no dividend, dividend fields will show N/A — this is expected.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

stock-analysisfundamental-analysisvaluationyahoo-financepython-scriptlocal-executioninvestment-researchfinancial-metrics

同类 Skill