Can a Hidden Markov Model Find Trading Regimes?

A Hidden Markov Model assumes the market is always in one of a few states you cannot see directly. I fitted one to order-flow data to look for states that lasted long enough to trade. Given one input it called direction correctly 50% of the time, the base rate. Given several inputs, the states it found were separated by how much the price was moving and not by which way it was moving, and the small directional signal in the raw input did not survive. This post covers what the model does, how to run inference without using future data, and what the added complexity cost.

June 29, 2026 · 9 min

Testing Whether Order Flow Can Predict Price

I implemented a 2010 order-flow paper on four years of tick data and reproduced its headline result: one number explains about two-thirds of contemporaneous price movement, an R² of 67%. I then tested six strategies for trading that signal. All of them were negative after the bid-ask spread, across four years of data.

June 28, 2026 · 9 min

FIFA World Cup Result Predictor

I built a soccer Elo model, published it as an in-browser predictor, and spent most of the project testing whether it could beat the bookmaker’s closing line. It does not. Over 4,099 club bets the closing line value was −3.4% with the entire confidence interval below zero, which measures how efficient these markets are.

June 26, 2026 · 4 min

Two Dozen Trading Strategies That Didn't Work

Twenty-five Pine strategy files and dozens of indicators. Most measured a real pattern, but none of the patterns held across a different test window, a realistic cost assumption, or a check on which trades produced the return. Cataloged by failure mode rather than by indicator.

June 14, 2026 · 5 min

Building a Pocket-Sized Trading Desk

I run an algo bot 24/7 but I’m not always at my desk, so I built a pocket-sized thin client to watch the market and step into trades from anywhere — an 8-inch mini-laptop running Lubuntu and Tailscale.

June 13, 2026 · 2 min