Repolode
hello245m

hello245m/free-stockdb

A local quant data engine for China A-share daily/minute K-line, ETF and tick data, with incremental sync, adjustment, batch queries, indicators and backtesting.

Open-source alternative to:Wind

Stars
3,138
Forks
471
Open issues
0
Last commit
26 days ago

Repolode describes open-source projects and does not give investment advice. Trading and investing can lose money: assess the risk yourself and follow the laws where you live before using this project.

What is it?

free-stockdb is a local-first data engine for Chinese A-share stocks and ETFs. It syncs daily, weekly, monthly, 1/5/15/30-minute K-line data and tick data (on demand) to the user's disk, stores it with Zstd compression, and keeps raw prices alongside adjustment factors so forward, backward or unadjusted results can be returned at query time.

The project targets researchers who run batch backtests across the full market. Queries, indicator calculations and backtests run against the local dataset, so they do not depend on remote API rate limits or network availability once data is synced. Built-in indicators cover 39 technical indicators and 5 index weighting methods, and sector mappings link stocks to Shenwan industry levels and concept boards.

Data can be consumed through a Python SDK, an HTTP API on 127.0.0.1:7899, Excel/WPS macros, a local HTML page, or MCP for AI tools such as Claude and Cursor. The core is written in C++ with a Rust calculation component, and sources are configured through sync_url.txt.

Key features

  • 01Incremental sync of daily to 30-minute K-line and tick data to local storage
  • 02Forward, backward and unadjusted price queries with adjustment factors
  • 03Batch queries across the full market with field filtering and DataFrame output
  • 0439 technical indicators and 5 index weighting methods computed locally
  • 05Stock-to-sector bidirectional mapping for Shenwan industries and concept boards
  • 06Access through Python SDK, HTTP API, Excel/WPS, HTML page and MCP

Use cases

  • Running full-market minute-level backtests without remote API rate limits
  • Building local factor research on adjusted A-share price data
  • Letting AI assistants query and analyze local market data through MCP
  • Analyzing stock and sector data in Excel or WPS

Quick start

  1. 1

    Download the Windows release package from the Releases page

  2. 2

    Run the data update tool to sync data into ./data

  3. 3

    Start stockdb, then query local data via Python, HTTP, Excel/WPS, web or MCP

Things to know

  • Syncing data depends on a configured data source in sync_url.txt.
  • Disk needs are about 5GB for daily data and about 20GB with full minute data.
  • Data copyright and redistribution terms are set by the upstream data sources, which users must verify.

In collections

Topics

#a-share#quant-research#backtesting#market-data#local-first#time-series-database#technical-analysis#algorithmic-trading#china-stock-market#kline

FAQ

What is free-stockdb?
A local quant data engine for China A-share daily/minute K-line, ETF and tick data, with incremental sync, adjustment, batch queries, indicators and backtesting. free-stockdb is a local-first data engine for Chinese A-share stocks and ETFs. It syncs daily, weekly, monthly, 1/5/15/30-minute K-line data and tick data (on demand) to the user's disk, stores it with Zstd compression, and keeps raw prices alongside adjustment factors so forward, backward or unadjusted results can be returned at query time.
Is free-stockdb free to use? What license does it have?
free-stockdb is open source under the MIT license. Check the license terms before using it in commercial products.
Is free-stockdb still maintained?
Actively maintained. The last commit to free-stockdb was on Oct 12, 2026.
What can I use free-stockdb for?
Running full-market minute-level backtests without remote API rate limits Building local factor research on adjusted A-share price data Letting AI assistants query and analyze local market data through MCP Analyzing stock and sector data in Excel or WPS
How do I install free-stockdb?
Download the Windows release package from the Releases page Run the data update tool to sync data into ./data Start stockdb, then query local data via Python, HTTP, Excel/WPS, web or MCP
Where can I get free-stockdb?
The source code and installation instructions are on GitHub: https://github.com/hello245m/free-stockdb

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects