Back to Daily Stock Analysis

AI Stock Analysis System

docs/README_EN.md

3.15.014.8 KB
Original Source
<div align="center">

AI Stock Analysis System

<p align="center"> <a href="https://trendshift.io/repositories/18527" target="_blank"></a> <a href="https://hellogithub.com/repository/ZhuLinsen/daily_stock_analysis" target="_blank"></a> </p>

AI-powered stock analysis system for A-shares / Hong Kong / US stocks

Analyze your watchlist daily -> generate a decision dashboard -> push to Telegram / Discord / Slack / Email / WeChat Work / Feishu.

Key Features ยท Quick Start ยท Sample Output ยท Full Guide ยท FAQ ยท Changelog

This PR-doc update is documentation-only and does not introduce runtime implementation changes. Provider recommendations for Anspire / AIHubMix / SerpAPI reflect existing runtime capabilities and configuration semantics.

English | ็ฎ€ไฝ“ไธญๆ–‡ | ็น้ซ”ไธญๆ–‡

</div>

๐Ÿ’– Sponsors

<div align="center"> <p align="center"> <a href="https://open.anspire.cn/?share_code=QFBC0FYC" target="_blank"></a> <a href="https://serpapi.com/baidu-search-api?utm_source=github_daily_stock_analysis" target="_blank"></a> </p> </div>

โœจ Key Features

ModuleFeatureDescription
AIDecision DashboardOne-sentence conclusion + score + entry/exit levels + risk alerts + action checklist
AnalysisMulti-dimensional AnalysisTechnicals, realtime quotes, chip distribution, news sentiment, announcements, capital flow, and fundamentals
MarketGlobal MarketsA-shares, Hong Kong stocks, US stocks, US indices, and common ETFs
StrategyMarket Strategy SystemA-share review, US regime strategy, moving averages, Chan theory, Elliott wave, and sentiment-cycle support
ReviewMarket ReviewDaily market overview, index performance, breadth, and sector strength (supports cn / hk / us / both)
WebDual-theme WorkspaceManual analysis, settings, task progress, history, backtest, and portfolio management
ImportSmart Import & AutocompleteImage, CSV/Excel, and clipboard import; search by code, name, pinyin, and aliases
HistoryReport ManagementFull Markdown reports, rerun analysis, history browsing, and batch management
BacktestAI Backtest ValidationValidate historical analysis with directional accuracy and simulated return views
Agent Q&AStrategy ChatMulti-turn strategy chat with 11 built-in strategies across Web/Bot/API
NotificationsMulti-channel PushWeChat Work, Feishu, Telegram, Discord, Slack, Email, and more
AutomationScheduled RunsGitHub Actions, Docker, local scheduler, and FastAPI service mode

Detailed fields, fundamental P0 timeout semantics, trading rules, data-source priority, Web/API behavior, and troubleshooting live in the Full Guide.

Tech Stack & Data Sources

TypeSupported
AI ModelsAnspire, AIHubMix, Gemini, OpenAI-compatible providers, DeepSeek, Qwen, Claude, Ollama
Market DataTickFlow, AkShare, Tushare, Pytdx, Baostock, YFinance, Longbridge
News SearchAnspire, SerpAPI, Tavily, Bocha, Brave, MiniMax, SearXNG
Social SentimentStock Sentiment API for Reddit / X / Polymarket, US stocks only

Full behavior is documented in Data Source Configuration.

๐Ÿš€ Quick Start

Deploy in about 5 minutes, with no server and no infrastructure cost.

1. Fork this repository

Click Fork in the upper-right corner. A star is very welcome if this project helps you.

2. Configure Secrets

Open your forked repository, then go to Settings -> Secrets and variables -> Actions -> New repository secret.

AI model configuration (configure at least one)

Start with one provider and one API key. For multi-model routing, image recognition, local models, or advanced routing, see the LLM Config Guide.

Secret NameDescriptionRequired
ANSPIRE_API_KEYSAnspire API key, one key for popular LLMs and web search with free quota for this projectRecommended
AIHUBMIX_KEYAIHubMix API key, one key for multiple model families and a 10% top-up discount for this projectRecommended
GEMINI_API_KEYGoogle Gemini API keyOptional
ANTHROPIC_API_KEYAnthropic Claude API keyOptional
OPENAI_API_KEYOpenAI-compatible API key, including DeepSeek and Qwen-compatible servicesOptional
OPENAI_BASE_URL / OPENAI_MODELFill these when using an OpenAI-compatible providerOptional

Ollama is better suited for local or Docker deployment. GitHub Actions is usually smoother with a cloud API.

Notification channels (configure at least one)

Secret NameDescription
WECHAT_WEBHOOK_URLWeChat Work bot
FEISHU_WEBHOOK_URLFeishu bot
TELEGRAM_BOT_TOKEN + TELEGRAM_CHAT_IDTelegram
DISCORD_WEBHOOK_URLDiscord webhook
SLACK_BOT_TOKEN + SLACK_CHANNEL_IDSlack bot
EMAIL_SENDER + EMAIL_PASSWORDEmail push

More channels, signatures, email groups, and Markdown-to-image settings are in Notification Configuration.

Watchlist (required)

Secret NameDescriptionRequired
STOCK_LISTWatchlist codes, such as 600519,hk00700,AAPL,TSLAโœ…

News sources (recommended)

News search strongly improves sentiment, announcements, events, and catalyst quality. Configure at least one search provider if possible.

Secret NameDescriptionRequired
ANSPIRE_API_KEYSAnspire AI Search, optimized for Chinese content and A-share analysis; the same key can also be used for Anspire LLM fallback examplesRecommended
SERPAPI_API_KEYSSerpAPI, search-engine results for realtime financial newsRecommended
TAVILY_API_KEYSTavily, general news search APIOptional
BOCHA_API_KEYSBocha, Chinese search with AI summariesOptional
BRAVE_API_KEYSBrave Search, privacy-first search and US-stock news enrichmentOptional
MINIMAX_API_KEYSMiniMax, structured search resultsOptional
SEARXNG_BASE_URLSSelf-hosted SearXNG instances for quota-free fallbackOptional

More search providers, social sentiment, and fallback behavior are in Search Configuration.

3. Enable Actions

Open the Actions tab and click I understand my workflows, go ahead and enable them.

4. Manual Test

Actions -> Daily Stock Analysis -> Run workflow -> Run workflow.

Done

By default, the workflow runs every weekday at 18:00 Beijing time and skips non-trading days. Forced runs, trading-day checks, and resume rules are covered in the Full Guide.

Option 2: Local / Docker Deployment

bash
# Clone the project
git clone https://github.com/ZhuLinsen/daily_stock_analysis.git && cd daily_stock_analysis

# Install dependencies
pip install -r requirements.txt

# Configure environment variables
cp .env.example .env && vim .env

# Run analysis
python main.py

Common commands:

bash
python main.py --debug
python main.py --dry-run
python main.py --stocks 600519,hk00700,AAPL
python main.py --market-review
python main.py --schedule
python main.py --serve-only

Docker deployment, scheduling, and cloud-server WebUI access are documented in the Full Guide.

๐Ÿ“ฑ Sample Output

Decision Dashboard

markdown
๐ŸŽฏ 2026-02-08 Decision Dashboard
Analyzed 3 stocks | ๐ŸŸข Buy:0 ๐ŸŸก Watch:2 ๐Ÿ”ด Sell:1

๐Ÿ“Š Summary
๐ŸŸก 000657: Watch | Score 65 | Bullish
๐ŸŸก 600105: Watch | Score 48 | Range-bound
๐Ÿ”ด 300260: Sell | Score 35 | Bearish

๐Ÿšจ Risk Alerts:
Risk 1: Main-force funds showed notable outflow.
Risk 2: Chip concentration suggests short-term resistance.

โœจ Positive Catalysts:
Catalyst 1: AI-server supply-chain exposure remains a market focus.
Catalyst 2: Recent earnings growth provides fundamental support.

Market Review

markdown
๐ŸŽฏ 2026-01-10 Market Review

๐Ÿ“Š Major Indices
- SSE Composite: 3250.12 (+0.85%)
- SZSE Component: 10521.36 (+1.02%)
- ChiNext: 2156.78 (+1.35%)

๐Ÿ“ˆ Market Breadth
Up: 3920 | Down: 1349 | Limit up: 155 | Limit down: 3

โš™๏ธ Configuration

Full environment variables, model routing, notification channels, data-source priority, trading rules, fundamental P0 semantics, and deployment details are in the Full Guide.

๐Ÿ–ฅ๏ธ Web UI

The Web workspace supports settings, task monitoring, manual analysis, history reports, backtest, portfolio management, smart import, and light/dark themes.

bash
python main.py --webui
python main.py --webui-only

Visit http://127.0.0.1:8000. Authentication, smart import, autocomplete, report copying, and cloud-server access are documented in Local WebUI Management.

๐Ÿค– Agent Strategy Chat

After configuring any available AI API key, the Web /chat page can use strategy chat. Set AGENT_MODE=false only if you want to disable it explicitly.

  • Built-in strategies include moving-average crossovers, Chan theory, Elliott wave, bull trend, and more
  • Calls realtime quotes, K-line data, technical indicators, news, and risk context
  • Supports follow-up questions, session export, notification sending, and background execution
  • Supports custom strategy files and experimental multi-agent orchestration

Agent parameters, skill naming compatibility, multi-agent mode, and budget guards are covered in the Full Guide and LLM Config Guide.

DSA focuses on daily analysis reports. These sibling projects cover stock screening, strategy validation, and strategy evolution for users who want to extend the workflow. They are maintained independently today, with candidate import, backtest validation, and report handoff planned as future integration directions.

  • AlphaSift: multi-factor stock screening and full-market scanning for building candidate watchlists.
  • AlphaEvo: strategy backtesting and self-evolution experiments for validating rules and iteratively exploring strategy parameters and combinations.

๐Ÿ—บ๏ธ Roadmap

See supported features and release notes in the Changelog. Suggestions are welcome through GitHub Issues.

UI pages are still being polished. Please report style, interaction, or compatibility issues through Issues or Pull Requests.


โ˜• Support the Project

AlipayWeChat PayXiaohongshu

๐Ÿ“„ License

MIT License ยฉ 2026 ZhuLinsen

If you use or build on this project, attribution with a link back to this repository is appreciated.

๐Ÿ“ž Contact

โญ Star History

Star this repo if you find it useful.

<a href="https://star-history.com/#ZhuLinsen/daily_stock_analysis&Date"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=ZhuLinsen/daily_stock_analysis&type=Date&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=ZhuLinsen/daily_stock_analysis&type=Date" /> </picture> </a>

โš ๏ธ Disclaimer

This project is for informational and educational purposes only. AI-generated analysis is not investment advice. Stock market investing involves risk; do your own research and consult a licensed financial advisor when needed.