Institutional-grade quantitative trading framework for alpha research and production.
Project description
XQuant
Institutional-Grade Quantitative Trading Framework for Alpha Research and Production
XQuant is a high-performance, modular framework designed for the development, backtesting, and deployment of quantitative trading strategies. Built with an emphasis on mathematical rigor and architectural flexibility, XQuant provides researchers and engineers with the tools necessary to bridge the gap between abstract alpha discovery and systematic production execution.
Technical Foundations
Core Architecture
XQuant utilizes a strictly decoupled, layered architecture to ensure modularity and extensibility:
- Data Orchestration: Standardized OHLCV ingestion with support for Equities, Digital Assets, and FX via optimized adapters (yfinance, CCXT, OANDA). Features include multi-asset alignment, timezone normalization, and adaptive trading calendars.
- Feature Engineering: A comprehensive library of 50+ technical indicators and microstructure metrics (OFI, VWAP Deviation, Bid-Ask Spread). Supports custom factor development via an abstract Factor API.
- Signal Discovery: Institutional-grade signal evaluation using Information Coefficient (IC), ICIR, and Rank IC. Includes advanced signal decay and half-life analysis.
- Dual-Engine Backtesting:
- Vectorized: Ultra-fast NumPy/Pandas engine for high-throughput parameter optimization.
- Event-Driven: High-fidelity simulation utilizing an asynchronous event loop for realistic execution modeling, slippage, and market impact.
- Statistical Validation: Robustness suite featuring Walk-Forward Optimization (WFO), Monte Carlo simulations, and Overfit Detection using the Deflated Sharpe Ratio (DSR).
- Risk & Portfolio Management: Advanced metrics suite (Sharpe, Sortino, VaR, CVaR) coupled with volatility-targeted position sizing and Kelly Criterion allocation.
- Live Execution Infrastructure: Low-latency broker adapters with support for paper trading and live production hooks (CCXT).
System Components
| Layer | Functional Scope |
|---|---|
| Ingestion | Multi-source adapters, OHLCV normalization, resampling. |
| Features | Technical indicators, microstructure, cross-asset correlations, regime detection. |
| Signals | Alpha discovery, scoring, ensemble combination, decay analysis. |
| Backtest | Vectorized research engine, Event-driven execution engine. |
| Validation | OOS testing, WFO, Monte Carlo, Bias/Overfit detection. |
| Risk | Institutional performance metrics, exposure tracking, drawdown analysis. |
| Execution | Paper trading simulation, Live broker adapters. |
| Analytics | Performance tearsheets, high-fidelity visualization, data export. |
Installation and Deployment
Prerequisites
- Python 3.9+
- NumPy, Pandas, Polars
- CCXT (for digital asset execution)
Setup
git clone https://github.com/ak495867/xquant.git
cd xquant
pip install -e .
Usage Overview
Automated Strategy Execution
XQuant provides comprehensive examples to demonstrate full-pipeline execution:
# Execute Equity Momentum Strategy
python examples/equity_momentum.py
# Execute Crypto Mean Reversion Strategy
python examples/crypto_mean_reversion.py
Strategic Research Workflow
Researchers can utilize the modular API to build custom pipelines:
from xquant.data.loader import DataLoader
from xquant.features.technical import RSI
from xquant.backtest.engine.vectorized import VectorizedEngine
# Ingestion
data = DataLoader().load("AAPL", start_date="2022-01-01")
# Engineering
data['rsi'] = RSI(window=14).compute(data)
# Signal and Backtest
signals = (data['rsi'] < 30).astype(int)
results = VectorizedEngine().run(data, signals)
Development and Contributions
XQuant is built for the community. We maintain rigorous standards for code quality and mathematical accuracy. Please refer to CONTRIBUTING.md for technical specifications on adding new features or adapters.
License
XQuant is distributed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xquant_core-0.1.0.tar.gz.
File metadata
- Download URL: xquant_core-0.1.0.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89957a663a5da64a506ab94ce0a25771601f99894fdebfb3a1f7b4ceecc794a3
|
|
| MD5 |
291027018f2791066b1ba4964574cb49
|
|
| BLAKE2b-256 |
415b523f85a98e0b620dce4934aab8cd7bc981433c460a86c578696601147c10
|
File details
Details for the file xquant_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xquant_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d23398281a1af58eca642f6cc16b4e0a3d2406d0a217368d350d1ca1e98f5907
|
|
| MD5 |
c94cdbd6222f4be6f465472e3c262b47
|
|
| BLAKE2b-256 |
1fd37f765c4d11ef54b91023fa2fe358688b444475cbcab06b72a3dde3f80935
|