← Back to Skills Marketplace
coxlong

AkShare Analysis

by xlong · GitHub ↗ · v1.1.2 · MIT-0
cross-platform ✓ Security Clean
359
Downloads
0
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install akshare-analysis
Description
Analyze Hong Kong (5-digit) and A-share (6-digit) stocks across six dimensions to generate BUY/HOLD/SELL signals with confidence scores using akshare data.
README (SKILL.md)

AKShare Stock Analysis

Analyze Hong Kong and A-share stocks with 6-dimension scoring using akshare as the data source. Works reliably on servers where Yahoo Finance is rate-limited.

Ticker Format

Market Format Example
Hong Kong 5-digit 00700 (Tencent), 09988 (Alibaba)
A-Share 6-digit 600519 (Moutai), 000858 (Wuliangye)

Quick Commands

# Single stock analysis
uv run {baseDir}/scripts/analyze.py 00700

# Multiple stocks
uv run {baseDir}/scripts/analyze.py 00700 09988 600519

# JSON output
uv run {baseDir}/scripts/analyze.py 00700 --output json

# Verbose (show per-dimension scores)
uv run {baseDir}/scripts/analyze.py 00700 --verbose

# Generate HTML report
uv run {baseDir}/scripts/analyze.py 00700 --report
uv run {baseDir}/scripts/render_report.py /data/stock-reports/00700/20260329_030822

# Search stock news (supports multiple keywords)
uv run {baseDir}/scripts/news.py 00700 腾讯 港股
uv run {baseDir}/scripts/news.py 600519 茅台 A股 --json

HTML Report Generation

Four-step workflow for generating comprehensive reports:

Step 1: Analyze and generate report directory

uv run {baseDir}/scripts/analyze.py 00700 --report
# Creates: /data/stock-reports/00700/20260329_030822/
#   ├── chart_data.json  (K线+MA+布林带+RSI+MACD+成交量)
#   └── data.json        (structured analysis data)

Step 2: Search news

# Search by ticker, name, and market keywords
uv run {baseDir}/scripts/news.py 00700 腾讯 港股
uv run {baseDir}/scripts/news.py 600519 茅台 A股

# For HK stocks, use: ticker + name + "港股"
# For A-shares, use: ticker + name + "A股"

Step 3: Generate AI analysis (manual) Based on the news from Step 2 and technical data from Step 1, create ai_analysis.md in the report directory:

---
generated_at: 2026-03-29T20:30:00
---

## 市场情绪
... (summarize key news sentiment)

## 技术面解读
... (combine news + technical indicators from data.json)

## 关键事件影响
... (major news events and their impact)

## 综合展望
... (overall outlook combining fundamentals + technicals + news)

## 风险提示
... (key risks identified from news and technicals)

Step 4: Render HTML report

uv run {baseDir}/scripts/render_report.py /data/stock-reports/00700/20260329_030822
# Generates: index.html (self-contained with embedded charts + AI analysis)

The HTML report includes: signal badge, dimension scores with visual bars, financial metrics, analyst forecasts (HK only), technical charts, and optional AI analysis section.

Analysis Dimensions

Dimension Weight HK A-Share Data Source
Fundamentals 25% ROE, net margin, profit growth
Analyst 20% Target prices, ratings
Momentum 20% RSI(14), 52-week position
Valuation 15% ⚠️ P/E, P/B
Trend 10% MA5/MA20 crossover, 20d change
Volume 10% 5d vs 60d average volume

Signal Logic

  • BUY: weighted score > 0.33
  • SELL: weighted score \x3C -0.33
  • HOLD: otherwise
  • Confidence = abs(score) × 100%

Limitations

  • A-shares: no analyst forecast data (akshare doesn't provide per-stock analyst ratings for A-shares)
  • A-shares: P/E and P/B may be unavailable depending on market hours
  • Data is delayed (not real-time intraday)

Disclaimer

⚠️ NOT FINANCIAL ADVICE. For informational purposes only.

Usage Guidance
This skill appears to do what it says (akshare-based analysis), but before installing or running it consider the following: 1) Dependency and runtime: the scripts need Python packages (akshare, pandas, mplfinance, etc.) and the 'uv' runner referenced in SKILL.md — make sure they are installed in a controlled environment. 2) Network access: the scripts call akshare which fetches data from the internet; run in an environment where outbound network access to data sources is acceptable. 3) Filesystem writes: the workflow creates report directories and files under /data/stock-reports (absolute path) — ensure you are okay with files being written there or edit the scripts/commands to use a different path or sandbox. 4) Minor code issues: news.py.format_json references an undefined variable 'keywords' (will raise a NameError when using --json); you may want to fix or test the script before relying on it. 5) Review and test in a sandbox: because the skill executes bundled Python code and performs network I/O and file writes, test it in an isolated environment (container or VM) and inspect/install required packages yourself. If you need this run on a shared/production host, consider adjusting paths and verifying dependencies first.
Capability Analysis
Type: OpenClaw Skill Name: akshare-analysis Version: 1.1.2 The akshare-analysis skill bundle is a legitimate tool for analyzing Hong Kong and A-share stocks. It uses the well-known 'akshare' library to fetch financial data and news, calculates standard technical indicators (RSI, KDJ, MACD, etc.) in 'indicators.py', and generates HTML reports via 'render_report.py'. The workflow is transparently documented in 'SKILL.md', and file system operations are confined to a specific report directory (/data/stock-reports/). No evidence of data exfiltration, malicious execution, or prompt injection was found.
Capability Assessment
Purpose & Capability
The scripts (analyze.py, horizons.py, indicators.py, news.py, render_report.py) implement the described six-dimension stock analysis using akshare and pandas; network calls to akshare are expected for this purpose. One small metadata mismatch: SKILL.md's embedded metadata lists a required binary 'uv' while the registry metadata reported 'no required binaries'. The presence of akshare/pandas/mplfinance in script headers is consistent with the declared functionality.
Instruction Scope
Runtime instructions tell the agent to run the included Python scripts which fetch data from akshare (internet), produce analysis, and create report directories/files. The workflow writes report files into absolute paths like /data/stock-reports/<ticker>/..., and render_report.py reads data.json, chart_data.json and optional ai_analysis.md. These file I/O operations are consistent with report generation but mean the skill will read/write the host filesystem and perform outbound network requests.
Install Mechanism
There is no install spec (instruction-only), so nothing will be automatically downloaded at install time. However, the scripts declare dependencies in comments (akshare, pandas, mplfinance, etc.) but do not supply an automated installer; the host must have these Python packages and the 'uv' runner available. That mismatch can cause runtime failures if dependencies are missing.
Credentials
The skill requests no environment variables or credentials and does not require unrelated secrets. Network access to akshare (and any hosts akshare contacts) is necessary for functionality; no other credentials or external endpoints are requested by the code.
Persistence & Privilege
always:false (normal). The skill writes persistent report files under /data/stock-reports and may create index.html and JSON files there. It does not request elevated platform privileges, does not claim to modify other skills, and does not persist agent configuration, but you should be aware it will create files in absolute filesystem locations.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install akshare-analysis
  3. After installation, invoke the skill by name or use /akshare-analysis
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.2
- Updated the skill description and trigger conditions: now triggers for analysis requests involving Chinese company names (e.g., 腾讯, 阿里巴巴, 茅台) as well as tickers, and supports wider keywords (港股, A股, 中概股, investment/trading analysis for Chinese companies). - No changes to core commands, features, or analysis logic. - Documentation now highlights support for company name-based queries, in addition to ticker codes.
v1.1.1
- Added scripts/news.py for searching and retrieving stock news by ticker, name, and market keywords. - Updated documentation to include news search functionality and revised the report generation workflow to integrate news analysis. - Improved directory structure for HTML report outputs (now organized by ticker and datetime). - Expanded instructions for combining news and technical data manually for enhanced AI analysis reports.
v1.1.0
akshare-analysis 1.1.0 - Added new analysis modules: horizons.py and indicators.py for expanded analytical capabilities. - Updated analyze.py and render_report.py scripts to integrate new modules and workflows. - HTML report workflow now uses chart_data.json and allows external AI analysis via ai_analysis.md. - Documentation updated to reflect new report formats and AI analysis integration steps.
v1.0.0
Initial release with multi-dimensional stock analysis for Hong Kong and A-share markets: - Analyze HK (5-digit) and A-share (6-digit) stocks using akshare data. - Covers 6 analysis dimensions: fundamentals, valuation, analyst forecasts, momentum, trend, and volume. - Outputs BUY/HOLD/SELL signals with confidence scores for individual tickers. - Provides CLI tools for detailed analysis, JSON/HTML reports, and visual charts. - Automatically triggers on HK/A-share stock mentions or relevant tickers.
Metadata
Slug akshare-analysis
Version 1.1.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

What is AkShare Analysis?

Analyze Hong Kong (5-digit) and A-share (6-digit) stocks across six dimensions to generate BUY/HOLD/SELL signals with confidence scores using akshare data. It is an AI Agent Skill for Claude Code / OpenClaw, with 359 downloads so far.

How do I install AkShare Analysis?

Run "/install akshare-analysis" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is AkShare Analysis free?

Yes, AkShare Analysis is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does AkShare Analysis support?

AkShare Analysis is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created AkShare Analysis?

It is built and maintained by xlong (@coxlong); the current version is v1.1.2.

💬 Comments