# Repository Briefing: ZhuLinsen/daily_stock_analysis
> Source: https://repoforai.com/repo/ZhuLinsen/daily_stock_analysis (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/ZhuLinsen/daily_stock_analysis
- **Official Docs / Website**: https://dsa.zhulinsen.tech
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A+ (100/100 · Maintenance 35/35 · Adoption 25/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v3.35.0 (2026-11-16) — https://github.com/ZhuLinsen/daily_stock_analysis/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: MCP, Docker, Self-Hosted, Local AI, CLI, API
- **Momentum**: 75,894 ★ total (+89 24h / +870 7d) · 59,428 forks
- **Topics**: `a-stock`, `ai-agent`, `aigc`, `llm`, `quant`, `quantitative-finance`, `quantitative-trading`
- **When to Use**: Best for: Investors or research teams that want scheduled cross-market watchlist briefings, source-aware review, and follow-up questions through Web, Bot, or API. Skip if: You require fully offline market data, guaranteed feed freshness, validated trading signals, or automated order execution.

## Overview
```text
### Architecture & Core Mechanics
Daily Stock Analysis is a Python application that assembles watchlist research from market data and news, uses an LLM to synthesize reports, and presents or delivers results through Web, Bot, and notification channels. The root tree separates `data_provider/`, `src/`, `api/`, `bot/`, and `strategies/`. `main.py` is the documented CLI entry point. The dependency set includes `python-dotenv` for configuration, Tenacity for retry and backoff, SQLAlchemy for database access, `schedule` for periodic jobs, and `exchange-calendars` for trading calendars.

The market-data layer defines an ordered fallback rather than relying on one feed: the manifest puts efinance ahead of AkShare, and v3.35.0 isolates Tushare permission failures by endpoint so affected calls can fall back. FastAPI is the HTTP integration path. The `stock_analyzer` Agent plugin drives a configured checkout or running service rather than shipping the Python runtime. MCP is a separate, optional read-only stdio surface launched with `python -m src.mcp_server`.

### Key Capabilities & Differentiators
Watchlists cover mainland China, Hong Kong, the US, Japan, South Korea, and Taiwan, plus ETFs. The inputs include quotes, candlesticks, technical indicators, news, disclosures, and fundamentals, but coverage varies by market. The generated dashboard combines a score and trend assessment with price levels, risk flags, catalysts, and a checklist. The Web and desktop workbenches support on-demand analysis, task progress, Markdown report history, backtesting, holdings, and watchlist imports from images, CSV/Excel files, or the clipboard.

The research Agent exposes 20 built-in strategies across Web, Bot, and API, supports multi-turn follow-up, and can call quote, technical, news, and risk tools. Custom strategy files are supported; multi-agent orchestration is experimental. Model choices include Gemini, Claude, OpenAI-compatible endpoints, and local Ollama. The ETF dual-momentum workflow introduced in v3.33.0 is separate from LLM analysis: it produces rotation signals, cost-adjusted backtests, annual comparisons, parameter sensitivity checks, and data-quality warnings without a model.

### Trade-offs & Limitations
Compared with a single-feed watchlist script, DSA adds cross-market context, provider fallback, follow-up research, and report delivery at the cost of more configuration and dependencies. Free quote sources can be rate-limited or disrupted by upstream API changes. Token-backed feeds can improve stability where supported, but a successful fallback does not establish that two providers offer equivalent freshness or price conventions. The v3.35.0 fixes for quote trade dates and Yahoo ex-dividend prices are concrete reasons to validate the source and date before acting on a report.

Compared with a dedicated backtesting or execution platform, its best-documented workflows are research, monitoring, and delivery. LLM-generated levels and recommendations are inputs to review, not validated signals or evidence of an execution path. Local Ollama keeps inference local, while hosted models avoid running inference infrastructure but add an external service and potentially usage fees. Neither a no-server schedule nor free quote feeds guarantee zero operating cost. The MIT license applies to the code, not to rights in upstream market data or news.

### Hardware & Deployment Guide
For a local install, install `requirements.txt`, copy `.env.example` to `.env`, and configure the watchlist and a model channel for LLM analysis. `python main.py` runs analysis; `--schedule` enables local scheduling, and `--webui-only` starts the Web workbench at `127.0.0.1:8000`. Docker is a self-hosted option. GitHub Actions can run reports without an always-on server: configure `STOCK_LIST`, a model channel, and a notification destination in Secrets. The default schedule is 18:00 Beijing time on weekdays, subject to trading-day checks.

Hosted inference does not require a local GPU for DSA itself. With Ollama, size memory and any VRAM for the chosen model and concurrency; market data and news still depend on network access. The manually configured MCP server needs a full checkout and the optional `mcp>=1.0.0,<2` dependency. The release history shows why deployment version matters: v3.34.0 added optional FastAPI security middleware and a switch to skip duplicate startup analysis, while v3.35.0 expanded Taiwan market support and refined data fallback.
```

## Key Capabilities
```text
- Provider resilience: Ordered quote-source fallback; v3.35.0 isolates Tushare permission failures by endpoint.
- Market scope: Watchlists span six equity markets and ETFs, with data coverage varying by market.
- Research Agent: 20 built-in strategies and multi-turn follow-up across Web, Bot, and API; multi-agent orchestration is experimental.
- Model routing: Hosted providers and OpenAI-compatible endpoints alongside local Ollama; inference and market-data connectivity are separate.
- Rule-based research: ETF dual-momentum rotation runs without an LLM and provides cost-adjusted backtests and parameter sensitivity checks.
- Integration: FastAPI for analysis requests, a plugin that drives an existing DSA runtime, and a separate read-only MCP stdio server.
```

## Quick Start / Clone
```bash
# 克隆项目
git clone https://github.com/ZhuLinsen/daily_stock_analysis.git && cd daily_stock_analysis

# 安装依赖
pip install -r requirements.txt

# 配置环境变量
cp .env.example .env && vim .env

# 运行分析
python main.py
```
