javifalces/HFTFramework
HFTFramework utilized for research on " A reinforcement learning approach to improve the performance of the Avellaneda-Stoikov market-making algorithm "
What it solves
This framework provides a professional-grade infrastructure for developing, backtesting, and deploying High-Frequency Trading (HFT) strategies. It bridges the gap between granular research and live execution by allowing developers to use the same codebase for both L2 tick-data backtesting and live market interfacing.
How it works
The system is built using a hybrid Java and Python architecture. Java handles the high-performance core, market connectivity, and backtesting engine, while Python is used for strategy development via a ZeroMQ-based communication layer.
- Connectivity: It uses "Market Engines" (like XChange for crypto or a custom ZeroMQ gateway for MetaTrader 5) to translate raw market data into a standardized format.
- Strategy Execution: Users can write algorithms in Java for maximum performance or in Python for flexibility. Python strategies communicate with the Java core using ZeroMQ (TCP or IPC) and can use JSON or MessagePack for serialization.
- Backtesting: The framework supports L2 tick-level backtesting using Parquet files, ensuring that the simulation closely mimics live market behavior.
- Monitoring: It includes a Java UI, a web-based dashboard for real-time event streaming, and Grafana integration for JVM and portfolio performance tracking.
Who it’s for
Quantitative researchers and algorithmic traders who need a high-performance environment to test L2 market-making strategies and transition them from simulation to live or paper trading.
Highlights
- Unified Codebase: Use the same logic for backtesting and live trading to reduce simulation bias.
- Polyglot Support: Write strategies in Java or Python with low-latency ZeroMQ transport.
- L2 Granularity: Backtesting performed at the tick level for high precision.
- Real-time Observability: Embedded web UI for orderbook visualization and Grafana dashboards for PnL and latency monitoring.
- RL Ready: Includes a Gymnasium wrapper for training reinforcement learning models.
相关
- 项目
- 项目
- 项目
- 项目
- 项目