← Back to Skills Marketplace
A-Stock Kline Analyzer
by
amatuer718
· GitHub ↗
· v1.0.3
· MIT-0
1559
Downloads
2
Stars
11
Active Installs
4
Versions
Install in OpenClaw
/install a-stock-kline-analyzer
Description
A股K线分析工具v1.0.6 - 实时行情、技术指标(MA/MACD/RSI/布林带)、K线形态识别、量能分析(量比/换手率/量价关系)、超详细结构化分析报告、技术评分系统、明日走势预测、完整名词解释
README (SKILL.md)
A-Stock Kline Analyzer v1.0.6
A股K线分析工具 - 提供实时行情、技术指标计算、K线形态识别、超详细结构化技术分析报告、技术评分系统、明日走势预测、完整技术指标名词解释。
功能
- 实时行情:新浪财经API获取实时价格
- K线数据:Baostock获取历史K线数据
- 技术指标:MA、MACD、RSI、布林带
- 形态识别:锤子线、十字星、吞没形态
- 量能分析:量比、换手率、量价关系
- 分析报告:自动生成技术分析报告
- 可视化:生成K线图(可选)
数据源
| 数据类型 | 来源 | 稳定性 |
|---|---|---|
| 实时价格 | 新浪财经 | ✅ 稳定 |
| K线历史 | Baostock | ✅ 稳定 |
使用方法
# 基础分析
python3 scripts/kline_analyzer.py --code 600409 --days 30 --realtime --report
# 生成图表
python3 scripts/kline_analyzer.py --code 600409 --days 60 --plot --output chart.png
# JSON输出
python3 scripts/kline_analyzer.py --code 600409 --json
参数说明
| 参数 | 说明 | 示例 |
|---|---|---|
--code |
股票代码 | 600409 |
--days |
获取天数 | 30 |
--period |
周期 | daily/weekly/monthly |
--realtime |
获取实时价格 | - |
--report |
生成分析报告 | - |
--plot |
生成图表 | - |
--output |
图表保存路径 | chart.png |
--json |
JSON格式输出 | - |
依赖
- Python 3.8+
- pandas
- matplotlib
- baostock
安装
pip3 install baostock pandas matplotlib --break-system-packages
示例输出
📊 600409 三友化工 技术分析报告
==================================================
【实时行情】
最新价: 8.42 元
涨跌幅: -3.11%
【技术指标】
MA5: 8.62 (股价在下方📉)
RSI(14): 67.60 (中性➖)
MACD: 0.413 (金叉📈)
【综合建议】
• MACD金叉,短期动能偏多
免责声明
本工具仅供学习研究使用,不构成投资建议。股市有风险,投资需谨慎。
版本历史
v1.0.3 (2026-03-09)
- ✅ 结构化报告格式:采用表格化、模块化展示
- ✅ 六大分析模块:趋势指标/强弱指标/布林带/K线形态/信号汇总/综合判断
- ✅ 明日走势预测:基于技术评分给出概率判断
- ✅ 操作建议:明确给出买入/持有/减仓/观望建议
- ✅ 保留v1.0.2所有功能
v1.0.4 (2026-03-09)
- ✅ 超详细报告:八大模块完整分析(行情/趋势/强弱/布林带/形态/成交量/信号/综合)
- ✅ 完整计算公式:每个指标都有定义和计算公式
- ✅ 详细判断逻辑:均线排列/MACD金叉死叉/RSI区域/布林带位置完整说明
- ✅ 操作建议细化:每个指标都有具体的操作建议
- ✅ 风险提示:包含止损建议和风险控制
- ✅ 表格化展示:所有数据用表格呈现,一目了然
v1.0.6 (2026-03-12)
- ✅ 新增量能分析模块:量比、换手率、量价关系完整分析
- ✅ 量比计算与解读:近5日/20日均量比值,分级判断标准
- ✅ 换手率分析:活跃度分级,主力资金进出判断
- ✅ 量价关系六大法则:价涨量增/价涨量缩/价跌量增/价跌量缩/天量天价/地量地价
- ✅ 量能异动监控:放量/缩量信号自动识别
- ✅ 量能选股策略:基于量比和换手率的短线选股逻辑
v1.0.3 (2026-03-09)
- ✅ 结构化报告:六大模块清晰分类
- ✅ 表格化数据:MA/MACD/RSI/布林带/K线形态/信号汇总全部表格展示
- ✅ 明日预测概率:量化预测结果
v1.0.2 (2026-03-09)
- ✅ 增强分析报告:每个指标添加详细含义说明
- ✅ 添加判断依据:每个信号都有明确解释
- ✅ 技术评分系统:-5到+5分量化多空力量
- ✅ 完整名词解释:MA/RSI/MACD/布林带/K线形态详解
- ✅ 创业板支持:300/301开头股票正常获取
- ✅ 科创板支持:688开头股票正常获取
- ✅ 综合建议优化:多空信号权重计算
v1.0.1 (2026-03-09)
- ✅ 修复创业板数据获取(300/301开头)
- ✅ 修复科创板数据获取(688开头)
- ✅ 优化股票代码识别逻辑
v1.0.0 (2026-03-09)
- ✅ 实时行情获取(新浪财经API)
- ✅ K线数据获取(Baostock)
- ✅ 技术指标计算(MA/MACD/RSI/布林带)
- ✅ K线形态识别(锤子线/十字星/吞没)
- ✅ 技术分析报告生成
- ✅ K线图可视化
许可证
MIT License
Usage Guidance
This appears to be a straightforward stock analysis tool. Before running: (1) inspect the bundled Python files (they are provided) and confirm you are comfortable with network requests to hq.sinajs.cn and Baostock; (2) install dependencies inside a virtualenv (avoid --break-system-packages and running as root); (3) if you run batch_analyze, note it will fetch multiple tickers sequentially and make outbound HTTP requests; (4) if you have privacy/security concerns, run the tool in an isolated environment. No hidden endpoints or secret exfiltration were observed in the provided files.
Capability Analysis
Type: OpenClaw Skill
Name: a-stock-kline-analyzer
Version: 1.0.3
The skill bundle is a functional stock analysis tool for the Chinese A-share market. It utilizes legitimate data sources, specifically the Sina Finance API for real-time prices and the Baostock library for historical K-line data. The core logic in `scripts/kline_analyzer.py` implements standard technical indicators (MACD, RSI, Bollinger Bands) and pattern recognition without any evidence of malicious intent, data exfiltration, or prompt injection. The network and file system activities are strictly aligned with the tool's stated purpose of fetching financial data and generating analysis reports.
Capability Assessment
Purpose & Capability
Name/description, SKILL.md, and the included Python files all consistently implement stock K‑line retrieval (Baostock) and realtime prices (Sina), technical indicators, pattern recognition, reporting and optional plotting. Required binaries and declared Python dependencies align with that purpose.
Instruction Scope
Runtime instructions and example commands only call the included scripts and require typical libs; the code fetches data from hq.sinajs.cn and Baostock and does not read unrelated system files or environment variables. No broad or vague 'gather context' instructions are present.
Install Mechanism
This is an instruction‑only skill (no packaged installer). It bundles Python source files and asks the user to pip install baostock/pandas/matplotlib. That is normal for a Python tool, but the SKILL.md suggests using pip with --break-system-packages — prefer installing into a virtualenv to avoid modifying system packages.
Credentials
The skill declares no required environment variables, and the code does not attempt to read secrets or unrelated credentials. Network access to Sina and Baostock is expected and proportionate to the stated functionality.
Persistence & Privilege
The skill does not request permanent/always inclusion, does not modify other skills or system settings, and contains no code that attempts to persist credentials or alter agent configuration.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install a-stock-kline-analyzer - After installation, invoke the skill by name or use
/a-stock-kline-analyzer - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.3
No code or content changes detected in this version.
- Version number updated, but no file changes found.
- No new features, fixes, or documentation updates in this release.
v1.0.2
- Added batch_analyze.py for batch processing multiple stocks.
- Enhanced documentation to include detailed judgment basis and term explanations in analysis reports.
- Minor updates to SKILL.md for clarification.
v1.0.1
- Added metadata with emoji and dependency information to the skill header.
- Updated the description field for better clarity.
- Added a license section (MIT License) at the end of the documentation.
v1.0.0
A-Stock Kline Analyzer v1.0.0 — Initial release.
- Provides real-time A股 prices using Sina Finance API.
- Fetches historical K-line data from Baostock.
- Calculates technical indicators (MA, MACD, RSI, Bollinger Bands).
- Recognizes classic candlestick patterns (e.g., hammer, doji, engulfing).
- Generates automated technical analysis reports.
- Supports K-line chart visualization (optional).
- Outputs in console, JSON, or as images.
Metadata
Frequently Asked Questions
What is A-Stock Kline Analyzer?
A股K线分析工具v1.0.6 - 实时行情、技术指标(MA/MACD/RSI/布林带)、K线形态识别、量能分析(量比/换手率/量价关系)、超详细结构化分析报告、技术评分系统、明日走势预测、完整名词解释. It is an AI Agent Skill for Claude Code / OpenClaw, with 1559 downloads so far.
How do I install A-Stock Kline Analyzer?
Run "/install a-stock-kline-analyzer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is A-Stock Kline Analyzer free?
Yes, A-Stock Kline Analyzer is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does A-Stock Kline Analyzer support?
A-Stock Kline Analyzer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created A-Stock Kline Analyzer?
It is built and maintained by amatuer718 (@amatuer718); the current version is v1.0.3.
More Skills