Mercury is a cutting-edge trading engine implemented in C++, designed for optimal performance in quantitative finance. With sustained throughput of over 3.2M orders per second and microsecond-level latency, it employs custom data structures to facilitate efficient order book management, backtesting, and risk management.
Mercury is a high-performance C++ trading engine designed for low-latency trading applications. This engine features a fully implemented limit order book with price-time priority matching, built from scratch utilizing optimized data structures for maximum efficiency. It serves as an educational resource, demonstrating key principles of systems programming applicable to quantitative finance, including cache-friendly design and memory management.
Using a modular architecture, Mercury's design incorporates various components:
The engine utilizes custom data structures to enhance performance:
Integrate trading strategies with the engine seamlessly:
#include "StrategyManager.h"
MarketMakingConfig config;
config.name = "MarketMaker";
config.quoteQuantity = 100; // Size per quote
...
StrategyManager manager(engine);
manager.addStrategy(std::make_unique<MarketMakingStrategy>(config));
Utilize the backtesting facility to validate trading strategies against historical data:
./build/mercury --backtest momentum # Executes momentum strategy backtest.
Mercury stands as a robust foundation for those looking to understand and implement a high-performance trading system, providing essential functionalities that can be further expanded to accommodate more complex trading frameworks.
No comments yet.
Sign in to be the first to comment.