An LLM-powered A-share (Chinese stock market) intelligent analysis system that aggregates multi-source market data and real-time news, uses Gemini AI to generate daily decision dashboards, and pushes reports to WeChat Work, Feishu, Telegram, or email via GitHub Actions at zero cost.
daily_stock_analysis — LLM-Powered A-Share Intelligent Stock Analyzer
Overview
daily_stock_analysis is an open-source, zero-cost intelligent stock analysis system built for the Chinese A-share market. It leverages large language models (primarily Google Gemini) to automatically analyze a user's watchlist every trading day and deliver a structured "Decision Dashboard" to multiple notification channels including WeChat Work, Feishu, Telegram, and email.
The entire pipeline runs on GitHub Actions for free — no server required.
Core Features
AI Decision Dashboard
Each stock in the watchlist receives a concise AI-generated report including:
- A one-sentence core conclusion (Buy / Hold / Sell)
- Precise entry price, stop-loss price, and target price
- A structured checklist with ✅ ⚠️ ❌ indicators for each condition
Multi-Dimensional Analysis
The system evaluates stocks from four angles:
- Technical analysis — Moving average alignment (MA5 > MA10 > MA20), deviation rate
- Chip distribution — Volume and position concentration signals
- Sentiment intelligence — Real-time news fetched via Tavily or SerpAPI
- Live market data — Intraday quotes from multiple data providers
Market Overview
A daily market summary is also generated covering:
- Major indices (SSE, SZSE, ChiNext) with price and change
- Market breadth: advancing vs. declining stocks, limit-up/limit-down counts
- Sector rotation: top-gaining and top-declining sectors
- Northbound capital flow (北向资金)
Multi-Channel Push Notifications
Results are delivered simultaneously to all configured channels:
- WeChat Work (企业微信) Webhook
- Feishu (飞书) Webhook
- Telegram Bot
- Email (SMTP)
- Custom Webhooks (DingTalk, Discord, Slack, Bark, etc.)
Zero-Cost Deployment
- Runs entirely on GitHub Actions (free for public repos)
- Uses Google Gemini free tier via Google AI Studio
- Market data sourced from AkShare (free), with optional Tushare / Baostock / YFinance
Architecture
daily_stock_analysis/
├── main.py # Entry point
├── analyzer.py # Gemini AI analyzer
├── market_analyzer.py # Market overview analysis
├── search_service.py # News search (Tavily / SerpAPI)
├── notification.py # Multi-channel push
├── scheduler.py # Scheduled task manager
├── storage.py # Data persistence
├── config.py # Config & env loader
├── data_provider/ # Data source adapters
│ ├── akshare_fetcher.py
│ ├── tushare_fetcher.py
│ ├── baostock_fetcher.py
│ └── yfinance_fetcher.py
├── .github/workflows/ # GitHub Actions workflow
├── Dockerfile
└── docker-compose.yml
AI Model Support
| Model | Role | Cost |
|---|---|---|
| Google Gemini (gemini-3-flash-preview) | Primary | Free tier |
| Gemini 2.5 Flash | Fallback | Free tier |
| OpenAI-compatible APIs (DeepSeek, Qwen, Moonshot, GLM) | Alternative | Varies |
Data Sources
| Category | Providers |
|---|---|
| Market data | AkShare (free), Tushare Pro, Baostock, YFinance |
| News / Sentiment | Tavily, SerpAPI |
| AI Analysis | Google Gemini, OpenAI-compatible APIs |
Deployment Options
Option 1: GitHub Actions (Recommended)
- Fork the repository
- Configure Secrets (API keys, stock list, notification webhooks)
- Enable Actions → runs automatically every weekday at 18:00 CST
Option 2: Local Run
git clone https://github.com/ZhuLinsen/daily_stock_analysis.git
cd daily_stock_analysis
pip install -r requirements.txt
cp .env.example .env # fill in your keys
python main.py
Option 3: Docker
cp .env.example .env
docker-compose up -d
Built-in Trading Philosophy
The system enforces a set of opinionated trading rules automatically:
- No chasing highs — stocks with deviation rate > 5% are flagged as "Dangerous"
- Trend following — requires MA5 > MA10 > MA20 bullish alignment
- Precise entry/exit — always outputs buy price, stop-loss, and target price
- Transparency — every condition is explicitly checked and labeled
Use Cases
- Individual retail investors who want daily AI-generated analysis of their A-share watchlist
- Developers learning how to build LLM-powered financial tools
- Quant enthusiasts looking for a free, extensible stock analysis pipeline
Disclaimer
This project is for educational and research purposes only. It does not constitute investment advice. The stock market involves risk; invest responsibly. The author is not liable for any losses resulting from use of this project.