handsomejustin/easy_tdx

免费Python量化SDK:通达信协议直连 A股/港股/美股数据,内置技术指标、缠论分析、回测引擎与 Web 可视化,JSON 输出适配 AI Agent

What it solves

easy-tdx provides retail investors with institutional-grade financial data and quantitative analysis tools for A-shares, Hong Kong stocks, US stocks, and futures. It removes the barriers to accessing high-frequency market data, technical indicators, and backtesting frameworks that are typically expensive or restricted to professional funds.

How it works

The project acts as a data bridge and analysis suite that connects to market data servers (like TDX) and provides multiple interfaces for interaction:

  • Data Access: A Python API, Command Line Interface (CLI), and REST API (easy-tdx serve) to fetch K-lines, real-time quotes, capital flow, and announcements.
  • Analysis Engine: Built-in calculation for 34 technical indicators and a complete implementation of Chanlun (缠论) theory for automated trend and buy/sell point identification.
  • Backtesting Suite: A vector-based engine that allows users to write Python strategies, run them against historical data, and perform multi-factor combination backtests.
  • Web UI: A Vue 3 + ECharts dashboard for zero-code backtesting, parameter optimization, and portfolio management.
  • Data Rating: A risk-adjusted rating system (S to D) that evaluates assets based on drawdown, win rate, and Sharpe ratio rather than just raw returns.

Who it’s for

  • Retail Traders: Who want professional-grade data and technical analysis without paying for expensive subscriptions.
  • Quantitative Developers: Who need a lightweight framework to prototype and backtest trading strategies.
  • AI Agent Developers: Who want a structured JSON data source to feed into LLM-based trading agents.

Highlights

  • Comprehensive Data: Covers K-lines, tick data, transaction details, and sector rotations.
  • Automated Chanlun: One-click identification of fractal patterns, pivots, and divergence.
  • Zero-Code Web UI: Visual interface for strategy tuning, parameter grid search, and performance comparison.
  • Multi-Factor Backtesting: Ability to combine multiple strategies using AND, OR, or MAJORITY logic to find optimal signal combinations.
  • Institutional Tooling: Includes advanced quantitative features like IC/IR factor analysis, slippage models, and TWAP/VWAP execution simulation.

Related

  • Project
  • Project
  • Project
  • Project
  • Project