explaingit

hello245m/free-stockdb

Analysis updated 2026-08-13

2,018HTMLAudience · dataComplexity · 3/5Setup · moderate

TLDR

A local, offline data engine for Chinese A-share stock and ETF market data, with 39 built-in indicators and Python, HTTP, Excel, and AI/MCP access.

Mindmap

mindmap
  root((free-stockdb))
    What it does
      Local stock market data
      Incremental sync
      39 built-in indicators
    Tech stack
      C++ engine
      Python library
      HTTP API
    Use cases
      Backtest trading strategies
      Query indicators offline
      Connect AI tools via MCP
    Audience
      Quant researchers
      Data engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Backtest trading strategies across thousands of A-share stocks without hitting a remote API.

USE CASE 2

Query built-in technical indicators like MACD or KDJ from Python, HTTP, Excel, or an AI tool via MCP.

USE CASE 3

Keep a local, offline copy of stock market data for research that doesn't depend on internet access.

USE CASE 4

Connect an AI coding assistant to local stock data through the MCP interface.

What is it built with?

C++PythonHTMLCMake

How does it compare?

hello245m/free-stockdbkarpathy/jobsop7418/guizang-social-card-skill
Stars2,0181,8341,763
LanguageHTMLHTMLHTML
Last pushed2026-03-16
MaintenanceMaintained
Setup difficultymoderateeasyeasy
Complexity3/52/52/5
Audiencedataresearchervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Needs roughly 5 to 20GB of disk space for the local dataset, depending on whether minute-level data is included.

The README references a separate LICENSE file for the project's code, data source rights are governed separately by each data provider.

In plain English

free-stockdb is a local data engine for Chinese A-share stock market data, covering daily, weekly, and monthly candles as well as minute level and tick level prices for stocks and ETFs. Instead of calling a remote server every time you need a price or an indicator, it downloads and stores market data on your own computer, so research and backtesting run against a local dataset rather than a live network connection. The project argues that the real bottleneck in large scale backtesting is not writing trading strategies, it is the data engineering behind them: downloading years of data for thousands of stocks, cleaning it up, adjusting prices for stock splits and dividends, and organizing it so it can be queried quickly. free-stockdb handles this ahead of time. After an initial full download, later updates only fetch data that has changed, using compressed transfers that can resume if interrupted. Once the data is synced, later queries, calculations, and backtests all run against the local copy, so nothing depends on the speed or availability of the original data source. The dataset comes with 39 built in technical indicators, such as moving averages, MACD, and KDJ, plus five ways of calculating a custom index, computed with a C++ engine the project says runs several times faster than a typical Python approach. You can reach the data five different ways: a Python library for research and backtesting, an HTTP API for connecting from any programming language, an Excel or WPS macro, a plain HTML page for browsing without writing code, and an MCP connector that lets AI tools like Claude, Cursor, or Windsurf query the local data directly. The data source is treated as replaceable. You can point the sync configuration at your own provider, an internal server, or a shared folder, and once data is downloaded it keeps working offline even if the original source disappears. Compressed storage keeps disk usage well below plain CSV or database files, with a full setup needing roughly 5 to 20 gigabytes depending on whether minute level data is included. Prebuilt releases are available for Windows, macOS, Alpine Linux, and manylinux, while building the C++ components from source needs CMake, a C++17 compiler, libcurl, and OpenSSL.

Copy-paste prompts

Prompt 1
Walk me through downloading free-stockdb and syncing my first local stock dataset.
Prompt 2
Explain how free-stockdb's incremental sync avoids re-downloading the whole market.
Prompt 3
How do I use zb.get() to calculate MACD across a batch of stock codes?
Prompt 4
Show me how to connect free-stockdb's MCP interface to Claude or Cursor.
Prompt 5
What is the difference between the five ways to call free-stockdb: Python, HTTP, Excel, HTML, and MCP?

Frequently asked questions

What is free-stockdb?

A local, offline data engine for Chinese A-share stock and ETF market data, with 39 built-in indicators and Python, HTTP, Excel, and AI/MCP access.

What language is free-stockdb written in?

Mainly HTML. The stack also includes C++, Python, HTML.

What license does free-stockdb use?

The README references a separate LICENSE file for the project's code, data source rights are governed separately by each data provider.

How hard is free-stockdb to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is free-stockdb for?

Mainly data.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.