How quantum-blade1/hybrid-quantum-classical-optimal-execution-engine-for-low-latency-trading works
This is a reproducible research artifact for hybrid quantum-classical trade execution. Its runtime workflow starts with an order, runs a nonblocking tick loop using a fallback or latest published schedule, and solves schedules asynchronously; a separate evaluation workflow compares schedules on held-out market data and produces statistical results and figures. The graph also preserves the documented microstructure, solver, and IBM hardware-analysis branches. Some subsystem links are README-documented rather than visible in sampled implementation, so those links are identified as documented or left out when their caller is unknown.
Main entry points: real_data.py Held-out data study · hft_pipeline.py HFT pipeline · controller.py Hybrid controller · engine.py Tick execution
Components 29
Hybrid runtime
- Hybrid controller
src/qexec/runtime/controller.py - Tick execution
src/qexec/runtime/engine.py - Latest policy slot
src/qexec/runtime/policy.py - Async optimizer
src/qexec/runtime/optimizer.py - HFT pipeline
src/qexec/runtime/hft_pipeline.py - Latency monitor
src/qexec/runtime/latency.py
Execution and markets
- Market data
src/qexec/market/binance.py - Market simulation
src/qexec/market/simulator.py - Order book
src/qexec/market/order_book.py - Impact calibration
src/qexec/market/calibration.py - Execution strategies
src/qexec/execution/strategies/base.py - Execution engine
src/qexec/execution/engine.py - Execution costs
src/qexec/execution/cost_model.py
Optimization
- Schedule QUBO
src/qexec/optimization/qubo.py - HFT QUBO
src/qexec/optimization/hft_qubo.py - Schedule encoding
src/qexec/optimization/schedule.py - Annealing solver
src/qexec/optimization/solvers/annealing.py - QAOA solver
src/qexec/optimization/solvers/qaoa.py
Research and analysis
- Microstructure analysis
src/qexec/microstructure/analyzer.py - Regime analysis
src/qexec/microstructure/regime.py - Held-out data study
experiments/real_data.py - Execution statistics
src/qexec/analysis/statistics.py - IBM job analysis
experiments/hardware_analysis.py
Results and figures
- Experiment records
src/qexec/experiment.py - Figure registry
figures/registry.py - Results reader
figures/common.py - Paper figures
figures/paper.py - Streamlit dashboard
apps/dashboard.py
Other components
- Order initiator
Connections 36
- Order initiator → Hybrid controller: submits order
src/qexec/runtime/controller.py - Hybrid controller → Latest policy slot: creates slot
src/qexec/runtime/controller.py - Hybrid controller → Async optimizer: starts optimizer
src/qexec/runtime/controller.py - Hybrid controller → Tick execution: starts execution
src/qexec/runtime/controller.py - Tick execution → Latest policy slot: polls policies
src/qexec/runtime/engine.py - Async optimizer → Latest policy slot: publishes schedules
- Async optimizer → Schedule QUBO: solves schedule QUBO
- Schedule QUBO → Annealing solver: solved by
- Schedule QUBO → QAOA solver: offline solver
- Tick execution → Schedule encoding: repairs plan
src/qexec/runtime/engine.py - Tick execution → Latency monitor: records latency
src/qexec/runtime/engine.py - HFT pipeline → Microstructure analysis: updates estimates
src/qexec/runtime/hft_pipeline.py - HFT pipeline → Regime analysis: updates estimates
src/qexec/runtime/hft_pipeline.py - HFT pipeline → HFT QUBO: builds problem
src/qexec/runtime/hft_pipeline.py - HFT pipeline → Annealing solver: re-solves problem
src/qexec/runtime/hft_pipeline.py - HFT pipeline → Latest policy slot: publishes policy
src/qexec/runtime/hft_pipeline.py - HFT pipeline → Latency monitor: records latency
src/qexec/runtime/hft_pipeline.py - Market data → Held-out data study: supplies market data
- Held-out data study → Impact calibration: loads calibration
experiments/real_data.py - Held-out data study → Execution engine: runs evaluation
experiments/real_data.py - Held-out data study → Execution strategies: evaluates strategies
experiments/real_data.py - Held-out data study → Execution costs: uses cost model
experiments/real_data.py - Execution engine → Order book: uses book
src/qexec/execution/engine.py - Execution engine → Market simulation: uses simulator
src/qexec/execution/engine.py - Execution engine → Execution strategies: runs strategy
src/qexec/execution/engine.py - Execution strategies → Order book: reads snapshots
src/qexec/execution/strategies/base.py - Execution strategies → Market simulation: uses VWAP
src/qexec/execution/strategies/base.py - Impact calibration → Execution costs: calibrates costs
src/qexec/market/calibration.py - Held-out data study → Execution statistics: compares outcomes
experiments/real_data.py - Held-out data study → Experiment records: writes study outputs
src/qexec/experiment.py - IBM job analysis → Experiment records: records analysis
experiments/hardware_analysis.py - IBM job analysis → Annealing solver: compares results
- Figure registry → Results reader: configures producers
figures/registry.py - Paper figures → Results reader: reads results
figures/paper.py - Results reader → Experiment records: reads output tables
- Streamlit dashboard → Hybrid controller: uses controller
apps/dashboard.py