AI-native quantitative trading framework — high-performance Rust core with Python RL training interface, covering backtesting, training, optimization, validation and production in a single codebase.
pip install axon-quant==0.14.5 Copy PIP instructions
An event-driven trading engine for quantitative trading and reinforcement learning. Designed from the ground up with AI at its core, rather than "bolting on" ML modules to a traditional quant system.
Rust core for high-performance, Python interface for RL training, one codebase for the complete pipeline from backtesting to production.
Note: DeFi features are experimental and under active development. APIs may change.
# Basic install (core + data processing) pip install axon_quant # With ONNX inference support (onnxruntime, auto-loaded) pip install axon_quant[onnx] # With RL training dependencies (gymnasium, stable-baselines3, torch) pip install axon_quant[rl] # Full install pip install axon_quant[onnx,rl] Verify installation:
python -c "import axon_quant; print(axon_quant.__version__)" Build from Source For developers who want to modify the Rust core:
git clone https://github.com/pengwow/axon_quant.git cd axon_quant # Build cargo build # Test (2300+ test cases) cargo test --workspace # Static analysis cargo clippy --workspace -- -D warnings # Build and install Python wheel maturin build --release pip install target/wheels/axon_quant-*.whl Training Examples # Random baseline python examples/01_random_agent.py # PPO training python examples/02_train_ppo.py --timesteps 50000 # HPO optimization python examples/03_hpo/hpo_single_objective.py # Rolling forward validation python examples/08_walk_forward/walk_forward_basic.py 📖 Detailed RL training documentation: RL Training Guide
AXON uses Cargo Workspace to manage 21 crates, organized in 9 layers:
┌─────────────────────────────────────────────────────────────┐ │ Layer 9: Application Entry │ │ ├─ axon-cli CLI tool │ │ └─ axon-python PyO3 unified entry (axon_quant package) │ ├─────────────────────────────────────────────────────────────┤ │ Layer 8: AI Agents │ │ ├─ axon-llm ReAct agent + Tool Calling │ │ └─ axon-explain SHAP / Counterfactual / Decision Report │ ├─────────────────────────────────────────────────────────────┤ │ Layer 7: Model Services │ │ ├─ axon-inference ONNX / Candle / tch inference engine │ │ └─ axon-ensemble Model ensemble (Voting / Stacking) │ ├─────────────────────────────────────────────────────────────┤ │ Layer 6: Training Pipeline │ │ ├─ axon-rl Gymnasium env + VecEnv + Reward functions│ │ ├─ axon-hpo Optuna hyperparameter optimization │ │ ├─ axon-distributed Ray Actor distributed training │ │ └─ axon-walk-forward Rolling forward validation │ ├─────────────────────────────────────────────────────────────┤ │ Layer 5: Experiment Governance │ │ ├─ axon-tracker MLflow / WandB / Local / Memory tracking │ │ └─ axon-registry Model registry (SemVer + Lifecycle) │ ├─────────────────────────────────────────────────────────────┤ │ Layer 4: Production Execution │ │ ├─ axon-exchange Binance / OKX adapters (REST + WebSocket)│ │ ├─ axon-risk Risk engine (Position / Drawdown / VaR) │ │ ├─ axon-oms Order management system │ │ └─ axon-monitor Monitoring + Health checks │ ├─────────────────────────────────────────────────────────────┤ │ Layer 3: Backtesting Engine │ │ ├─ axon-backtest L1/L2/L3 matching + Almgren-Chriss impact│ │ └─ axon-compliance Compliance audit + Reports │ ├─────────────────────────────────────────────────────────────┤ │ Layer 2: Data Services │ │ └─ axon-data Arrow columnar storage + CSV/Parquet │ ├─────────────────────────────────────────────────────────────┤ │ Layer 1: Core Types │ │ └─ axon-core Timestamp / Price / Quantity / Order │ │ / Event / Queue / Portfolio / SIMD │ └─────────────────────────────────────────────────────────────┘ Threading Model Core Matching Engine: Single-threaded, avoids lock contention, ensures determinism I/O Thread Pool: tokio runtime, handles WebSocket / REST / file I/O Compute Thread Pool: rayon, factor calculation / data transformation / parallel backtesting Event Queue: crossbeam-channel bounded 100K, zero-lock design Data Pipeline All AXON modules share the same Arrow RecordBatch, zero-copy passthrough, no format conversion gaps:
Data Sources (CSV/Parquet/WebSocket/Mock/Exchange API) │ ▼ axon-data (schema validation / time alignment / dedup / mmap cache) │ ▼ Arrow RecordBatch (memory) ──→ TradingEnv / FeaturePipeline / BacktestEngine │ ▼ InferenceEngine (ONNX/Candle batch inference < 1ms) │ ▼ ExchangeAdapter (Binance/OKX live trading) Layer Descriptions axon-core: Foundation of the entire system. Provides Timestamp (nanosecond precision), Price / Quantity (based on rust_decimal), Order, Event, Queue, Portfolio core types, and SIMD-accelerated normalization and order book operations.
axon-data: Unified data access layer. Based on Apache Arrow's RecordBatch columnar storage, supports CSV / Parquet / Mock data sources, built-in FeaturePipeline (Z-Score normalization + sliding window).
axon-backtest: Event-driven backtesting engine. Supports L1 (price priority), L2 (order book), L3 (dark pool / auction) three-level matching, integrated Almgren-Chriss market impact model and probabilistic latency simulation.
axon-exchange: Production-grade exchange adapter. Unified ExchangeAdapter trait, implemented Binance / OKX REST + WebSocket integration, built-in exponential backoff reconnection and token bucket rate limiting.
axon-rl: Reinforcement learning environment. TradingEnv implements Gymnasium standard interface (reset / step / render), supports continuous actions (target position ratio [-1, 1]), discrete actions (position bins), multi-objective rewards and vectorized parallel environment VecEnv.
axon-inference: Model inference engine. Supports ONNX Runtime, Candle (pure Rust), tch-rs (PyTorch C++) three backends, with async batch inference pipeline, CPU/GPU affinity binding and model hot update capability.
axon-llm: Large language model agent. Based on ReAct reasoning loop, built-in "market analysis", "query portfolio", "place order" three tools, supports OpenAI-compatible backends and streaming responses.
axon-explain: Explainability engine. Integrates SHAP feature attribution, counterfactual explanations ("What if I hadn't bought, how would returns change") and structured decision reports, meeting compliance and strategy iteration needs.
axon-ensemble: Model ensemble. Provides HardVote, SoftVote, WeightedVote, Stacking, DynamicWeighted five strategies, supports online performance monitoring and automatic weight adjustment.
axon_quant/ ├── crates/ # 21 Rust crates │ ├── axon-core/ # Core types (time/types/market/order/event/queue/portfolio) │ ├── axon-backtest/ # Backtesting engine (L1/L2/L3 matching + impact models) │ ├── axon-rl/ # RL environment (Gymnasium + VecEnv) │ ├── axon-hpo/ # Hyperparameter optimization (Optuna + NSGA-II) │ ├── axon-walk-forward/ # Rolling forward validation (Purged + Embargo) │ ├── axon-distributed/ # Distributed training (Ray) │ ├── axon-tracker/ # Experiment tracking (MLflow/WandB/Local/Memory) │ ├── axon-registry/ # Model registry (SemVer + lifecycle) │ ├── axon-exchange/ # Exchange adapters (Binance/OKX) │ ├── axon-inference/ # Inference engine (ONNX/Candle) │ ├── axon-risk/ # Risk engine │ ├── axon-oms/ # Order management system │ ├── axon-monitor/ # Monitoring alerts │ ├── axon-llm/ # LLM agent │ ├── axon-python/ # Python bindings entry │ └── axon-cli/ # CLI tool ├── python/ # Python package (axon_quant) ├── examples/ # Training example scripts ├── tests/ # Tests (Rust + Python) ├── docs/ # Design docs + ADR ├── scripts/ # Build and test scripts ├── pyproject.toml # Python packaging config ├── Makefile # Development commands └── Dockerfile # Multi-stage build Crate Matrix Crate Function axon-core Core types (11 modules) axon-backtest Backtesting engine (L1/L2/L3) axon-rl RL environment (Gymnasium + VecEnv) axon-hpo Hyperparameter optimization (Optuna) axon-walk-forward Rolling forward validation axon-distributed Distributed training (Ray) axon-tracker Experiment tracking axon-registry Model registry axon-exchange Exchange adapters (Binance/OKX) axon-inference Inference engine (ONNX/Candle) axon-python Python bindings (PyO3) axon-cli CLI tool axon-risk Risk engine axon-oms Order management axon-monitor Monitoring alerts axon-llm LLM agent axon-explain SHAP explainability axon-ensemble Model ensemble axon-compliance Compliance audit axon-data Data services axon-integration-tests Integration tests Performance Metric Value Backtesting Throughput > 1M events/sec Matching Latency 10K steps/sec (8 env VecEnv) Distributed Speedup > 5x (8 workers) Test Cases 1200+ Rust + 24 Python Benchmarks Workspace has established 50+ Criterion benches across 5 crates:
make bench # Full workspace, 5-10 minutes locally make bench-cmp # Save main baseline for PR comparison make bench-one CRATE=axon-core BENCH=event_builder_tick # Single bench cargo bench -p axon-core -- impact_linear # Direct cargo run CI doesn't run bench (to avoid main runner performance noise). Report: target/criterion/ /report/index.html.
axon-inference provides affinity module for cross-platform core pinning to reduce cross-core cache misses:
[batch] collect_cpu_cores = [0, 1, 2, 3] collect_gpu_device_id = 0 Platform support: Linux / macOS full support, Windows runtime returns Err(AffinityError::NotAvailable) (use WSL2 / numactl instead).
This project is an open-source quantitative trading framework intended for research and educational purposes only.
By using this software, you acknowledge that you understand and accept these terms.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
The dropdown lists show the available interpreters, ABIs, and platforms.
Enable javascript to be able to filter the list of wheel files.
Copy a direct link to the current filters Copy
Uploaded Sep 15, 2026 CPython 3.14Windows x86-64
Uploaded Sep 15, 2026 CPython 3.14manylinux: glibc 2.38+ x86-64
Uploaded Sep 15, 2026 CPython 3.14macOS 11.0+ ARM64
Details for the file axon_quant-0.14.5.tar.gz.
The following attestation bundles were made for axon_quant-0.14.5.tar.gz:




