Research Analyst v1.4.0 (Minimal)
Local financial analysis - 5 core Python scripts for stock/crypto analysis using public APIs.
What's Included
This is a minimal bundle with core features only:
| Script | Size | Description |
|---|
| INLINECODE0 | 99KB | 8-dimension stock/crypto analysis |
| INLINECODE1 |
20KB | Track holdings and P&L |
|
dividend_analyzer.py | 14KB | Dividend yield and safety scoring |
|
cn_stock_quotes.py | 3KB | China A-share realtime quotes |
|
cn_market_rankings.py | 3KB | China market top movers |
Total: 5 scripts, 139KB, bundled and reviewed by ClawHub.
Security Model
Bundled Code Architecture
v1.4.0-minimal uses bundled code (no runtime downloads):
✅ All code included - 5 Python scripts packaged with this skill
✅ ClawHub reviewed - Code reviewed during submission
✅ No runtime downloads - No git clone, scripts don't fetch external code
✅ No subprocess calls - Zero external tool dependencies
✅ No credentials required - Public APIs only
What Gets Installed
- 1. Python scripts (5 files, 139KB)
- Bundled in
scripts/ directory
- Reviewed by ClawHub
- Source: https://github.com/ZhenRobotics/openclaw-research-analyst
- 2. Dependencies from PyPI (installed separately)
-
yfinance,
requests,
beautifulsoup4,
lxml,
pandas,
numpy
- See requirements.txt for pinned versions
- Standard packages (~50M+ downloads each)
- 3. Verification script
-
verify_install.sh - Optional security checks
Installation
Requirements
Steps
1. Install skill
CODEBLOCK0
2. (Optional) Verify
CODEBLOCK1
3. Install dependencies
CODEBLOCK2
4. Test
CODEBLOCK3
That's it! No git, no GPG. Dependencies install from PyPI (standard Python practice).
Quick Start
US Stocks
CODEBLOCK4
Crypto
CODEBLOCK5
Dividends
CODEBLOCK6
Portfolio
CODEBLOCK7
China Markets
CODEBLOCK8
Features
8-Dimension Stock Analysis
Analyzes stocks across 8 weighted dimensions:
- 1. Earnings (30%) - Revenue growth, profit margins
- Fundamentals (20%) - P/E, P/B, ROE, debt ratios
- Analysts (20%) - Consensus ratings, target prices
- Historical (10%) - Long-term performance, volatility
- Market (10%) - Trading volume, liquidity
- Sector (15%) - Sector relative strength
- Momentum (15%) - Recent price action, technicals
- Sentiment (10%) - News sentiment
Output: Overall score (0-100), dimension breakdown, recommendation
Crypto Analysis
- - Market cap and dominance
- 24h/7d/30d price changes
- BTC correlation
- Trading volume
- CoinGecko trending rank
Portfolio Tracking
Local storage in ~/.clawdbot/skills/research-analyst/portfolios.json:
- - Track positions (ticker, quantity, cost)
- Calculate unrealized P&L
- Portfolio composition
- Performance metrics
Dividend Analysis
- - Dividend yield
- Payout ratio
- Dividend growth rate
- Safety score (0-100)
China Market Data
Public sources (no auth):
- - 新浪财经 (Sina Finance) - Realtime quotes
- 东方财富 (East Money) - Market rankings
Data Sources
All public APIs, read-only GET requests:
- - Yahoo Finance - Stock/crypto quotes (
query1.finance.yahoo.com) - CoinGecko - Crypto data (
api.coingecko.com) - Google News - Financial news (
news.google.com) - Sina Finance - China quotes (
sina.com.cn) - East Money - China rankings (
eastmoney.com)
Zero credentials required.
Data Flow & Privacy
What Gets Fetched
- - Stock quotes (ticker symbols, date ranges)
- Public market data (read-only GET)
What Gets Sent
- - API queries only (ticker symbols)
- No personal data
- No credentials
- No tracking
What Stays Local
- - Analysis results (computed locally)
- Portfolio data (
~/.clawdbot/skills/research-analyst/portfolios.json)
Optional: Set CLAWDBOT_STATE_DIR environment variable to customize storage location (defaults to ~/.clawdbot)
No data leaves your machine except public API queries.
Dependencies
From PyPI:
CODEBLOCK9
See requirements.txt for full list.
Dependency Trust
All dependencies are mainstream, established packages from PyPI:
~100M | Data analysis |
pypi.org/project/pandas |
|
numpy | ~200M | Numerical computing |
pypi.org/project/numpy |
|
beautifulsoup4 | ~100M | HTML parsing |
pypi.org/project/beautifulsoup4 |
|
yfinance | ~50M | Yahoo Finance API |
pypi.org/project/yfinance |
|
lxml | ~60M | XML/HTML processor |
pypi.org/project/lxml |
Why These Packages Are Safe
✅ Industry Standard: Used by millions of developers worldwide
✅ Well Maintained: Active development and security updates
✅ Open Source: Full source code available for inspection
✅ Pinned Versions: Exact versions specified to prevent surprises
✅ No Credentials: None of these packages require API keys or secrets
Before Installing (Optional Verification)
Quick verification steps (for paranoid users):
CODEBLOCK10
Install Verification
After installing, verify packages loaded correctly:
CODEBLOCK11
Supply Chain Security
Standard PyPI supply-chain risk applies (common to all Python projects):
Mitigations in place:
- - All versions pinned (prevents unexpected updates)
- Virtual environment recommended (isolation)
- No post-install scripts (pure Python)
- No compiled binaries required (platform independent)
- All packages auditable on PyPI
Additional steps you can take:
- 1. Install in isolated environment: INLINECODE23
- Review requirements.txt before installing
- Use corporate PyPI mirror if available
- Monitor installed packages: INLINECODE24
Supported Markets
| Market | Format | Example |
|---|
| US Stocks | TICKER | AAPL, MSFT |
| Crypto |
TICKER-USD | BTC-USD, ETH-USD |
| A-shares (SZ) | CODE.SZ | 002168.SZ |
| A-shares (SH) | CODE.SS | 600519.SS |
| Hong Kong | CODE.HK | 0700.HK |
Security
Bundled Code
- - ✅ All scripts bundled (reviewed by ClawHub)
- ✅ No runtime downloads (scripts don't fetch external code)
- ✅ No subprocess calls
- ✅ No system modifications
- ✅ Source: https://github.com/ZhenRobotics/openclaw-research-analyst
Dependencies
- - ✅ Installed from PyPI (standard practice)
- ✅ Pinned versions
- ✅ Install in isolated environment for safety
Verification
CODEBLOCK12
Troubleshooting
Import Errors
CODEBLOCK13
Permission Errors
CODEBLOCK14
API Rate Limits
- - Yahoo Finance: ~2000 requests/hour
- CoinGecko: 50 calls/minute
Limitations
- - Yahoo data may lag 15-20 minutes
- China data may need VPN outside China
- Crypto data limited to CoinGecko coverage
What's NOT Included
Minimal bundle excludes advanced features:
- - ❌ Watchlist alerts (subprocess)
- ❌ Twitter rumor detection (external CLI)
- ❌ News ML (model downloads)
- ❌ Scheduling (cron)
- ❌ Feishu notifications (webhooks)
For full version: https://github.com/ZhenRobotics/openclaw-research-analyst
Support
- - Issues: https://github.com/ZhenRobotics/openclaw-research-analyst/issues
- Source: https://github.com/ZhenRobotics/openclaw-research-analyst
- Security: See SECURITY.md
License
MIT-0 (Public Domain) - Free to use, modify, redistribute. No attribution required.
https://spdx.org/licenses/MIT-0.html
Disclaimer
⚠️ NOT FINANCIAL ADVICE
Informational purposes only. Not investment advice. Do your own research.
Changelog
v1.4.0-minimal (2026-03-28)
Minimal bundle - Core features only:
- - ✅ 5 Python scripts (stock, portfolio, dividends, CN market)
- ✅ All code bundled (ClawHub reviewed)
- ✅ Zero subprocess calls
- ✅ Zero external tools
- ✅ Only public APIs
- ✅ No credentials required
Removed (vs full version):
- - Advanced features with external dependencies
- ML model downloads
- Twitter integration
- Scheduling
Built for OpenClaw 🦞
研究分析师 v1.4.0(精简版)
本地金融分析 - 5个核心Python脚本,通过公共API进行股票/加密货币分析。
包含内容
这是一个精简包,仅包含核心功能:
| 脚本 | 大小 | 描述 |
|---|
| stockanalyzer.py | 99KB | 8维度股票/加密货币分析 |
| portfoliomanager.py |
20KB | 跟踪持仓和盈亏 |
| dividend_analyzer.py | 14KB | 股息收益率和安全评分 |
| cn
stockquotes.py | 3KB | 中国A股实时行情 |
| cn
marketrankings.py | 3KB | 中国市场涨跌排行 |
总计:5个脚本,139KB,由ClawHub打包并审核。
安全模型
打包代码架构
v1.4.0-精简版 使用打包代码(无需运行时下载):
✅ 包含所有代码 - 此技能打包了5个Python脚本
✅ ClawHub审核 - 提交时已审核代码
✅ 无需运行时下载 - 无git clone,脚本不获取外部代码
✅ 无子进程调用 - 零外部工具依赖
✅ 无需凭证 - 仅使用公共API
安装内容
- 1. Python脚本(5个文件,139KB)
- 打包在 scripts/ 目录中
- 由ClawHub审核
- 来源:https://github.com/ZhenRobotics/openclaw-research-analyst
- 2. PyPI依赖(单独安装)
- yfinance、requests、beautifulsoup4、lxml、pandas、numpy
- 查看 requirements.txt 获取固定版本
- 标准包(每个下载量超过5000万次)
- 3. 验证脚本
- verify_install.sh - 可选安全检查
安装
要求
步骤
1. 安装技能
bash
claw install research-analyst
cd ~/.clawdbot/skills/research-analyst/
2.(可选)验证
bash
bash verify_install.sh
3. 安装依赖
bash
pip install -r requirements.txt
4. 测试
bash
python3 scripts/stock_analyzer.py AAPL
就这样!无需git,无需GPG。依赖从PyPI安装(标准Python实践)。
快速开始
美股
bash
python3 scripts/stock_analyzer.py AAPL
python3 scripts/stock_analyzer.py AAPL MSFT GOOGL
加密货币
bash
python3 scripts/stock_analyzer.py BTC-USD ETH-USD
股息
bash
python3 scripts/dividend_analyzer.py JNJ PG KO
投资组合
bash
查看投资组合
python3 scripts/portfolio_manager.py show
添加持仓
python3 scripts/portfolio_manager.py add AAPL --quantity 100 --cost 150
移除持仓
python3 scripts/portfolio_manager.py remove AAPL
中国市场
bash
A股行情(深圳)
python3 scripts/cn
stockquotes.py 002168.SZ
A股行情(上海)
python3 scripts/cn
stockquotes.py 600519.SS
港股
python3 scripts/cn
stockquotes.py 0700.HK
涨跌排行
python3 scripts/cn
marketrankings.py
功能特性
8维度股票分析
从8个加权维度分析股票:
- 1. 盈利(30%)- 营收增长、利润率
- 基本面(20%)- 市盈率、市净率、净资产收益率、负债比率
- 分析师(20%)- 一致评级、目标价
- 历史(10%)- 长期表现、波动率
- 市场(10%)- 交易量、流动性
- 行业(15%)- 行业相对强度
- 动量(15%)- 近期价格走势、技术指标
- 情绪(10%)- 新闻情绪
输出:总体评分(0-100)、维度分解、推荐建议
加密货币分析
- - 市值和主导地位
- 24小时/7天/30天价格变化
- 比特币相关性
- 交易量
- CoinGecko趋势排名
投资组合跟踪
本地存储在 ~/.clawdbot/skills/research-analyst/portfolios.json:
- - 跟踪持仓(代码、数量、成本)
- 计算未实现盈亏
- 投资组合构成
- 绩效指标
股息分析
- - 股息收益率
- 派息比率
- 股息增长率
- 安全评分(0-100)
中国市场数据
公共来源(无需认证):
数据来源
所有公共API,只读GET请求:
- - 雅虎财经 - 股票/加密货币行情(query1.finance.yahoo.com)
- CoinGecko - 加密货币数据(api.coingecko.com)
- 谷歌新闻 - 财经新闻(news.google.com)
- 新浪财经 - 中国行情(sina.com.cn)
- 东方财富 - 中国排行(eastmoney.com)
无需任何凭证。
数据流与隐私
获取内容
- - 股票行情(股票代码、日期范围)
- 公共市场数据(只读GET)
发送内容
- - 仅API查询(股票代码)
- 无个人数据
- 无凭证
- 无跟踪
本地保留内容
- - 分析结果(本地计算)
- 投资组合数据(~/.clawdbot/skills/research-analyst/portfolios.json)
可选:设置 CLAWDBOTSTATEDIR 环境变量自定义存储位置(默认为 ~/.clawdbot)
除公共API查询外,无数据离开您的机器。
依赖
来自PyPI:
yfinance==0.2.40
requests==2.31.0
beautifulsoup4==4.12.3
lxml==5.1.0
pandas==2.2.0
numpy==1.26.3
+ 传递依赖
查看 requirements.txt 获取完整列表。
依赖信任
所有依赖均为来自PyPI的主流、成熟包:
~1亿 | 数据分析 |
pypi.org/project/pandas |
|
numpy | ~2亿 | 数值计算 |
pypi.org/project/numpy |
|
beautifulsoup4 | ~1亿 | HTML解析 |
pypi.org/project/beautifulsoup4 |
|
yfinance | ~5000万 | 雅虎财经API |
pypi.org/project/yfinance |
|
lxml | ~6000万 | XML/HTML处理器 |
pypi.org/project/lxml |
为何这些包安全
✅ 行业标准:全球数百万开发者使用
✅ 维护良好:积极开发和安全更新
✅ 开源:完整源代码可供检查
✅ 固定版本:指定确切版本防止意外
✅ 无需凭证:这些包均不需要API密钥或密钥
安装前(可选验证)
快速验证步骤(适用于偏执用户):
bash
1. 在PyPI上查看包信息
访问上述每个包的链接并检查:
- 最近更新日期
- 发布次数
- 维护者信息
- 下载统计
2. 检查包声誉
pip show yfinance # 安装后查看元数据
pip show requests
pip show pandas
3. 验证无意外依赖
pip install -r requirements.txt --dry-run
在实际安装前查看依赖树
安装验证
安装后,验证包正确加载:
bash
测试导入(应无网络活动完成)
python3 -c import yfinance; import