Open Source · MIT License 开源项目 · MIT 协议

Where Alphas
Are Forged
Alpha 锻造之地
QuantPits

A production-ready quantitative trading system built on Microsoft Qlib. End-to-end pipeline with ensemble modeling, GPU-accelerated backtesting, workspace isolation, and interactive dashboards. 基于 Microsoft Qlib 构建的生产级量化交易系统。提供端到端的完整流水线,涵盖多模型融合、GPU 加速穷举回测、工作区隔离及交互式分析面板。

View on GitHub查看 GitHub Quick Start →快速开始 →
5+
ML ModelsML 模型
GPU
Accelerated加速运算
E2E
Pipeline端到端流水线
Features核心特性

Everything you need to trade systematically 体系化量化交易的完整解决方案

From data ingestion to order execution, QuantPits covers the full lifecycle with production-grade reliability. 从数据接入到订单执行,QuantPits 以生产级的可靠性覆盖量化交易全生命周期。

🏗️

Multi-Workspace Isolation 多工作区级隔离

Spin up independent "Pits" for different markets or configs — CSI300, CSI500, or your custom universe — without duplicating any code. 为不同市场或策略配置拉起独立的"交易控制台"——沪深300、中证500或自定义标的池——无需复制任何底层代码。

GPU-Accelerated Ensemble GPU 加速穷举融合

CuPy-powered brute force combination search across thousands of model permutations with intelligent signal fusion for optimal alpha blending. 基于 CuPy 加速的高性能组合穷举搜索,跨数千种模型排列实现智能信号融合与最优 Alpha 混合。

📊

Interactive Dashboards 交互式分析面板

Two built-in Streamlit dashboards for macro portfolio analytics and micro rolling health monitoring with real-time drill-downs. 内置两大 Streamlit 数据面板,分别用于宏观资产组合分析和微观滚动策略健康监控,支持实时下钻分析。

🔁

Component-Based Pipeline 组件化流水线

Modular stages — Train, Predict, Ensemble, Post-Trade, Order Gen — all orchestrable via one-liner Makefile targets or individual scripts. 模块化的流水线步骤——训练、预测、融合、盘后处理、订单生成——均可通过 Makefile 一键调度或单独脚本触发。

Architecture系统架构

Engine and Workspace, cleanly separated 引擎与工作区,彻底物理解耦

Code stays code. Data stays data. Spin up as many independent trading pits as you need. 代码归代码,数据归数据。按需拉起任意数量的独立实盘控制台。

~/QuantPits
QuantPits/
├── docs/              # System manuals (00-08)
├── ui/                # Streamlit dashboards
│   ├── dashboard.py     # Portfolio performance
│   └── rolling_dashboard.py
├── quantpits/         # Core engine & scripts
│   └── scripts/          # Pipeline execution
│
└── workspaces/        # Isolated trading pits
    └── Demo_Workspace/
        ├── config/      # Bounds, registry, cashflow
        ├── data/        # Orders, holdings, amounts
        ├── output/      # Predictions, fusion, reports
        ├── mlruns/      # MLflow tracking
        └── run_env.sh   # Workspace activation
Pipeline流水线

From raw data to actionable orders 从原始数据到可执行订单

A five-stage production loop that runs daily or weekly — fully automated with a single Makefile target. 五阶段生产循环,支持日频或周频运行——通过 Makefile 单一命令完全自动化。

🧠
Train训练
LSTM, GRU, Transformer, LightGBM, GATs LSTM、GRU、Transformer、LightGBM、GATs
🔮
Predict预测
Multi-model inference 多模型并行推断
🔀
Ensemble融合
Brute force + fusion 穷举搜索 + 信号融合
📋
Post-Trade盘后处理
Execution analysis 执行归因分析
📈
Orders订单
TopK/DropN signals TopK/DropN 信号生成
Get Started快速开始

Up and running in minutes 数分钟内启动运行

Clone, install, activate a workspace, and run your first pipeline. 克隆、安装、激活工作区,运行您的第一条流水线。

# Clone the repository $ git clone https://github.com/DarkLink/QuantPits.git $ cd QuantPits # Install dependencies $ pip install -r requirements.txt $ pip install -e . # (Optional) GPU acceleration $ pip install cupy-cuda12x
# Activate a workspace $ source workspaces/Demo_Workspace/run_env.sh # Or create a new one $ python -m quantpits.scripts.init_workspace \ --source workspaces/Demo_Workspace \ --target workspaces/CSI500_Base
# Run the full pipeline with one command $ make run-daily-pipeline # Or step by step $ python -m quantpits.scripts.prod_train_predict $ python -m quantpits.scripts.prod_predict_only --all-enabled $ python -m quantpits.scripts.ensemble_fusion --from-config-all $ python -m quantpits.scripts.order_gen # Launch dashboards $ streamlit run ui/dashboard.py

Ready to forge your alpha? 准备好锻造你的 Alpha 了吗?

QuantPits is open source, free to use, and built for traders who take their edge seriously. QuantPits 完全开源免费,专为认真对待交易优势的量化交易者打造。

Get Started on GitHub 前往 GitHub 开始