~/projects

Projects

Embedded systems, custom PCBs, and software — from concept through to working hardware.

SoftwareIn Progress

Crucible

A C++ performance engineering microsite. Each post benchmarks a focused optimisation problem — cache effects, branch prediction, SIMD — with naive vs tuned implementations, real measurements, and D3 visualisations.

C++CMakeNext.jsMDXD3ShikiPerformance Engineering
SoftwareIn Progress

Anvil

A C++20 price-time-priority matching engine with a live, interactive demo. The engine matches new/cancel/amend flow using fixed-point integer prices, packed order ids, and a pool/index data model over flat_map book sides — deterministic and single-threaded by design, the way a real venue matches a single instrument. A Crow server links it as a library and streams live order-book state over REST + WebSocket to a React trading-terminal UI, driven by a throttled, on-demand feeder; correctness is pinned by a differential oracle, a runtime invariant verifier, and adversarial load tests. Deployed on AWS Lightsail behind nginx.

C++20Price-Time MatchingFixed-Pointflat_mapPool/Index Data ModelCrowWebSocket+4
HardwareSoftwareIn Progress

DepthCharge

A physical limit-order-book display: an ESP32-S3 driving a 64×64 LED matrix behind smoked acrylic, rendering live depth first from my own matching engine (Anvil), then from Kraken and Binance — bids stacking green, asks red, trades flashing white at the touch, grey when the data can't be trusted. The portable C++20 book engine is proven on a desktop replay harness before it ever touches the microcontroller; custom carrier PCB and printed enclosure.

C++20ESP32-S3HUB75Order BooksWebSocketMarket DataKiCad+1
SoftwareComplete

Temper

A reinforcement-learning execution agent, graded against Almgren–Chriss closed forms it is never allowed to quietly beat. The agent works a parent order in a simulated market; an independently derived oracle says what optimal is, and every threshold is written down before training starts. In the linearised world it rediscovers the analytic schedule to four decimal places; in the world with the real 0.6-power impact law — where the closed form is derived at a tangent and is genuinely wrong — it captures 99.4 % of the difference against a certified optimum. Given an invented one-step-ahead price signal explaining one part in ten thousand of the next bin's return variance, it captures 93 % of the available advantage while paying 1.05× the optimum's own execution premium — three numbers that are only reported together. The same agent then worked a real order on a live matching engine over a wire, as that venue's third independent client — where the number it reports was computed in closed form before anything was sent. Python, PyTorch, single-file PPO, CPU only.

PythonPyTorchPPOReinforcement LearningOptimal ExecutionAlmgren–ChrissMarket Impact+4
HardwareIoTComplete

MorayGlow

WiFi-connected RGB LED strip controller built on the XIAO ESP32-S3 with custom PCB design, MOSFET drivers, MQTT/REST/WebSocket control, and Home Assistant auto-discovery.

XIAO ESP32-S3KiCadPlatformIOC++JavaScriptIRLML6344TRMP1584+4
SoftwareComplete

FrontierView

Pre-trade transaction cost analysis tool for institutional equity execution. Implements the Almgren et al. (2005) market impact model with property-tested correctness, an interactive efficient-frontier visualiser, regime sensitivity analysis, and a synthetic calibration tab demonstrating the η/γ parameter estimation methodology. FastAPI backend, custom-styled HTML frontend, deployed standalone.

PythonFastAPIAlmgren-ChrissQuantitative FinancePre-Trade TCAProperty TestingPydantic+2
IoTSoftwareComplete

WhisperBridge

WiFi/MQTT-to-BLE bridge that lets Home Assistant control a Vent-Axia Svara fan via a one-shot boost command — no cloud subscription required.

ESP32 DevKit V1BLEMQTTHome AssistantNimBLEC++20PlatformIO+2