Last week, I open-sourced an AI-powered stock analysis system for the Chinese A-share market. Today I want to show you what it actually does — with real data from the July 30 trading session.
The Problem
Most A-share analysis tools fall into one camp: purely technical (MACD/KDJ/RSI overlays), purely fundamental (PEG/ROE screens), or purely sentiment-based (social media buzz). None of them talk to each other. Retail investors are left stitching three separate dashboards together.
The Solution: Three-Pillar Scoring
The system (called A-Share Stock Analysis Expert) runs three independent analysis pipelines on every stock in the watchlist:
1. Technical Analysis (10 pts)
Python-native MACD, KDJ, RSI, Bollinger Bands, and moving average systems — all matching Tongdaxin (通达信) calculation standards. No external dependencies, no API keys needed.
2. Fundamental Analysis (10 pts)
DuPont ROE decomposition, PEG valuation, and Buffett-style "three ratios" screening with industry-specific weighting.
3. Intelligence Analysis (10 pts)
Majors capital flow tracking, Xueqiu sentiment, dragon-and-tiger list monitoring, institutional position changes, and policy timing.
Total score: 30 points. Only stocks scoring 12+ trigger a buy signal.
What It Flagged Today (July 30, 2026)
Today was a rough session — Shanghai Composite -1.15%, Shenzhen Component -3.79%. But the system spotted several interesting moves:
Limit Up Signal: 闰土股份 (002440) +10.00%
Technical score: 4/10 — Bullish MACD, golden cross on KDJ, touching upper Bollinger. The system flagged the bullish alignment before the breakout.
Confirmed Uptrend: 龙佰集团 (002601) +0.36%
Scored 5/10 technically — bullish MACD, bullish KDJ, neutral-bullish RSI. Not an explosive play, but steady accumulation in an otherwise red market.
Limit Down Warning: 兴业科技 (002674) -10.00%
The intelligence layer flagged "4 consecutive up days" (连涨4天) — a classic exhaustion signal. The system was already on watch for a reversal.
Pattern Recognition Samples
From the training pipeline (36 samples collected across 5 patterns):
| Pattern | Example | Signal |
|---|---|---|
| Breakout | 中国中免 +3.37% | Bullish breakout with volume — buy on confirmation |
| Trend | 隆基绿能 +1.03% | Healthy uptrend channel — hold and add on dips |
| Pullback | 北方华创 -1.20% | Low-volume pullback — accumulation zone |
Training Pipeline
The system runs a daily cron job at 15:10 (market close +10min) to collect real-time quotes via the free Sina Finance API for 12 core A-share stocks. Each day's data is classified into one of 5 pattern types:
- 放量突破 (Breakout with Volume)
- 缩量回调 (Low-Volume Pullback)
- 高位放量下跌 (High-Level Volume Selloff)
- 趋势追踪 (Trend Following)
- 横盘震荡 (Sideways Consolidation)
The goal: accumulate 200+ labeled samples for QLoRA fine-tuning.
What's Next
- Fine-tune a LLaMA model on the accumulated training data for better pattern recognition
- Integrate the iTick API for real-time data without scraping
- Add portfolio tracking with stop-loss alerts
Try It Yourself
The complete source code and tools are available:
- GitHub: github.com/Felixwang007 (repo: daily-stock-analysis)
- Xiaping Marketplace: Search "A-Share Stock Analysis Expert" on xiaping.coze.com for the ready-to-use skill
Whether you trade A-shares or just want to understand how AI agents can analyze financial markets, I hope this gives you a practical starting point. Pull requests and ideas welcome!
Top comments (0)