zhulinsen/daily_stock_analysis
LLM 驱动的多市场股票智能分析系统:多源行情、实时新闻、决策看板与自动推送,支持零成本定时运行。 LLM-powered multi-market stock analysis system with multi-source market data, real-time news, decision dashboard, automated notifications, and cost-free scheduled runs.
How daily_stock_analysis is put together
A Chinese-language personal stock analysis platform ('A股自选股智能分析系统') that fetches market data from many prioritized sources (East Money/efinance, akshare, tushare, pytdx, baostock, yfinance, Longbridge, TickFlow, Futu), runs AI-driven analysis via LiteLLM-backed agents, renders Jinja2 reports, and pushes them through many notification channels (Feishu, DingTalk, Discord, email, webhooks, Gotify, ntfy). It is a polyglot monorepo: a Python CLI/scheduler (main.py), a FastAPI backend (server.py -> api/app.py) backed by SQLite through SQLAlchemy, a React 19 + Vite + Tailwind SPA (apps/dsa-web), an Electron desktop wrapper bundling the built backend (apps/dsa-desktop), and multi-platform chat bots (DingTalk stream, Discord, Feishu stream) exposing slash-style commands. Data flows: data_provider fetchers -> src/core pipeline/analyzer -> LLM agent layer -> formatters/templates -> notification senders / API / bot replies.
Languages
Frameworks
Datastores
Infrastructure
Major components
CLI orchestrator & scheduler (main.py, src/scheduler.py)
Parses CLI args (--stocks, --portfolio futu, --schedule, --serve), bootstraps .env/proxy, and coordinates low-concurrency thread-pool analysis runs.
FastAPI backend (server.py, api/app.py, api/v1/, api/middlewares/)
Serves the REST API with optional admin auth middleware, error handlers, CORS, runtime scheduler service, background stock-index cache refresh, and production static hosting of the built SPA.
Data provider layer (data_provider/*)
Implements prioritized fallback fetchers for A-share/US quotes and fundamentals across ~13 sources, plus US index symbol mapping.
Analysis core (src/core/pipeline.py, src/analyzer.py, src/stock_analyzer.py, src/market_*.py, src/core/backtest_engine.py)
Runs per-stock and market-review analysis pipelines, guardrails, trading-calendar logic, and backtesting.
LLM & agent layer (src/llm/*, src/agent/*)
Unified LiteLLM/local-CLI generation backends plus an agent orchestrator with tools, memory, research/news evidence, streaming events, and Codex backend integration.
Chat bots (bot/platforms/, bot/commands/)
Dispatches user commands (analyze, ask, batch, market, history...) across DingTalk Stream, Discord, and Feishu Stream platforms.
Notification system (src/notification*.py, src/notification_sender/*)
Routes formatted reports/images to Feishu, DingTalk, Discord, email, custom webhooks, Gotify, ntfy, and AstrBot senders with noise/routing policies.
Frontends (apps/dsa-web, apps/dsa-desktop)
React 19 + Vite + Tailwind web UI consuming the API, wrapped by an Electron shell that bundles the compiled Python backend and supports auto-update.
A quiet maintenance week with two targeted fixes for cross-platform stability.
5 weeksWeek of 2026-08-24
Week of 2026-08-24latest
A quiet maintenance week with two targeted fixes for cross-platform stability.
Week of 2026-08-17
A busy release-prep week (v3.31.0) focused on more reliable market data and security.
Week of 2026-08-10
Mostly test-stabilization work to keep automated checks passing reliably.
Week of 2026-08-03
Release v3.30.0 shipped with new share-image features, mobile fixes, and faster CI.
Week of 2026-07-27
Release v3.29.0 introduced a new AlphaSift-style stock screener plus Bayesian scoring of AI skill opinions.
Over the past five weeks this stock-analysis project shipped two releases (v3.29.0 and v3.30.0) while steadily hardening its reliability: fixing broken report generation and share images, stabilizing flaky tests, and improving the CI pipeline. A major theme was smarter stock-picking — a new AlphaSift-style screener landed alongside Bayesian weighting and performance tracking for AI 'skill' opinions. The most recent weeks focused on data quality (multi-source index fallbacks, better entity resolution) and security, including patching a CVE and redacting credentials from diagnostics.
Week by week
2026-08-24A quiet maintenance week with two targeted fixes for cross-platform stability.latest2 changes
Fix
Fixed missing Chinese text in Linux share images
Report images shared on Linux systems no longer drop Chinese characters due to font issues.
Fix
Isolated runtime scheduler with portable watchdog
The background task scheduler now runs separately with a watchdog that restarts it if it hangs, working across operating systems.
2026-08-17A busy release-prep week (v3.31.0) focused on more reliable market data and security.6 changes
Feature
Multi-source fallback for China index data
A-share index quotes now automatically fall back to alternate data providers when the primary one fails.
Fix
Patched security vulnerability CVE-2026-54673
A known security flaw was fixed to keep user installations safe.
Fix
Honest reporting when news search comes up empty
Reports now explicitly state when no relevant news was found instead of silently omitting it.
Refactor
Stronger stock entity resolution
The system is better at correctly matching company names and tickers mentioned in text.
Chore
Added canonical_id column to daily price database
Stock daily prices now carry a unified identifier written to both old and new columns during migration.
Docs
Added xAI Grok integration examples
Documentation now shows how to connect the Grok AI model via LiteLLM and use it as a bot.
2026-08-10Mostly test-stabilization work to keep automated checks passing reliably.5 changes
Chore
Stabilized single-stock report date assertions
Tests checking report dates were made less brittle so they pass consistently.
Fix
Stabilized dividend TTM test fixtures
Dividend test data was made date-independent so tests don't break as time passes.
Fix
Fixed missing reports after analysis runs
Resolved an issue where completing an analysis failed to produce the expected report.
Chore
Made dividend TTM dates relative in CI
Continuous-integration tests now compute dates dynamically rather than using hardcoded values.
Docs
Updated referral links
AIHubMix referral links in documentation were replaced with InferEra links.
2026-08-03Release v3.30.0 shipped with new share-image features, mobile fixes, and faster CI.6 changes
Feature
Persisted Agent Chat skill selection per session
The chat assistant now remembers which skill you picked within a session.
Fix
Restored desktop report share images
Fixed sharing of report preview images on desktop after it had broken.
Fix
Fixed mobile touch scrolling on homepage stock panel
Scrolling through individual stocks on phones now works smoothly.
Refactor
Sharded backend tests across runners
Automated backend tests are split across multiple machines so they finish faster.
Feature
Explicit Responses API channel routing
Added clear routing rules for directing requests to the Responses API channel.
Fix
Routed Lark stream bot through international domain
The Lark chatbot connection now uses an international domain for better reachability.
2026-07-27Release v3.29.0 introduced a new AlphaSift-style stock screener plus Bayesian scoring of AI skill opinions.6 changes
Feature
Added AlphaSift-inspired stock screener
A reference stock-selection implementation was brought into the main project.
Feature
Bayesian skill outcome weights
AI 'skills' are now weighted by their historical success rates when making recommendations.
Feature
Skill opinion outcome evaluation core
Built the foundation for tracking how well past AI opinions performed.
Feature
Web one-click report sharing with share images
Users can now generate a share image and share reports directly from the web interface.
Fix
Fixed Longbridge volume_ratio silently failing
Corrected argument order in a broker API call that caused a key metric to quietly return nothing.
Fix
Redacted short credentials in CLI diagnostics
Command-line diagnostic output no longer leaks short passwords or tokens.
Dependencies and code review
Dependency advisories
Security Watch
No known advisories across 2 scanned dependencies.
No known advisories in the scanned dependencies.
Code review
No concrete code-level issues confirmed.
Get this report every week for your repos.
GitZoid learns each repo, reports what changed, and flags what needs attention. One flat price for the whole team.
$19 a month, flat · First 10 outputs free · No card required