HyperQ is a high-frequency, institutional-grade execution engine for cryptocurrency perpetual futures, featuring a Rust + Python dual-engine architecture. It is designed to capture high-certainty momentum breakouts while strictly managing risk with HFT-level (High-Frequency Trading) precision.
- V7.0 Triple-Confluence Momentum FLIP Engine: During micro 5m breakouts that confirm macro 24h trend reversals with Order Flow Imbalance (OFI), the Rust CTA engine overrides the AI's mean-reversion signals and dynamically flips to momentum trend-following trades. It passes over fakeouts to retain the AI's high win-rate mean-reversion chops.
- 0.1s Real-time Trailing Stop & L3 CVD Risk Guard: The
RiskGuard V7.0module in Rust iterates through memory-mapped WebSocket data every 100 milliseconds, ensuring profits are locked in instantly. It also uses L3@aggTradeCVD (Cumulative Volume Delta) to detect whale dumping, triggering preemptive stop-loss instantly. - -12% Zero-Slippage Hard Stop Execution: Upgraded in V6.2, all stop-loss orders are executed as instantaneous
cancel_all_ordersandMARKET_CLOSEto rigidly cap massive black-swan drawdowns, fully eliminating Maker-order slippage blind spots. - Pure 15m Momentum (Zero Network IO): Upgraded to 'Assassin Mode', the Python AI inference server analyzes pure 15m order flow (OFI) momentum, completely eliminating 4H/1H REST API network delay.
hyperq-rs(Rust): Handles Binance WebSocket streams, local L2 order book construction, PnL math, and order execution.transformer_hmm_server_remote.py(Python): Processes historical K-lines and emits trading probabilities (prob_long,prob_short) via ZeroMQ to the Rust engine.
This repository provides the Framework and Execution Engine. To protect against Alpha decay in live markets, the core XGBoost/HMM Model Weights and specific Asset Pool (symbol_registry.json) are NOT open-sourced.
You must build and train your own Machine Learning models or connect your own signal generator to the ZeroMQ socket defined in the Python script.
- Install Rust (
rustup) and Python 3. - Rename
config.example.tomltoconfig.tomland fill in your Binance API keys. - Start the Rust Engine:
cargo run --release
- Start your Signal Server:
python3 transformer_hmm_server_remote.py
HyperQ 是一套专为加密货币永续合约打造的工业级量化执行引擎,采用 Rust + Python 双擎架构。它专门用于捕捉高确定性的主升浪,并以极端的纪律和 HFT(高频交易)级别的精度进行风控。
- V7.0 三重共振动能翻转引擎 (FLIP):在发生“微观爆发 + 宏观破位 + 盘口验证”的三重共振时,Rust CTA 动能推土机会强行接管 AI 的均值回归摸顶信号,翻转为顺势的动能追击单,死死咬住单边大趋势。同时放行假突破洗盘,保留 AI 的抄底高胜率。
- 0.1秒极速追踪止盈 & L3 CVD 风控:底层的
RiskGuard V7.0模块每 100 毫秒扫描一次内存中的 WebSocket 订单流。结合 L3@aggTrade的真实买卖差 (CVD),一旦发现主力砸盘,瞬间市价抢跑逃命。 - -12% 零滑点市价断头台 (V6.2):彻底重构的物理级风控。一旦触发止损,系统瞬间执行撤单并以市价(Market Order)强平,刚性切断黑天鹅级别的暴跌亏损,完全消除了旧版限价单死等的风控盲区。
- 纯 15m 极速动能 (零网络 IO 延迟):升级为“刺客模式”,砍掉大周期 REST API 请求,Python 端专注于纯粹的 15m 微观订单流失衡 (OFI) 爆发,实现毫秒级“零等待”信号生成。
本仓库仅开源**“工程骨架与风控引擎”**。为了防范核心策略在实盘中因过度拥挤而失效(Alpha衰减),核心的 XGBoost/HMM 模型权重以及分层资产池配置不予开源。
您需要自行训练 AI 模型,或通过 ZeroMQ 接入您自己的策略交易信号。