🔥 ExSan Pushing the Limits of High-Frequency Trading with C++ 🔥
In the initial implementation, a new cluster was created each time new data was read from the simulator's data stream. I observed that this approach resulted in significant time consumption due to the repeated creation and deletion of clusters. To address this, I developed a method to reuse the originally created cluster, substantially reducing overhead. The method for this improved version is quite simple: the clusters are declared static from the beginning, allowing them to persist and be reused. Because of the nature of the clusters — they are implemented as Red-Black Trees — if there are not enough nodes to accommodate new data, the code simply adds additional nodes dynamically, allowing for seamless expansion. This optimization was applied while feeding ExSan with my market simulator, which mimics the asynchronicity of real market data over time, enabling efficient and realistic backtesting of trading strategies. As a result, the throughput of data processing increased, and the overall efficiency of the program improved considerably.
🧠Algorithm for Large-Scale Sparse Covariance Matrix
Optimizing Covariance and Correlation for ultra-low-latency environments using clustered data structures.
I’m currently developing my own HFT algorithm with a clear goal: to optimize Covariance and Correlation performance in ultra-low-latency environments using clustered data structures.
This has been one of the most technically challenging and rewarding parts of the project so far—and I’m excited to share what I’ve built:
- 📘 The Concept
Clustering in HFT - 🧮 Sparse Matrix Strategy
Awesome Algorithm to Handle Huge Sparse Covariance Matrices - 💻 The Code
Inside the Engine: Code-Level Look at ExSan - 📊 The Results
° Backtesting Pipeline Feed to ExSan
° Large files shared seamlessly via Wikifortio
The current implementation performs well—but after redesigning clusters as a static abstract data structure, I’ve seen a major boost in data processing throughput. I’ll be sharing those results soon.
In parallel, I’ve also built and beta-tested my own trading platform, fully integrated with Interactive Brokers using C++.
This is more than code—it's a personal mission. And I’m just getting started.
For clarity, this implementation relies solely on raw pointers—no smart pointers or abstractions.
🧠Welcome to ExSan - Not Afraid of PointersðŸ§
Author
Tags:
#HFT #Cplusplus #QuantFinance #AlgorithmicTrading #FinTech #TradingSystems #LowLatency #InteractiveBrokers
Comments
Post a Comment