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.