An A-share investment analysis tool built on the HelloAgents multi-agent collaboration framework, integrating market data, financial analysis, news sentiment, intelligent stock screening, simulated trading, and more to provide data-driven investment decision support.
โ ๏ธ Disclaimer: All analysis results from this tool are for reference only and do not constitute investment advice. Investing involves risk; exercise caution when entering the market.
| Module | Feature | Status |
|---|---|---|
| ๐ Market Quotes | Real-time individual stock quotes, index quotes, sector quotes | โ |
| ๐ Financial Analysis | Financial indicators, company profile (description list layout), top 10 shareholders (multi-format table parsing) | โ |
| ๐ Stock Analysis UX | Prioritize loading quotes and charts; finance/profile/shareholders load asynchronously | โ |
| ๐ฃ๏ธ AI Sentiment Analysis | AI auto-searches news and analyzes market sentiment, streaming output | โ |
| ๐ AI Data Analysis | AI auto-queries market/financial data and generates analysis reports, streaming output | โ |
| ๐ฌ AI Chat Assistant | Coordinator Agent parses user intent, auto-dispatches sub-agents, streaming dialogue output | โ |
| ๐ฐ News & Info | Financial news search, hot headlines browsing | โ |
| ๐ Smart Stock Screener | Multi-criteria combined screening (market + financial dual dimensions) | โ |
| ๐๏ธ Buffett Evaluation | Value investing framework, ReflectionAgent self-reflection optimized streaming report generation with Markdown download | โ |
| โญ Watchlist | MX watchlist add/delete/query; "Add to Watchlist" on stock analysis page & screener results; removal requires confirmation | โ |
| ๐ Dashboard | Three-thread parallel warmup (indices/watchlist/hotspots), watchlist uses API-returned price data directly | โ |
| ๐ฐ Simulated Trading | Simulated buy/sell/cancel orders, position management, profit curve; order/cancel confirmation dialogs to prevent misoperation | โ |
| ๐ History Records | AI Sentiment / AI Data / Buffett / AI Chat four analysis history types stored by day, with view/delete support | โ |
| ๐พ File Cache | Each stock's data saved as an independent JSON file, no refresh within the day, supports grep keyword search | โ |
| ๐ง Memory System | Daily first-start date tracking, daily cutover re-fetches dashboard snapshot; persisted under data/memory/ (JSON, not HelloAgents MemoryManager); watchlist count changes trigger refresh when prior watchlist records exist (frontend still requests watchlist API in real-time) |
โ |
| โ๏ธ Preferences | Personalized investment style, risk preference, and sector preference settings | โ |
| ๐ณ Docker Deployment | One-click containerized deployment, frontend/backend separation | โ |
| ๐ฆ exe Packaging | PyInstaller packaging as standalone exe, no Python/Node.js installation required | โ |
skills/, not separate agentsdata / sentiment / advisor combinations), sub-agents run non-streaming, then coordinator consolidates; single-dimension pushes results directly, multi-dimension uses LLM streaming to generate a comprehensive reply (with length and word count limits, see agents/coordinator_agent.py, agents/text_truncation.py)preference_service and exposed through /api/v1/preferences| Layer | Technology | Version |
|---|---|---|
| Frontend | Vue3 + Element Plus + ECharts | 3.x / 2.x / 5.x |
| Backend | FastAPI + Uvicorn | 0.110+ |
| Database | SQLite (SQLAlchemy + aiosqlite) | โ |
| Agents | HelloAgents Optimized | 0.2.9 |
| LLM | DeepSeek / OpenAI-compatible API | โ |
| Financial Data | East Money MX API | โ |
Copy .env.example to .env and fill in your keys. For local dev, keep BACKEND_PORT=8000 (must match frontend/vite.config.js proxy). For exe builds, use 5174 if needed. Commonly used items are as follows (see .env.example comments for full details):
# LLM (compatible with HelloAgents)
LLM_MODEL_ID=deepseek-chat
LLM_API_KEY=sk-your-deepseek-key
LLM_BASE_URL=https://api.deepseek.com
# Optional: single request timeout (seconds); backend merges with a longer floor value
# to prevent premature disconnection during ReAct/chat multi-turn
# LLM_TIMEOUT=180
# Buffett evaluation: optional reflection rounds (see BUFFETT_MAX_REFLECTIONS in .env.example)
# East Money MX financial data
MX_APIKEY=your-mx-apikey
# Optional: MX_API_URL, MX_CACHE_TTL_SECONDS, local replay MX_REPLAY_FIXTURES, etc.
# Service port: dev mode defaults to 8000 when not set; PyInstaller exe defaults to 5174 when not overridden
# (consistent with run_exe.py prompt)
# If modifying BACKEND_PORT, also update the /api proxy target in frontend/vite.config.js
๐ก DeepSeek API: https://platform.deepseek.com
๐ก MX API: https://dl.dfcfs.com/m/itc4
Backend:
# Install dependencies (equivalent: also run pip install -r requirements.txt from repo root)
pip install -r backend/requirements.txt
# Start service (from project root)
python -m uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 --reload
API docs: http://localhost:8000/docs
Frontend:
cd frontend
npm install
npm run dev
Frontend UI: http://localhost:5173 (dev mode auto-proxies /api to backend port 8000)
docker compose up -d
For detailed deployment instructions, see DEPLOY.md
Package the frontend and backend into a single .exe file, no Python/Node.js installation required to run.
| Component | Purpose | Packaging Only? |
|---|---|---|
| Python 3.10+ | PyInstaller build | Yes |
| Node.js 18+ | Frontend build | Yes |
| PyInstaller | Python โ exe | Yes |
# 1. Install packaging dependencies
pip install pyinstaller
# 2. Run the build script (from project root)
python scripts/build_exe.py
Due to the large amount of data loaded, it's best to wait for data warmup before entering the interface. Also, due to East Money restrictions, do not use a VPN/proxy, or it will fail.
UI screenshots are not shipped with the repo. Capture them locally after startup, or place them under
outputs/screenshots/for documentation.
intelligent-stock-analyzer/
โโโ README.md
โโโ README_EN.md
โโโ requirements.txt # Root aggregated deps (points to backend/requirements.txt)
โโโ run_exe.py # exe runtime entry
โโโ scripts/
โ โโโ build_exe.py # PyInstaller build script
โโโ data/ # Data directory (created at runtime)
โ โโโ stock_cache/ # File cache (independent JSON per stock)
โ โโโ memory/ # Memory system state (dashboard_state.json)
โโโ outputs/ # Optional: local reports/screenshots
โโโ backend/ # ๐ฅ๏ธ Backend FastAPI
โ โโโ app/
โ โ โโโ main.py # App entry + lifecycle
โ โ โโโ config.py # Configuration management
โ โ โโโ api/ # API route modules
โ โ โ โโโ chat.py # AI chat assistant streaming endpoint
โ โ โ โโโ sentiment.py # AI sentiment streaming (agreed path)
โ โ โ โโโ data_analysis.py # AI data analysis streaming (agreed path)
โ โ โ โโโ agent_api.py # Sentiment/data streaming impl + /agent compat path
โ โ โ โโโ history.py # Analysis history CRUD
โ โ โ โโโ system_browser.py # exe/desktop: backend opens system browser for external links
โ โ โ โโโ cache_api.py # File cache management / grep search
โ โ โ โโโ ... # market / financial / news / screener etc.
โ โ โโโ services/ # Business logic layer
โ โ โ โโโ chat_service.py # Chat assistant dispatch (coordinator streaming)
โ โ โ โโโ memory_service.py # Memory system (daily cutover + dashboard warmup etc.)
โ โ โ โโโ stock_file_cache.py # File cache (grep search support)
โ โ โ โโโ history_service.py # History CRUD
โ โ โ โโโ screener_service.py # Stock screening (direct skills/mx-xuangu)
โ โ โ โโโ watchlist_service.py# Watchlist (direct skills/mx-zixuan)
โ โ โ โโโ simulation_service.py# Simulated trading (direct skills/mx-moni)
โ โ โ โโโ preference_service.py# User preferences CRUD / context
โ โ โ โโโ ... # market / news / buffett etc.
โ โ โโโ models/ # Data models
โ โ โ โโโ report.py # AnalysisReport
โ โ โ โโโ history_models.py # Analysis history ORM (SQLite)
โ โ โ โโโ history.py # Compat re-export AnalysisHistory
โ โ โ โโโ memory_models.py # MemorySnapshot and other memory data structures
โ โ โ โโโ preference.py # UserPreference
โ โ โโโ middleware/ # Middleware placeholder (skeleton, not registered in main)
โ โ โโโ utils/ # Utilities
โ โโโ Dockerfile
โ โโโ requirements.txt
โ
โโโ frontend/ # ๐จ Frontend Vue3
โ โโโ src/
โ โ โโโ views/ # Page views
โ โ โ โโโ Dashboard.vue # Dashboard (watchlist direct price display)
โ โ โ โโโ StockAnalysis.vue # Stock analysis (6 tabs)
โ โ โ โโโ StockScreener.vue # Smart stock screener
โ โ โ โโโ NewsCenter.vue # News center
โ โ โ โโโ Simulation.vue # Simulated trading (confirmation dialogs)
โ โ โโโ components/ # Shared components
โ โ โ โโโ StreamOutput.vue # Streaming output generic component
โ โ โ โโโ AIAnalysisPanel.vue # AI analysis panel
โ โ โ โโโ ChatAssistant.vue # AI chat assistant
โ โ โ โโโ HistoryDrawer.vue # History drawer
โ โ โ โโโ NewsDetailDrawer.vue# News detail
โ โ โโโ api/ # Axios wrapper
โ โ โโโ router/ # Vue Router
โ โ โโโ store/ # Pinia state management
โ โโโ Dockerfile
โ โโโ nginx.conf
โ โโโ package.json
โ
โโโ agents/ # ๐ค Agent layer (AI analysis & chat only)
โ โโโ agent_system.py # Unified agent management & streaming dispatch
โ โโโ coordinator_agent.py # AI chat assistant (routing LLM + sequential sub-agent calls + integrated streaming)
โ โโโ text_truncation.py # Coordinator output natural boundary truncation
โ โโโ advisor_agent.py # Buffett evaluation agent (Reflection + streaming)
โ โโโ general_advisor_agent.py # General investment advisor agent (ReAct)
โ โโโ sentiment_agent.py # Sentiment analysis agent (ReAct + streaming)
โ โโโ data_analysis_agent.py # Data analysis agent (ReAct + streaming)
โ โโโ tests/ # Agent-layer unit tests
โ โโโ tools/ # ReAct tool wrappers (for agents above)
โ โโโ mx_data_tool.py # Market data โ skills/้่ๆฐๆฎ
โ โโโ mx_search_tool.py # News search โ skills/่ต่ฎฏๆ็ดข
โ
โโโ HelloAgents Optimized/ # ๐งฉ Multi-agent framework (StockSage slim build)
โ โโโ hello_agents/
โ โโโ core/ # LLM, Config, Agent base, ConversationManager, etc.
โ โโโ agents/ # ReActAgent, ReflectionAgent (used by this app)
โ
โโโ skills/ # ๐ง East Money MX skills (business API layer)
โ โโโ ้่ๆฐๆฎ/mx-data
โ โโโ ่ต่ฎฏๆ็ดข/mx-search
โ โโโ ๆบ่ฝ้่ก/mx-xuangu
โ โโโ ่ช้่ก็ฎก็/mx-zixuan
โ โโโ ๆจกๆ็ปๅ็ฎก็/mx-moni
โ โโโ ๅทด่ฒ็นๆ่ตๆ็ปด/ # Value investing reference docs
โ
โโโ docker-compose.yml
โโโ DEPLOY.md
โโโ .env.example
| Route Group | Prefix | Description |
|---|---|---|
| System | /api/v1/system |
GET /health, GET /config (registered in main.py); POST /open-external-url registered by system_browser.py under the same prefix, for exe scenarios to open http(s) links in the native browser |
| Market | /api/v1/market |
Individual stock quotes, indices, sectors |
| Financial | /api/v1/financial |
Financial indicators, company profile, shareholders |
| Analysis | /api/v1/analysis |
In-depth stock report POST /report/{code}, GET /report/{report_id}, list GET /reports |
| News | /api/v1/news |
News search, sentiment analysis, hot topics |
| Screener | /api/v1/screener |
Conditional screening, filter criteria |
| Watchlist | /api/v1/watchlist |
Watchlist add/delete/query |
| Simulation | /api/v1/simulation |
Simulated trading (buy/sell/cancel/positions) |
| Buffett | /api/v1/buffett |
Buffett evaluation (Reflection / advisor streaming, history type buffett) |
| Preferences | /api/v1/preferences |
User investment preferences CRUD |
| Chat | /api/v1/chat |
AI chat assistant NDJSON streaming POST /stream |
| Sentiment | /api/v1/sentiment |
AI sentiment POST /analyze/stream (agreed path) |
| Data analysis | /api/v1/data-analysis |
AI data analysis POST /analyze/stream (agreed path) |
| Agent (compat) | /api/v1/agent |
Semantically same as above: POST /sentiment/stream, POST /data-analysis/stream |
| History | /api/v1/history |
Analysis history list/detail/delete/clear; type includes sentiment / data_analysis / buffett / chat |
| Cache | /api/v1/cache |
File cache grep / stats / clear |
Full Swagger docs: dev default http://localhost:8000/docs (port per
BACKEND_PORTin.env)
User chat message
โ
โผ
Coordinator (routing LLM, single-line keyword)
โ none โ general conversation (coordinator LLM streaming reply, or stock context guidance)
โ data / sentiment / advisor or combinations
โผ
Sub-Agents run sequentially (non-streaming, with word limit)
โโโ data โ run_data_analysis
โโโ sentiment โ run_sentiment
โโโ advisor โ inject existing data/sentiment summaries into advisor prompt โ run_advisor
โ
โผ
User-facing streaming output
โโโ single sub-agent only โ directly push that result (truncated to limit)
โโโ multiple agents โ coordinator LLM stream_invoke to integrate into structured response
User clicks "Generate Buffett Evaluation Report"
โ
โผ
advisor_agent (ReflectionAgent)
โ collects market/financial/sentiment data
โโโ initial analysis โ moat / management / margin of safety
โโโ self-reflection โ data accuracy / logical consistency
โโโ iterative optimization โ refine report
โ
โผ
Streaming final evaluation report + auto-save history
| Capability | Implementation |
|---|---|
| AI sentiment / data analysis / chat / Buffett evaluation | agents/* + HelloAgents (ReAct / Reflection / coordinator) |
| Stock screening / watchlist / simulated trading / market & news queries | backend/app/services/* โ skills/* (MX API) |
| User preferences | preference_service + /api/v1/preferences |
When entering individual stock analysis (/analysis or /analysis/:code, :code optional), there are 6 tabs:
| Tab | Content | Notes |
|---|---|---|
| ๐ Market Charts | ECharts candlestick + market details | Priority loading |
| ๐ Financial Data | Financial indicator cards + company profile + top 10 shareholders | Async loading |
| ๐ฃ๏ธ AI Sentiment | AI auto-searches news for market sentiment analysis | Streaming output |
| ๐ AI Data Analysis | AI queries market/financial data to generate reports | Streaming output |
| ๐ง Buffett Evaluation | ReflectionAgent self-reflection optimized evaluation | Streaming output |
| ๐ฌ AI Chat Assistant | Free-form conversation, auto-dispatches sub-agents | Streaming output |
Each analysis tab supports viewing history records and downloading reports.
All stock data is automatically persisted to the data/stock_cache/{stock_code}/ directory:
data/stock_cache/
_index.json # Master index
600519/
quote.json # Market data
financial.json # Financial indicators
profile.json # Company profile
holders.json # Top 10 shareholders
sentiment.json # Sentiment analysis
news.json # Related news (when cached)
GET /api/v1/cache/search?keyword=Kweichow Moutai grep-style keyword searchRedis and JWT variables in .env.example are read by config.py but not used in the current release (caching uses in-process MX TTL + file cache; APIs have no login). See Roadmap below.
Issues and Pull Requests are welcome!
git checkout -b feature/your-featuregit commit -m "feat: feature description"git push origin feature/your-feature| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation update |
style |
Code formatting (no logic change) |
refactor |
Code refactoring |
test |
Test-related |
chore |
Miscellaneous (e.g., dependency updates) |
MIT License
- GitHub: [@lcyting](https://github.com/lcyting)
- Email: lcy154745@163.com