Trading Project
A high-performance trading system built in C++ utilizing shared memory, inter-process communication, dynamic linking, and real-time data processing.


Technologies Used
C++Shared MemoryInter-Process Communication (IPC)Dynamic Linking (Shared Libraries)POSIX SignalsBoostMultithreadingAsynchronous ProcessingLow-latency Data HandlingModular Architecture
Overview
- Developed a fully modular, low-latency trading system using modern C++.
- Designed a multi-process architecture with IPC and shared memory for efficient real-time communication.
- Implemented dynamic strategy loading using shared libraries to enable live updates without restarting the system.
- Leveraged POSIX signals for inter-process synchronization and lifecycle management.
Features
- Shared Memory-based Market Data Feed: High-speed real-time data exchange using Boost.Interprocess, eliminating traditional socket bottlenecks.
- Order Management System (OMS): Processes trade orders with minimal latency and updates the order book in real-time using shared memory.
- Dynamic Strategy Loading: Trading strategies are implemented as shared objects (`.so`) and can be dynamically linked at runtime, allowing new strategies to be loaded without stopping the system.
- Efficient IPC & Synchronization: Processes communicate via shared memory with mutex-based synchronization, ensuring safe concurrent access to critical data.
- Asynchronous Event Handling: Boost.Asio is used to implement non-blocking event-driven processing for trading signals, data ingestion, and execution.
- Multi-threaded Processing: Each core module (Feed, Strategy, OMS) runs its own worker threads, ensuring smooth parallel execution without blocking critical operations.
- Low-latency Execution Pipeline: Optimized memory management and lock-free queues where applicable to reduce processing overhead and ensure high-speed trade execution.
- Real-time Performance Monitoring: Integrated logging and benchmarking tools to measure execution times, memory usage, and latency bottlenecks.
- Process Management with Signals: Uses UNIX signals (`SIGINT`, `SIGTERM`) to handle system shutdown, error recovery, and safe cleanup of shared memory.