PanWatch Packs Multi-Agent Stock Research Into One Open-Source Docker Image
A self-hosted AI stock watcher wires the TradingAgents multi-agent framework into a portfolio dashboard for A-shares, HK, and US markets.
Takeaways
- PanWatch is a self-hosted AI stock dashboard integrating the TradingAgents multi-agent framework.
- Nine agents debate bull vs bear, risk, and PM decisions in 3-5 minutes per run.
- Covers A-share, Hong Kong, and US markets with multi-account portfolio aggregation.
- Deploys via a single Docker command, default model deepseek-chat at ~$0.05 per deep analysis.
- Push notifications to Telegram, WeChat Work, DingTalk, Lark, Bark, or custom webhooks.
- Optional OpenTelemetry exporter maps LLM calls to standard GenAI spans for Jaeger or Langfuse.
PanWatch, a Chinese open-source portfolio dashboard, gained hundreds of GitHub stars over one week by combining market monitoring, technical analysis, LLM research, and notifications in a self-hosted application. It covers A-share, Hong Kong, and US equities and integrates the TradingAgents framework to generate structured investment reports.
The project consolidates several tools that retail investors often run separately. PanWatch stores watchlists, positions, alert rules, and configuration in a local Docker volume, then connects to external market-data sources, an OpenAI-compatible model endpoint, and messaging services. Its agents recommend actions but do not place live trades.
| Layer | Included capabilities |
|---|---|
| Markets | A-share, Hong Kong, and US equities |
| Analysis | Technical signals, fundamentals, news, sentiment, and multi-agent debate |
| Delivery | Telegram, WeChat Work, DingTalk, Lark, Bark, and custom webhooks |
| Trading | Paper trading only |
The portfolio becomes an agent graph
TradingAgents supplies four analyst roles focused on technicals, sentiment, news, and fundamentals. Their findings pass through a bull-versus-bear debate, a risk review, and a portfolio-manager node that proposes an action. Clicking the brain icon on the portfolio page starts this workflow and exposes the intermediate role outputs alongside the final report.
The project estimates that a deep analysis takes 3 to 5 minutes. Its default model is deepseek-chat, with an estimated cost of about $0.05 per run. Actual latency and expense depend on the selected provider, prompt size, model pricing, and retry behavior.
Scheduled agents extend the manual analysis into recurring workflows:
- Pre-market: Combines overnight US trading, relevant news, and technical conditions into a daily plan.
- Intraday: Scans for anomalies and aligned RSI, KDJ, and MACD signals, which measure momentum and trend changes.
- Post-market: Summarizes the session, capital flows, and possible setups for the next trading day.
- News feed: Collects financial news and filters stories against the current holdings and watchlist.
Rules handle the fast path
PanWatch pairs its LLM workflows with conventional market-analysis features. The dashboard tracks moving-average alignment, MACD crosses, Bollinger Band breakouts, RSI extremes, KDJ divergence, volume-price relationships, candlestick patterns, and calculated support and resistance levels.
Multi-account aggregation provides a combined portfolio view, while strategy profiles adjust analysis for short-term, swing, or long-term trading. Those settings become context for the agents, reducing the chance that a long-horizon portfolio receives recommendations based on an intraday setup.
Price-alert rules can combine price, percentage change, turnover, and volume ratio with AND or OR conditions. Each rule can be restricted to trading hours and assigned a cooldown, daily trigger limit, expiration time, and notification channel. These deterministic checks are better suited to continuous monitoring than repeated LLM calls.
Docker setup and operational edges
The documented deployment command starts the application with a persistent named volume:
docker run -d \
--name panwatch \
-p 8000:8000 \
-v panwatch_data:/app/data \
sunxiao0721/panwatch:latest
The image includes Playwright’s system dependencies. Chromium downloads into the mounted volume on first launch, which can add several minutes to startup. Deployments that do not require screenshots can set PLAYWRIGHT_SKIP_BROWSER_INSTALL=1 to bypass the browser installation.
The first-run web interface creates the application login, configures an OpenAI-compatible endpoint, connects a notification channel, and adds tickers. Supported model options include OpenAI, Zhipu, DeepSeek, and a local Ollama instance.
The sample command publishes port 8000 on every host interface. Internet-facing deployments should place PanWatch behind a TLS-enabled reverse proxy, restrict network access, and protect the volume containing portfolio data and configuration. Production deployments should also pin an image version or digest instead of relying on the mutable latest tag.
FastAPI, SQLAlchemy, and APScheduler power the backend. The frontend uses React 18, TypeScript, Tailwind CSS, and shadcn/ui. It ships as a progressive web app, allowing installation from a supported mobile browser.
Traces reveal each agent hop
PanWatch records agent activity through internal trace IDs, an agent_runs table, and node-level progress and cost tracking. Those records help separate model failures from stalled workflow nodes, provider latency, and unexpectedly expensive prompts.
An optional OpenTelemetry exporter represents each agent run as a root span. Individual LLM requests become gen_ai child spans based on the GenAI semantic conventions, while each TradingAgents node receives its own span. Setting OTEL_EXPORTER_OTLP_ENDPOINT sends the telemetry to a compatible Jaeger, Tempo, or Langfuse collector.
The resulting trace shows the sequence and duration of a multi-agent run, including token counts for individual model calls. That instrumentation supports cost attribution, latency analysis, and debugging without requiring developers to reconstruct a debate from application logs.
Where the system stops
- No live execution: PanWatch does not connect to a broker or submit orders. Its trading module is limited to simulation.
- Regional emphasis: The available news and sentiment workflows lean toward Chinese equities, reducing their coverage for portfolios focused exclusively on US markets.
- Model uncertainty: Agent reports can present incorrect conclusions in polished language. Intermediate outputs and cited market data still require verification.
- External dependencies: Data freshness, analysis latency, and operating cost depend on the configured market-data, model, and notification providers.
- Operator responsibility: Self-hosting places backups, upgrades, access control, secrets management, and network security on the person running the service.
PanWatch fits investors who want configurable portfolio research, local control over application data, and inspectable multi-agent workflows. Its estimated per-run cost can remain low with DeepSeek, though scheduled jobs across many symbols can multiply usage quickly. The system serves as a research and paper-trading tool, with financial decisions requiring independent validation.