TradingMarketSimualtor it is. Just while I break it into smaller repos
  • C++ 92.7%
  • CMake 5.1%
  • Nix 1.1%
  • Makefile 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
xbazzi 3c1d1fddfc
All checks were successful
GCC Release / gcc-release (push) Successful in 4m18s
Clang Debug / clang-debug (push) Successful in 4m48s
GCC Debug / gcc-debug (push) Successful in 5m7s
chore: Switch to devenv
2026-07-15 20:52:35 -05:00
.forgejo/workflows fix: coverage.json rm 2026-07-13 19:53:29 -05:00
benchmarks refactor: flatten mms and fiah namespace usage 2026-05-09 22:16:03 -05:00
data feat: Add clang-format and clang-tidy, move main files into src/, moved logger into impl facade behind SimpleLogger.hh, add utils/Constants.hh, remove old proto stuff, start TomlParser class 2025-11-08 18:01:22 -07:00
etc feat(renaming): rename fiah to mms repo-wide 2026-05-09 21:17:41 -05:00
examples feat: update configuration handling to use quick::Config, remove fiah namespace components 2025-12-17 23:37:38 -07:00
include/mms chore: make CI great again. 2026-07-12 22:21:44 -05:00
src/mms feat: switch to fiah types and implement signed readers for depthconsumer 2026-07-07 21:24:59 -05:00
tests chore: make CI great again. 2026-07-12 22:21:44 -05:00
.clang-format Revert "chore: big move 🚚, formatting entire codebase." 2025-12-13 21:31:25 -07:00
.clang-tidy feat: Add clang-format and clang-tidy, move main files into src/, moved logger into impl facade behind SimpleLogger.hh, add utils/Constants.hh, remove old proto stuff, start TomlParser class 2025-11-08 18:01:22 -07:00
.clangd Finish generator/consumer 2026-06-20 16:59:47 -05:00
.envrc feat: Implemented raw tcp sockets and orders. 2025-10-29 00:27:50 -06:00
.gitignore chore: Switch to devenv 2026-07-15 20:52:35 -05:00
CMakeLists.txt feat: add clang support 2026-07-13 19:43:08 -05:00
coverage.json chore: make CI great again. 2026-07-12 22:21:44 -05:00
devenv.nix chore: Switch to devenv 2026-07-15 20:52:35 -05:00
devenv.yaml chore: Switch to devenv 2026-07-15 20:52:35 -05:00
Doxyfile feat(add-tests): Add GTest with CMake CTest module, set up some fixtures and harnesses. 2025-11-04 20:50:14 -07:00
flake.lock Start OrderBook for exchange matching engine 2026-06-23 22:48:25 -05:00
flake.nix feat: add clang support 2026-07-13 19:43:08 -05:00
Makefile chore: Removing unused stuff and cleaning things up 2026-07-06 21:05:20 -05:00
README.md feat: add clang support 2026-07-13 19:43:08 -05:00

Trading Market Simulator 🏦

GCC Debug GCC Release Clang Debug GCC Clang coverage

Trading simulator catch-all repo, for now.

Low latency, data locality, and high performance are paramount.

This project is in a bit of a Frankenstein mode right now with different trading-related components. The current goal is to break up the repo into smaller pieces, 2 for now:

  • An exchange-side simulator that replicates exchange dynamics
  • A market maker simulator to plug into the exchange(s) and feed structured market data into trading apps

Only tested on Linux, and it works on any distro. Not tested on MacOS yet. There will never be Windows support.

Requirements / Dependencies

The easiest way to get a known-good environment is by using Nix (see below), but if you prefer system packages, the list below covers what CMake asks for.

Minimum deps:

  • A C++ compiler with C++23 support (g++ or clang)
  • CMake (>= 3.25)
  • Ninja (default) or Make

Required for running tests/benchmarks:

  • Google Test (find_package(GTest REQUIRED))
  • Google Benchmark (find_package(benchmark REQUIRED))

Fetched automatically via CMake FetchContent (no manual install needed):

Again, using the Nix development environment will install all the dependencies and set up the environment variables for you.

Example package install commands:

Debian/Ubuntu:

sudo apt update
sudo apt install -y build-essential cmake ninja-build pkg-config libgtest-dev libbenchmark-dev

Fedora/RHEL/CentOS:

sudo dnf install -y gcc-c++ cmake ninja-build pkgconfig gtest-devel benchmark-devel

Arch:

sudo pacman -S --needed base-devel cmake ninja pkgconf gtest benchmark

Building

Install nix (and optionally direnv) and run the flake.nix to load all dependencies in your local environment:

nix develop

You'll be dropped into a shell with the proper dependencies. Then build the project:

make all

Using non-Nix package managers

If you prefer not to use Nix, go ahead and install the dependencies shown above for your distro. Then run the Makefile from the project root:

make all

Available targets:

Target Description
make all Build all targets
make options Build the options executable
make tests Build and run unit tests
make tests FILTER=pattern Run tests matching a gtest filter pattern
make md_generator Build the market data generator binary
make md_consumer Build the market data consumer binary
make clean Remove the build directory
make help Print all available targets

The benefits of Nix

If you have direnv, run direnv allow and enjoy having your packages loaded automatically when you cd into the repo; no need to run nix develop every time you're in a new shell or to switch shells for multiple projects.

Switching to devenv soon.

Troubleshooting

  • For development you may want additional tools such as clang-format, ccache, valgrind/memcheck, or benchmarking tooling available in benchmarks/.
  • If you run into missing packages or CMake cannot find a library, double-check that the dev/header packages are installed and that pkg-config can locate them.