~/projects

Projects

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

HardwareAIComplete

SiglentTower

AI-led design and build of a bench tower for three Siglent instruments: a 2020-extrusion frame with 76 printed designs (103 pieces) made in CadQuery, a sliding scope sled with a rear storage box, three drawers, a clip-on hex skin, and addressable backlighting on my own ESP32 firmware. Claude did the CAD, the proofs and the paperwork; I measured, decided, printed and built.

2020 extrusionCadQueryPythonBambu X1CPETG · ABS+ · TPUXIAO ESP32-S3FastLED+3
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. The agent works a parent order in a simulated market; an independently derived oracle defines what optimal is, and every threshold is written down before training starts. Under linear impact it rediscovers the analytic schedule to four decimal places. Under a 0.6-power impact law — where the closed form is no longer solving the right problem — it captures 99.4% of the available difference against a certified optimum. Given an invented 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. The same agent then worked a real order on a live matching engine over a wire, as that venue’s third independent client, with every fill predicted in closed form before anything was sent. Python, PyTorch, single-file PPO, CPU only.

PythonPyTorchPPOReinforcement LearningOptimal ExecutionAlmgren–ChrissMarket Impact+4
SoftwareComplete

Touchstone

A C++20 library that prices European calls and puts three ways — the Black–Scholes–Merton closed form, Monte Carlo and Crank–Nicolson finite differences — and holds the closed form and the grid to QuantLib’s reference values, the Monte Carlo to the closed form, and the three to each other, within tolerances its tests state and assert. The grid also prices the American contract. Every claim in its architecture document is numbered against the test or file that holds it. The library depends on nothing but the C++ standard library, builds as a WebAssembly module, and is released as version 1.0.0. It is one half of a pair: the other half is touchstone.garethcooke.com, a tutorial for developers who work alongside quants, in progress, whose demos are to run on this library.

C++20Options PricingBlack–ScholesMonte CarloFinite DifferencesCrank–NicolsonGreeks+7
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