0xethanq/astra-quant-agent

结合多大模型分析与确定性代码风控的自主量化交易系统 | Autonomous crypto trading system with multi-LLM analysis, deterministic Python risk control & OKX execution.

What it solves

AstraQuant is an autonomous crypto trading system designed to remove emotional bias from trading by combining the analytical capabilities of Large Language Models (LLMs) with strict, deterministic risk management. It prevents common trading pitfalls like over-leverage and poor risk-reward ratios by enforcing hard-coded safety gates that can veto any trade proposed by the AI.

How it works

The system operates on a 15-minute cycle across four main stages:

  1. Market Ingestion: It calculates derivative metrics such as Cumulative Volume Delta (CVD), Order Book Imbalance (OBI), and Funding Rates to understand market microstructure.
  2. Multi-Model Council: A committee of specialized LLMs (e.g., DeepSeek, Claude, GPT-4o) analyzes the data from different perspectives (Macro, Trend, Microstructure, and Contrarian) to propose a trade intent.
  3. Python Risk Gates: Before execution, a deterministic Python layer checks the proposal against strict rules (e.g., max concurrent positions, minimum 2.0 Reward:Risk ratio, and drawdown breakers).
  4. Execution: Validated trades are executed via the OKX API, immediately paired with exchange-side cloud stop-loss and take-profit orders.

Who it’s for

Quantitative traders and researchers who want to automate their crypto trading using LLMs while maintaining absolute control over capital risk through programmatic enforcement.

Highlights

  • Deterministic Veto Power: Python code holds absolute authority over leverage and position sizing, regardless of AI suggestions.
  • Multi-Perspective Synthesis: Uses a "council" of different LLMs to mitigate the bias of any single model.
  • Microstructure Analysis: Goes beyond lagging indicators to analyze order flow, taker delta, and volatility surfaces.
  • Fail-Closed Design: Boots in paper trading mode by default to prevent accidental live capital loss.
  • Prompt Caching: Implements a shared prefix architecture to reduce LLM API costs and latency.

Related

  • Project
  • Project
  • Project
  • Project