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.
Metadata
Release files for xquant-core 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| xquant_core-0.1.0.tar.gz | 29.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xquant_core-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 68.6 kB
Release files / xquant_core-0.1.0.tar.gz
| Download URL | xquant_core-0.1.0.tar.gz |
|---|---|
| Size | 29.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89957a663a5da64a506ab94ce0a25771601f99894fdebfb3a1f7b4ceecc794a3
|
|
BLAKE2b-256 checksum How to use checksums |
415b523f85a98e0b620dce4934aab8cd7bc981433c460a86c578696601147c10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / xquant_core-0.1.0-py3-none-any.whl
| Download URL | xquant_core-0.1.0-py3-none-any.whl |
|---|---|
| Size | 38.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d23398281a1af58eca642f6cc16b4e0a3d2406d0a217368d350d1ca1e98f5907
|
|
BLAKE2b-256 checksum How to use checksums |
1fd37f765c4d11ef54b91023fa2fe358688b444475cbcab06b72a3dde3f80935
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for xquant-core 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.