← Back to Skills Marketplace
20位投资大师帮你分析股票
by
amitabhama
· GitHub ↗
· v1.0.0
· MIT-0
76
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install investmentguru
Description
基于20位中外投资大师方法,提供A股美股港股实时数据抓取和多维度智能股票分析报告。
README (SKILL.md)
投资大师 Skill
基于中国顶级投资大师 + 国际投资大师的价值投资分析Skill。
整合了20+位投资大师
🇨🇳 中国大师(7位)
段永平、张磊、李录、邱国鹭、王国斌、林园、但斌
🌍 国际大师(13位)
巴菲特、彼得林奇、木头姐、格雷厄姆、芒格、费雪、伯里、阿克曼、索罗斯、达里奥、达摩达兰、米勒、邓普顿
功能
1. 股票数据自动抓取
- 实时行情(价格、涨跌幅、成交量、PE、市值)
- K线历史数据
- 均线系统(MA5/10/20/60)
- 近期走势(1日/5日/1月/3月)
- 板块/行业信息
- 市场情绪指标
2. 智能投资分析
- 自动识别股票
- 根据行业自动匹配最合适的大师方法
- 生成完整分析报告(7个部分)
- 多大师对比分析
3. Agent对话式集成
- 当用户问股票时自动触发
- 支持指定大师方法("用林园的方法看XXX")
- 支持对比分析("XXX和YYY哪个好")
安装
pip install -e .
使用方法
Python API
from investment_gurus import smart_analyze, handle_user_message
# 方法1: 对话式触发(Agent用)
response = handle_user_message("茅台现在能买吗?")
# 方法2: 直接分析
report = smart_analyze("贵州茅台")
# 方法3: 指定大师
report = smart_analyze("片仔癀", guru="linyuan")
# 方法4: 多大师对比
from investment_gurus import compare_all_methods
report = compare_all_methods("宁德时代")
命令行
invest-guru analyze -s 贵州茅台
invest-guru compare -s 比亚迪
支持的股票
- A股:茅台、五粮液、片仔癀、宁德时代、比亚迪、平安、招商银行等
- 港股:腾讯、阿里、美团、京东等
- 美股:苹果、微软、谷歌、亚马逊、特斯拉等
投资大师
🇨🇳 中国大师(7位)
| 大师 | 方法 | 擅长行业 |
|---|---|---|
| 段永平 | 能力圈+商业模式 | 消费、科技 |
| 张磊 | 超长期+动态护城河 | 科技、新能源 |
| 林园 | 嘴巴经济+垄断 | 白酒、医药 |
| 但斌 | 伟大企业+时间玫瑰 | 消费、互联网 |
| 邱国鹭 | 三好原则+逆向 | 金融、周期 |
| 李录 | 安全边际+文明 | 消费、科技 |
| 王国斌 | 幸运行业+企业 | 消费、制造 |
🌍 国际大师(13位)
| 大师 | 方法 | 核心指标 |
|---|---|---|
| 巴菲特 | 合理价格买伟大公司 | ROE>15%, PE\x3C25, 自由现金流 |
| 彼得林奇 | 寻找10倍股(GARP) | PEG\x3C1, 营收增长>15% |
| 木头姐 | 创新颠覆 | 创新指数, TAM, 研发>10% |
| 格雷厄姆 | 安全边际 | PE\x3C15, PB\x3C1.5, NCAV |
| 芒格 | Wonderful Business | 商业模式, 护城河, 定价权 |
| 费雪 | 成长股调研 | 研发投入, 毛利率, 市场份额 |
| 伯里 | 深度价值+逆向 | 隐蔽资产, PB, 清算价值 |
| 阿克曼 | 激进投资 | 催化剂, 估值修复空间 |
| 索罗斯 | 宏观对冲 | 宏观周期, 流动性, 政策 |
| 达里奥 | 全天候 | 经济周期, 利率, 通胀 |
| 达摩达兰 | DCF估值 | DCF, EV/EBITDA, 相对估值 |
| 米勒 | 价值成长合一 | ROIC>15%, 成长性 |
| 邓普顿 | 逆向投资 | PE历史低位, VIX高位 |
📊 分析维度(4个)
| 维度 | 指标 |
|---|---|
| 估值 | PE, PB, PS, EV/EBITDA, DCF, 股息率 |
| 基本面 | ROE, 毛利率, 净利率, 营收增长 |
| 技术面 | MA5/20/60, RSI, MACD, 成交量 |
| 情绪 | 新闻情绪, 机构评级, 资金流向, VIX |
触发条件
当用户输入包含以下内容时自动触发:
- 股票名称(茅台、宁德时代等)
- 6位股票代码
- 关键词:股票、买、卖、投资、分析、走势、行情、估值
文件结构
investment_gurus/
├── investment_gurus/
│ ├── __init__.py # 入口
│ ├── base.py # 基类
│ ├── data_fetcher.py # 数据抓取
│ ├── smart_analyzer.py # 智能分析
│ ├── agent_handler.py # Agent集成 (核心)
│ ├── tencent_api.py # 腾讯财经API (实时行情)
│ ├── international_gurus.py # 国际大师分析
│ ├── analyzer.py # 综合分析器
│ ├── duan.py # 段永平
│ ├── zhanglei.py # 张磊
│ ├── liu_lu.py # 李录
│ ├── qiuguoluo.py # 邱国鹭
│ ├── wangguobin.py # 王国斌
│ ├── linyuan.py # 林园
│ └── danbing.py # 但斌
├── SKILL.md
├── README.md
├── setup.py
├── requirements.txt
└── manifest.json
数据源
- 腾讯财经API (
web.ifzq.gtimg.cn) - 实时/收盘行情 - Yahoo Finance (yfinance) - 备用数据源
- 支持:港股、美股、A股
Usage Guidance
This package appears coherent with its stated purpose (stock analysis). Before installing or enabling it for agent-autonomous use: 1) Inspect or fix setup.py (there is an apparent extra '()' that will break installation). 2) Confirm the package origin/contact (manifest and README use placeholder/example URLs/emails) — prefer packages with a verifiable repository/homepage. 3) If you plan to run it in a production agent or give it autonomous invocation, run it in a sandboxed environment first (it makes outbound HTTP requests to finance endpoints). 4) Pin and audit dependencies (yfinance/requests/etc.) and review any omitted/truncated files not shown here for unexpected network endpoints or secrets handling. 5) If you need stricter guarantees, request the maintainer to provide a proper release (matching version numbers, working setup.py) and a canonical repository URL.
Capability Analysis
Type: OpenClaw Skill
Name: investmentguru
Version: 1.0.0
The skill bundle contains hardcoded API credentials (a Tushare token) in 'investment_system/etf_monitor.py' and 'investment_system/get_north_money.py', as well as hardcoded absolute local file paths in 'investment_system/fetch_etf_history.py'. While the code appears to be a functional investment analysis tool aligned with its stated purpose, the inclusion of hardcoded secrets and environment-specific paths are significant security vulnerabilities and poor development practices. No evidence of intentional data exfiltration or malicious prompt injection was detected.
Capability Tags
Capability Assessment
Purpose & Capability
Name/description match the implementation: the package contains data fetchers (Tencent API, yfinance), many guru analysis modules, an agent handler and CLI. Requested resources (no env vars, standard Python libs) are appropriate for a stock analysis skill. Minor inconsistencies: manifest/version metadata (manifest claims 2.0.0 but registry shows 1.0.0) and contact/homepage fields in manifest/README differ; these look like bookkeeping issues rather than malicious intent.
Instruction Scope
SKILL.md limits runtime behavior to installing the package, fetching market data, and running analysis. The agent auto-trigger rules are explicit (keyword/stock name/code matching). The instructions do not request reading unrelated system files or hidden credentials.
Install Mechanism
There is no external download/install spec in the registry (it's instruction-only), but the project includes setup.py and requirements.txt and expects pip install -e . Dependencies are standard public PyPI packages (yfinance, requests, pandas, etc.). Note: setup.py in the bundle ends with an extra '()' after setup(...) which appears to be a coding/typo bug that will break installation — review/fix before pip installing.
Credentials
The skill declares no required environment variables, credentials, or config paths. Code performs outbound requests to expected finance endpoints (Tencent web.ifzq.gtimg.cn and yfinance). No access to unrelated cloud credentials or secrets is requested.
Persistence & Privilege
always is false and the skill is user-invocable. The agent_handler includes an automatic trigger heuristic based on user input (keywords and stock names) — that's consistent with an agent-integrated analysis skill. The package does not request elevated or persistent platform privileges.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install investmentguru - After installation, invoke the skill by name or use
/investmentguru - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
# 投资大师 Skill (Investment Gurus)
基于**中国顶级投资大师** + **国际投资大师**的价值投资分析Skill。
## 整合了20+位投资大师
### 🇨🇳 中国大师(7位)
段永平、张磊、李录、邱国鹭、王国斌、林园、但斌
### 🌍 国际大师(13位)
巴菲特、彼得林奇、木头姐、格雷厄姆、芒格、费雪、伯里、阿克曼、索罗斯、达里奥、达摩达兰、米勒、邓普顿
> 基于 ai-hedge-fund 项目研究 (55,797 Stars)
**四大功能**:
1. **数据抓取** - 腾讯财经API实时行情、均线、走势、板块
2. **智能分析** - 自动匹配大师方法,生成投资建议
3. **多维度评估** - 估值、基本面、技术面、情绪面
4. **Agent集成** - 对话式股票分析
### 数据源
- **腾讯财经API** (`web.ifzq.gtimg.cn`) - 实时/收盘行情
- 支持港股、美股、A股
## 快速开始
### 安装
```bash
pip install -e .
```
### 对话式分析(推荐)
```python
from investment_gurus import handle_user_message
# 用户问股票时自动触发
response = handle_user_message("茅台现在能买吗?")
print(response)
```
### 直接调用
```python
from investment_gurus import smart_analyze
# 分析股票
report = smart_analyze("贵州茅台")
# 对比大师方法
report = smart_analyze("宁德时代", guru="linyuan")
# 多大师对比
from investment_gurus import compare_all_methods
report = compare_all_methods("比亚迪")
```
### 命令行
```bash
# 分析股票
invest-guru analyze -s 贵州茅台
# 对比分析
invest-guru compare -s 比亚迪
```
## 功能详解
### 1. 数据抓取 (data_fetcher.py)
| 功能 | 说明 |
|------|------|
| 实时行情 | 价格、涨跌幅、成交量、PE、市值 |
| K线数据 | 历史走势 |
| 均线 | MA5/10/20/60 |
| 走势分析 | 1日/5日/1月/3月涨跌幅 |
| 板块信息 | 行业、细分 |
| 市场情绪 | VIX等 |
### 2. 智能分析 (smart_analyzer.py)
- 自动抓取实时数据
- 根据行业自动匹配最合适的大师方法
- 生成完整分析报告
**分析报告结构**:
1. 实时行情
2. 近期走势
3. 均线位置
4. 板块信息
5. 大师方法分析
6. 综合建议
### 3. Agent集成 (agent_handler.py)
当用户问股票相关问题时自动触发:
| 用户输入 | 触发 |
|----------|------|
| "茅台怎么样" | ✅ |
| "宁德时代能买吗" | ✅ |
| "用林园的方法看比亚迪" | ✅ |
| "今天天气" | ❌ |
## 大师方法对比
| 大师 | 核心理念 | 擅长行业 | 关键指标 |
|------|----------|----------|----------|
| 段永平 | 能力圈+商业模式 | 消费、科技 | 商业模式、竞争壁垒 |
| 张磊 | 超长期+动态护城河 | 科技、新能源 | 长期增长、企业家精神 |
| 林园 | 嘴巴经济+垄断 | 白酒、医药 | 成瘾性、定价权 |
| 但斌 | 伟大企业+时间玫瑰 | 消费、互联网 | 伟大企业、长期持有 |
| 邱国鹭 | 三好原则+逆向 | 金融、周期 | 好行业、好公司、好价格 |
| 李录 | 安全边际+文明视角 | 消费、科技 | 安全边际、跨市场 |
| 王国斌 | 幸运行业+企业 | 消费、制造 | 行业+企业+价格 |
## 使用示例
```python
# 1. 简单分析
from investment_gurus import smart_analyze
print(smart_analyze("贵州茅台"))
# 2. 指定大师方法
print(smart_analyze("片仔癀", guru="linyuan"))
# 3. 对比分析
from investment_gurus import compare_all_methods
print(compare_all_methods("宁德时代"))
# 4. 快速获取行情
from investment_gurus import quick_quote
print(quick_quote("腾讯"))
```
## 项目结构
```
investment_gurus/
├── investment_gurus/
│ ├── __init__.py # 入口
│ ├── base.py # 基类定义
│ ├── data_fetcher.py # 数据抓取
│ ├── smart_analyzer.py # 智能分析
│ ├── agent_handler.py # Agent集成
│ ├── analyzer.py # 综合分析器
│ ├── duan.py # 段永平
│ ├── zhanglei.py # 张磊
│ ├── liu_lu.py # 李录
│ ├── qiuguoluo.py # 邱国鹭
│ ├── wangguobin.py # 王国斌
│ ├── linyuan.py # 林园
│ └── danbing.py # 但斌
├── SKILL.md
├── README.md
├── setup.py
├── requirements.txt
└── manifest.json
```
## 依赖
- Python 3.8+
- yfinance (Yahoo Finance数据)
- pandas
- numpy
- click (CLI)
## License
MIT License
Metadata
Frequently Asked Questions
What is 20位投资大师帮你分析股票?
基于20位中外投资大师方法,提供A股美股港股实时数据抓取和多维度智能股票分析报告。 It is an AI Agent Skill for Claude Code / OpenClaw, with 76 downloads so far.
How do I install 20位投资大师帮你分析股票?
Run "/install investmentguru" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 20位投资大师帮你分析股票 free?
Yes, 20位投资大师帮你分析股票 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 20位投资大师帮你分析股票 support?
20位投资大师帮你分析股票 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 20位投资大师帮你分析股票?
It is built and maintained by amitabhama (@amitabhama); the current version is v1.0.0.
More Skills