~/glyn.dev

Software engineer, learning in the open.

I'm a software engineer sharing the tools I build and the experiments I'm working through, methods included.

Projects

Selected work

All projects

This site: a data-driven personal platform (portfolio, blog, and research hub) built with Next.js 16, Supabase, and shadcn/ui, where every page updates without a redeploy.

Next.jsTypeScriptSupabaseTailwind CSSshadcn/uiMDXVercel

Draw a graph, write a traversal in real Python (networkx included), and watch every step animate with play, pause, and scrub. A ground-up rewrite of my 2021 prototype into a full product with accounts, saved graphs, and multi-file Python projects.

Next.jsReactTypeScriptPythonPyodidePixi.jsSupabaseVercel

Blog

Latest writing

All posts

Mirroring the SDLC

Everyone had written off our legacy KDB batch workflow as non-automatable. The stack was never the problem. I gave an LLM the same lifecycle I use as a developer, one tool per SDLC stage, and the loop closed.

Research

Recent research

All papers
· 21 downloads

Optimal Mean-Reversion Pairs Trading in Cryptocurrency Markets: A Limits-of-Arbitrage Study

We implement the Leung-Li optimal double-stopping framework for Ornstein-Uhlenbeck spreads and apply it to all 4,950 pairs of the top-100 USD-quoted symbols on Kraken spot at one-minute resolution (Dec 2024 - Dec 2025; 38,241 simulated round trips). To make the framework computable at scale we start from the classical representation of the fundamental solutions F and G as parabolic cylinder functions and derive log-derivative ratio forms that cancel an exp(beta^2/4) overflow factor, enabling vectorized root-finding for the optimal entry and exit levels. The empirical result is a sharp negative: mean reversion is real (gross $2,414; net +$1,896 at the 2 bps design fee, 81% win rate) but the gross edge is an illiquidity premium, rising monotonically from -$4 among liquid majors to +$1,823 in the illiquid tail (75.5% of the total), exactly where spreads, borrow, and ~$14k capacity make it unharvestable. At the realistically attainable 0.24% taker fee every liquidity bucket is negative and the book loses $1,496. Four salvage attempts (cheaper venue, cross-exchange basis, ML meta-labeling, cost-aware bands) all fail; the ML filter posts a deflated Sharpe of exactly zero. We document three methodological errors that disguised the result and read the finding through Shleifer-Vishny limits of arbitrage: the inefficiency persists because harvesting it costs more than it pays.

quantstatarbcryptomean-reversionoptimal-stopping
PDF

Search glyn.dev

Search posts, research, projects and tags, or jump to a page.