Home / Open Source / daily_stock_analysis

daily_stock_analysis

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.

PythonMITApplication
โญ GitHubhttps://github.com/ZhuLinsen/daily_stock_analysis
59,265
Stars
+16,289
Star growth
Jul 27, 2026
Last updated
7,497
Clicks

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)

  1. Fork the repository
  2. Configure Secrets (API keys, stock list, notification webhooks)
  3. 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.