stock-analyzer▌
feiyuggg/openclaw-stock-analyzer · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
价值投资导向的股票分析工具,融合巴菲特和段永平的投资理念。
Stock Analyzer Skill
价值投资导向的股票分析工具,融合巴菲特和段永平的投资理念。
✅ 当前脚本已内置:巴菲特/段永平定性评估 + 五维价值投资框架,输出按统一模板自动生成。
核心理念
💡 买公司,不是买股票 —— 段永平
💡 和时间做朋友 —— 长期持有优质企业
💡 左侧交易 —— 在别人恐惧时贪婪
📚 分析方法论
详细的五维价值投资分析方法论请参见: METHODOLOGY.md
该方法论包含:
- 🧭 巴菲特 + 段永平「好公司」定性评估(业务/盈利模式/公司文化)
- 📊 市场环境与事件驱动分析
- 🗓️ 市场时钟(中期选举周期 / 节假日效应 / 月份季节性)
- 🛡️ 下跌阶段防御股观察池(按行业给出可投资标的)
- 📞 期权现金流规则:虚值 Long Call 分层布局,浮盈 50%-100% 分批减仓并回流正股
- 🏰 段永平五维护城河评分模型
- 💰 每股现金流 (FCF/OCF) 深度分析框架
- 📈 前瞻P/E与PEG多维度估值
- 🎯 三阶段DCF模型与敏感性分析
- 📝 标准化分析报告模板(含公司业务、盈利模式、公司文化)
两个分析工具
1. analyze-stock - 基础分析
# 快速分析
analyze-stock AAPL
analyze-stock AMZN
# 保存报告
analyze-stock TSLA --save
# 不同格式
analyze-stock NVDA --format json
2. analyze-value - 价值投资分析 (推荐)
# 价值投资深度分析
analyze-value AMZN
analyze-value AAPL
analyze-value 1810.HK
# 保存详细报告
analyze-value TSLA --save
analyze-value META --format md
3. analyze-earnings - 财报解读工作流(官方源优先)
# 生成任意公司的财报解读工作流报告(可复用)
analyze-earnings COIN
analyze-earnings AAPL --out /tmp/aapl-earnings.md
# 同时输出原始JSON,方便后续自动化处理
analyze-earnings MSFT --json
# 指定公司名(用于IR入口候选URL)
analyze-earnings BRK.B --company "Berkshire Hathaway"
analyze-value 特色功能
0. 巴菲特 + 段永平好公司评估(新增)
- 公司业务: 用一句话说清公司卖什么、客户是谁、增长来自哪里
- 盈利模式: 收入结构、利润结构、现金流来源、Capex属性
- 公司文化: 管理层长期主义、资本配置纪律、组织执行文化
- 四问四看: 巴菲特四问 + 段永平四看,先判断“是不是好公司”
1. 前瞻市盈率 (Forward P/E) 详细分析
- 当前P/E: 具体数值 + 行业对比
- 历史P/E区间: TTM vs Forward
- 估值评价: 6级评分体系(显著低估→严重高估)
- 行业对比: 相对行业均值的百分比
2. 现金流详细分析
- FCF计算过程: OCF - CapEx = FCF
- 每股FCF: 具体数值 + P/FCF比率
- FCF收益率: 与国债收益率对比
- 现金流质量: 4级评价体系
3. 基本面五维分析
- ROE/ROA: 资本回报效率
- 毛利率/净利率: 盈利能力
- 资产负债率: 财务健康度
- 经营现金流/净利润: 现金流质量
4. 每股自由现金流 (FCF per share)
- 年度FCF: 总额 + 每股计算
- P/FCF估值: 与行业对比
- 历史趋势: 近3年变化
- 分红能力: FCF/净利润比率
5. PEG估值详细分析
- PEG计算: Forward P/E ÷ EPS增长率
- 多时间维度: 1年/2年PEG对比
- 基准对比: 以PEG=1.0为基准
- 投资价值评级: 5级评分体系
6. DCF估值详细分析
- 三阶段模型: 高成长(3年)→中成长(2年)→永续增长
- 参数透明: FCF基础值、增长率、WACC、永续增长率
- 敏感性分析: 9种情景组合
- 估值区间: 最低-最高-平均内在价值
7. 未来1-5年价值估算
• 1年后: $XXX (年化回报: +XX%) → 评价
• 3年后: $XXX (年化回报: +XX%) → 评价
• 5年后: $XXX (年化回报: +XX%) → 评价
8. 左侧交易执行计划
目标仓位: 5-10%
• 第一批 (试仓20%): $价格区间 + 条件
• 第二批 (加仓30%): $价格区间 + 条件
• 重仓区 (35%): $价格区间 + 条件
• 极端区 (15%): <$价格 + 条件
9. "时间是朋友"持有逻辑
自动生成巴菲特/段永平风格的投资理由:
- 护城河保护长期竞争力
- ROE显示资本回报能力
- 自由现金流创造价值
- 安全边际充足
- 长期持有复合增长
10. 短期期权与隐含波动率分析(新增)
- 最近到期期权的 Call/Put 成交量
- Put/Call 成交量比 与 持仓量比
- ATM 附近平均隐含波动率(IV)
- 用于辅助判断短期情绪与波动风险
11. 期权现金流策略(用户规则)
- 通过虚值 Long Call 做分层布局(默认 10% / 20% OTM 两档)
- 到期结构:至少 6 个月,优先 12 个月以上(可使用 LEAPS)
- 输出要求:给出具体合约价位(到期日 + 行权价),不只给区间
- 当 Long Call 浮盈达到 +50%:分批减仓(约30%-50%)锁定现金流
- 当 Long Call 浮盈达到 +100%:进一步减仓至底仓或全部止盈
- 止盈所得优先回流到正股左侧建仓区,形成“期权现金流 → 正股再投资”闭环
示例输出
$ analyze-value AMZN
🔍 正在进行价值投资分析: AMZN...
💡 理念: 买公司,不是买股票 | 和时间做朋友 | 左侧交易
============================================================================
📊 Amazon.com Inc (AMZN) 价值投资分析报告
============================================================================
【核心数据】
• 股价: $205.5 | 市值: $2206.0B
• 52周区间: $164.4 - $246.6
• Forward P/E: 22.1x
【巴菲特式估值】
• DCF内在价值: $280.5
• 安全边际: +36.5%
✅ 安全边际充足 (>20%),符合巴菲特标准
【护城河分析】(段永平五维)
• 网络效应: ⭐⭐⭐⭐⭐
• 品牌护城河: ⭐⭐⭐⭐
• 技术护城河: ⭐⭐⭐⭐
• 成本优势: ⭐⭐⭐⭐⭐
• 切换成本: ⭐⭐⭐⭐⭐
• 综合评级: 极宽护城河 (4.4/5.0)
【未来1-5年价值估算】
• 1年后: $224.5 (年化回报: +9.2%)
• 3年后: $290.3 (年化回报: +12.1%)
• 5年后: $368.8 (年化回报: +12.4%)
【五维评分】
1. 估值/安全边际: ⭐⭐⭐⭐⭐
2. 护城河: ⭐⭐⭐⭐⭐
3. 现金流: ⭐⭐⭐⭐
4. 盈利能力: ⭐⭐⭐⭐⭐
5. 增长潜力: ⭐⭐⭐⭐
综合评分: 4.4/5.0
【投资评级】
🎯 BUY ⭐⭐⭐⭐⭐
【左侧交易执行计划】
• 第一批 (试仓20%): $195-$215
• 第二批 (加仓30%): $175-$195
• 重仓区 (35%): $165-$175
• 极端区 (15%): <$165
【"时间是朋友"持有逻辑】
1. 极宽护城河保护企业长期竞争力
2. ROE 22.3% 显示优秀的资本回报能力
3. $32.2B 年自由现金流,为股东创造价值
4. 以低于内在价值 36% 的价格买入,安全边际充足
5. 持有3-5年,让企业价值复合增长
五维评分体系
| 维度 | 权重 | 评估标准 |
|---|---|---|
| 估值/安全边际 | 20% | DCF内在价值 vs 当前价 |
| 护城河 | 20% | 五维护城河评分 |
| 现金流 | 20% | FCF健康度 |
| 盈利能力 | 20% | ROE、ROA、利润率 |
| 增长潜力 | 20% | EPS增长预期 |
投资评级标准
| 综合评分 | 安全边际 | 评级 | 操作建议 |
|---|---|---|---|
| ≥4.5 | >20% | STRONG BUY ⭐⭐⭐⭐⭐ | 重仓买入 |
| ≥4.0 | >10% | BUY ⭐⭐⭐⭐ | 分批建仓 |
| ≥3.5 | - | HOLD ⭐⭐⭐ | 持有观望 |
| <3.5 | - | AVOID ⭐⭐ | 回避 |
安装
# 确保依赖已安装
pip install yahooquery
# 添加到 PATH
export PATH="$HOME/.openclaw/workspace/skills/stock-analyzer:$PATH"
数据来源
- Yahoo Finance (通过 yahooquery)
- SEC EDGAR submissions API(用于最新8-K/10-Q/10-K清单;如被限流会在报告中标注)
- 公司 Investor Relations 页面(通过工作流中的候选入口 + 浏览器人工核验)
- 实时股价、财务数据、分析师预测
免责声明
本工具基于价值投资理念提供分析参考,不构成投资建议。投资有风险,入市需谨慎。
请记住:
- 任何估值模型都有局限性
- DCF依赖于对未来增长的假设
- 请结合自身风险承受能力决策
- 长期持有需要对企业有深入理解
🕰️ "时间是优秀企业的朋友,是平庸企业的敌人。" — 沃伦·巴菲特
How to use stock-analyzer on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add stock-analyzer
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches stock-analyzer from GitHub repository feiyuggg/openclaw-stock-analyzer and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate stock-analyzer. Access the skill through slash commands (e.g., /stock-analyzer) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.4★★★★★25 reviews- ★★★★★Chaitanya Patil· Dec 28, 2024
We added stock-analyzer from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Pratham Ware· Dec 4, 2024
I recommend stock-analyzer for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Piyush G· Nov 19, 2024
stock-analyzer fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Shikha Mishra· Oct 10, 2024
Registry listing for stock-analyzer matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Noor Bhatia· Sep 13, 2024
stock-analyzer has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Hassan Gonzalez· Aug 4, 2024
Keeps context tight: stock-analyzer is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Noor Smith· Jul 23, 2024
stock-analyzer is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Isabella Brown· Jul 19, 2024
Solid pick for teams standardizing on skills: stock-analyzer is focused, and the summary matches what you get after install.
- ★★★★★Noor Rahman· Jun 14, 2024
Useful defaults in stock-analyzer — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Ren Agarwal· May 21, 2024
Registry listing for stock-analyzer matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 25