Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

shy3130/tick-stock-panel

Finance

Self-hosted A-share quant workbench for custom strategies, backtesting, market monitoring and LLM-assisted analysis.

6,962
1,673
Python
MIT
4 months old

Project overview

TSP is a self-hosted quantitative research workbench for China's A-share market, aimed at individual quants and developers who want strategy construction, backtesting, monitoring and review in one local deployment. It bundles a FastAPI backend, a React frontend, and a file-based data layer using Parquet and DuckDB, so no external database is required.

The core workflow is a single data chain: enriched daily data feeds screening, backtesting, monitoring and post-market review with the same column definitions. Strategies can be written directly, generated through an LLM, or extended through custom signals and factor modules. An optional AI chat assistant can query the full panel through about 21 read tools and 5 action tools; write actions such as generating signals or running backtests require an explicit confirmation card.

Data sources are pluggable. Built-in integrations include TickFlow, fuyao (a Tonghuashun REST source) and TdxQuant, and a YAML-based plugin mechanism allows other sources. The open API exposes 65 contracted endpoints with six token scopes, and an MCP server exposes 12 tools to compatible AI clients.

Quick start

Docker users can launch the prebuilt multi-architecture image directly:

docker run -d --name tsp -p 3018:3018 -v ${PWD}/data:/app/data ghcr.io/shy3130/tick-stock-panel:latest

Open http://localhost:3018. Keep the data volume mount; the README warns that rebuilding without it silently loses container-layer data. For configuration, copy .env.example (see the configuration guide) and pass it with --env-file .env. The three most relevant keys are TICKFLOW_API_KEY (empty means the free historical-daily mode), AI_API_KEY (empty disables AI features), and PORT.

After startup, the first-use sequence is: re-detect credentials under Settings → credentials, run the post-market pipeline to pull daily K-lines and build the enriched table, add symbols to the watchlist, run a strategy scan, then run a backtest with a chosen strategy and date range. Backtest results are returned over SSE and can be exported to CSV.

For local development, use the dev launcher:

cp .env.example .env
./dev.sh        # Windows: .\dev.ps1

This requires Python 3.11+, Node 20+, uv and pnpm, and starts the backend on port 3018 and the frontend on 3011. A Docker Compose path and desktop installers for Windows and Apple Silicon macOS are also documented in the README.

Usage constraints

The backend keeps a full enriched history table in memory; a documented macOS arm64 measurement over 243 trading days, about 1.08 million rows and 105 columns used roughly 1.3 GB resident memory and 1.5–1.8 GB at startup peak. On 2 GB machines, set POLARS_MAX_THREADS=2 and avoid running backtests, robust optimization or factor mining, which spawn separate worker processes using about 800 MB each.

A-share trading rules matter: the backtest engine models T+1, fees and slippage, and minute strategies replay day by day to avoid look-ahead bias. TdxQuant, fuyao and TickFlow keys are user-supplied and subject to each provider's terms. Open API tokens are limited to local or internal-network calls by default; exposing them publicly requires API_TOKEN_LOCAL_ONLY=0.

The macOS desktop build is only for Apple Silicon and is not code-signed, so Gatekeeper must be bypassed and the quarantine attribute removed for the app to launch. The project is explicitly a learning and research tool, not an investment or stock-quoting product, and it does not ship stock recommendations or limit-up predictions. It is MIT licensed with a requirement to preserve copyright and license notices when redistributing.

HotRepo's take

HotRepo recorded 5,070 stars on the 2026-09-25 daily list, 5,217 stars on 2026-09-26 with a 44-star daily gain, and 6,960 stars on 2026-11-03, when the repository ranked 18th on the Python daily list. That progression shows sustained visibility across more than a month rather than a single spike, but the available snapshots are too sparse to establish a trend.

The scope described in the README—strategy engine, factor mining, backtesting, monitoring, open API and MCP—is unusually broad for a single self-hosted repository. Readers should judge it by whether the modular extension architecture and the single enriched data path match their own workflow, not by star count alone.

Written by AI from the project's README, updated . The project's own docs are the source of truth.