easy-tdx

easy-tdx

Free Quant Market Data SDK

Description

< #Quantitative Trading #Stock Data #TDX Protocol #Backtesting Engine #Technical Indicators #Chan Theory #Python #Open Source Software

easy-tdx is a free Python quant SDK that connects directly over the TDX protocol instead of relying on a paid data feed, covering A-share, Hong Kong and US market quotes as well as sector data. It drives the cost of the "get the data" step to zero, then layers technical indicators, Chan theory analysis, a backtesting engine and a full web UI on top.

After installing, a single easy-tdx serve turns the browser into a trading terminal: live index streaming, industry and concept sector heatmaps, limit-up and unusual-movement radars, watchlists, and futures position rankings. It suits individual investors and quant developers who want their own market-data and backtesting stack without an ongoing data subscription.

Features



Direct protocol market data:Fetches A-share, Hong Kong and US market data over the TDX protocol, with sector-level data available just as freely, removing commercial feed subscription costs.

Web trading terminal:Starts with one command and includes a market dashboard, industry and concept overviews (heatmap plus table views), limit-up radar, unusual-movement tracking, live watchlists and a per-stock detail panel.

Backtesting workbench:Pick instruments, strategies and parameters in the browser with zero code; 54 built-in strategies cover all 50 registered indicators, and custom strategies need only the init()/next() pair.

Overfitting-resistant validation:Walk-forward out-of-sample validation, a train/validation/test three-stage check, multi-seed promotion thresholds and a buy-and-hold benchmark comparison separate "looks good in backtest" from "holds up out of sample".

25 performance metrics with ratings:SQN, Ulcer index, 95% VaR/CVaR, longest win and loss streaks and more, with an S/A/B/C/D rating driven by risk-adjusted experience rather than raw return.

TDX formula support:No Python required — paste a TDX formula to run calculation, screening and backtesting, with 30-plus whitelisted functions evaluated vectorially and no lookahead bias.

Chan theory and indicators:Ships 50 registered indicators plus Chan theory analysis, with MA, BOLL, MACD, KDJ and RSI available directly on the candlestick view.

AI reading and agent-friendly output:Connects to nine providers including DeepSeek, Qwen, GLM, Kimi, OpenAI, Claude and Ollama to turn a backtest report into plain-language advice; all output is JSON so AI agents can call it directly.

Portfolios and parameter search:Supports multi-instrument portfolio backtests, capital allocation across strategies, parameter grid search and market-wide strategy screening, with the strategy library persisted in SQLite.

Open source:The source is hosted on GitHub, so developers can inspect the implementation, contribute, or adapt it to their own needs.