My Regime Classifier Will Be the Last to Know
Suneet Malhotra
May 21, 2026
This week crude oil pushed past $100 a barrel on fears that the Strait of Hormuz could close, and US equities gave back ground on the renewed inflation risk. A clean exogenous shock: a geopolitical headline, a commodity gap, and an equity reaction, all inside one session.
My first instinct was to check what OpenClaw's regime classifier did with it. The honest answer is nothing, because it never saw the headline. It cannot. And once I sat with that, I decided it was not a gap to close. It is a boundary I drew on purpose, and a day like this is the day the boundary becomes visible.
What the classifier actually reads
The regime classifier takes market data and outputs one label: trending up, trending down, range-bound, high-volatility panic, or low-volatility compression. That label gates everything downstream. It decides whether the engine looks for trades at all, and which kind.
Every input to that label is a transformation of price and volume. SMA alignment across the 20, 50, and 200 period averages. RSI on a 14-bar window. MACD. Realized volatility. The VIX. Price structure relative to recent highs and lows. That is the entire input vector. There is no field for an oil future, no field for a wire headline, no field for the word Hormuz.
The classifier does not know what oil is. It knows that SPY printed a lower low and that realized volatility on the last several bars widened. That is all it knows, and all it was built to know.
A price-change detector, not a cause detector
This is the part worth being precise about. The classifier is not a market-event detector. It is a price-change detector. It can only see a shock after the shock has been printed into the tape it watches.
When crude gaps and equities follow, the classifier does eventually move. Volatility widens, the VIX ticks up, and at some point an SMA relationship crosses. The regime flips. But it flips because price moved, not because anything happened in the world. It is reacting to the market's reaction. Structurally, it is the last to know.
You can call that a flaw. The temptation is to bolt on a news feed. I already run an RSS discrepancy scorer elsewhere in the stack, so the wiring is not the hard part.
The hard part is that a classifier which reads headlines has to decide which headlines matter, and that is a far noisier problem than reading price. Most headlines move nothing. Some headlines that should move things do not, because the market already priced them. Price is the one signal that aggregates every participant's reaction to every headline, already weighted by the conviction and capital behind it. A classifier that reads price is reading the market's verdict. A classifier that reads headlines is trying to predict that verdict from the evidence, badly.
Blindness to news is the same property as immunity to fake news. The classifier will not flip on a scary headline the market shrugs off. It pays for that immunity with latency: it reacts late to real signal in exchange for not reacting at all to noise.
The latency is not uniform
It would be easy to stop there, but the lag is not one number. The inputs respond at different speeds, and that matters.
SMA20 on 15-minute bars needs twenty bars, roughly five trading hours, before it fully reflects a new price level. SMA50 and SMA200 are slower still. Those are the slow lanes. RSI and MACD respond within a few bars. The fast lane is realized volatility and the VIX, which can move within minutes of a sharp print.
So on a Hormuz-type day the classifier does not flip all at once. The volatility inputs move first. That is exactly why high-volatility panic exists as its own label, separate from the trend labels. The panic regime is the part of the classifier designed to be fast. The trend-based part is designed to be slow, because trend is a slow thing, and reacting fast to it just means reacting to noise.
The most likely sequence on a real shock day, given how the inputs are wired, is that the volatility lane pulls the regime toward panic within an hour or two, and the trend lane confirms or reverts over the following day. The classifier is not uniformly slow. It is fast where speed is cheap and slow where speed is expensive.
What I do about it, and what I do not
I do not add a news input to the regime classifier. I have talked myself out of it twice now, for the reasons above.
What I do instead is stop asking the classifier to be the thing that protects me on a shock day. That is not its job. Its job is to name the regime. The job of not trading into a shock belongs to the risk gates, and the gates do not wait for a label. High-volatility panic gates new entries hard once it is recognized, and the bias-score threshold refuses marginal trades regardless of regime. The classifier can be late to name the shock as long as the gates are early to stand down.
So the question I actually ask after a day like this is not whether the classifier flipped fast enough. It is whether the gates stood down while the classifier was still working it out. A slow classifier with fast gates is a fine system. A fast classifier with slow gates is not.
Where your boundary is
Every systematic strategy has an input boundary. Mine is price and volume, and nothing else. That boundary has a cost, and the cost is exactly visible on a day when a shock crosses it from outside, the way an oil headline did this week.
The mistake is not having a boundary. You cannot read everything, and a model that tries to is a model that mostly reads noise. The mistake is not knowing where your boundary is, and discovering its location on the day a shock walks across it. I know where mine is. It ran past $100 a barrel this week, and my classifier will read about it, in price, right on schedule.
Share this post
You Might Also Like
The Check That Passes Until the Day It Does Not
Every day my engine reconciles its own record of open positions against the broker's. Almost every day the two lists match. I do not run the check for those days.
OpenClaw TutorialsThe Three-Percent Daily Stop That Freezes at $3,000
My engine has two daily loss limits: three percent of equity and a flat $3,000. They are the same number on exactly one day, the day the account opened. After that they quietly diverge.
Quantitative TradingA Retry Is Not a Trading Decision
A rejected order is a decision. Retrying it without preserving the reason can turn a risk control into a duplicate trade.
Agentic AIThe Log Is Part of the Agent's Interface
An agent that can act but cannot leave a useful decision record is not autonomous. It is an opaque process with write access.
Latest Blog Posts
A Retry Is Not a Trading Decision
A rejected order is a decision. Retrying it without preserving the reason can turn a risk control into a duplicate trade.
The Log Is Part of the Agent's Interface
An agent that can act but cannot leave a useful decision record is not autonomous. It is an opaque process with write access.
The Market Is Closed Is Not a Trading Rule
A backtest can know the exchange hours and still schedule a trade into a holiday, an early close, or a stale session. Calendar state is market data.
Related Tools & Demos
The QA Field Manual to Language Models
A free 24-chapter book. Start at “what is AI, really?” and finish with a small language model you built yourself — one that reads a failing Playwright test and proposes a fix you can run. Read it in your browser, or download the PDF or the Mac app.
View Source Code →Multi-Model LLM Harness
One interface to call any AI model — capability routing, fallback chains, budgets, circuit breakers, and a quality feedback loop. A practical architecture pattern write-up.
Automated Trading System
Multi-engine trading platform with real-time risk management, regime-based strategy selection, and automated order execution.
View Source Code →
Stay in the Loop
Get weekly insights on AI-driven QA, engineering leadership, and automation strategies.
No spam, ever. Unsubscribe anytime.