MCPcopy Create free account
hub / github.com/0burak/imperial_hft

github.com/0burak/imperial_hft @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
164 symbols 258 edges 58 files 20 documented · 12% updated 2mo ago★ 1,2244 open issues

Browse by type

Functions 142 Types & classes 22
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Low-Latency Programming Repository for High-Frequency Trading (HFT) | https://www.deltashark.io/

Table of Contents

  1. Introduction
  2. Features
  3. Installation
  4. Prerequisites
  5. Usage
  6. Benchmarking
  7. Acknowledgments

Introduction

Welcome to the Low-Latency Programming Repository, a project aimed to serve both academics and industry practitioners in the realm of High-Frequency Trading (HFT). With a focus on optimizing latency-critical code, this repository provides comprehensive insights, techniques, design patterns, and best practices that are statistically benchmarked to mitigate latency in HFT systems.

Feel free to check out my YouTube where I make videos on my experience: https://www.youtube.com/@bmgunduz

Features

  • Comprehensive guide on low-latency programming techniques such as Cache Warming, Constexpr, Loop Unrolling, Lock-Free Programming, and Short-circuiting.
  • Market-neutral statistical arbitrage pairs trading strategy optimized for low-latency.
  • Implementation of the Disruptor pattern in C++ optimized for speed and scalability.

Installation

Clone this repository to your local machine to get started.

git clone https://github.com/0burak/imperial_hft.git
cd imperial_hft

Prerequisites

  • C++ Compiler with C++11 support or higher
  • CMake version 3.10 or higher
  • Google Benchmark

Usage

After Google Benchmark has been installed and the benchmark folder if in the same directory as the mybenchmark.cc file, the user can compile the my-benchmark.cc file using the makefile provided in the repository.

g++ mybenchmark.cc -std=c++20 -isystem benchmark/include -Lbenchmark/build/src -lbenchmark -lpthread -o mybenchmark

Benchmarking

All techniques and strategies are rigorously benchmarked for latency reduction, cache efficiency, and overall performance. The benchmark/ directory contains all benchmarking scripts.

Acknowledgments

  • A special thanks to Dr Paul A. Bilokon for his evaluation and invaluable feedback.

Core symbols most depended-on inside this repo

Shape

Function 87
Method 55
Class 21
Enum 1

Languages

C++99%
Python1%

Modules by API surface

design_patterns/branch_reduction/mybenchmark.cc13 symbols
design_patterns/compile-time dispatch/mybenchmark.cc8 symbols
statarb/pt_simd/mybenchmark.cc6 symbols
statarb/pt_inlining/mybenchmark.cc6 symbols
statarb/pt_buffer/mybenchmark.cc6 symbols
statarb/pairs_trading/mybenchmark.cc6 symbols
design_patterns/slowpath_remove/mybenchmark.cc6 symbols
statarb/pairs_trading_optimised/mybenchmark.cc4 symbols
distuptor/disruptor_benchmark/Sequencer.cpp4 symbols
distuptor/disruptor_benchmark/Disruptor.cpp4 symbols
distuptor/disruptor_benchmark/Benchmark.cpp4 symbols
distuptor/Sequencer.cpp4 symbols

For agents

$ claude mcp add imperial_hft \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page