DeskTested

Trading tools, tested on a real desk.

Updated Aug 23, 2026Desk NotesClaims verified ✓Anthony M.

Market Regime Detection: How Our Desk Classifies Bull, Bear, and Sideways

Market regime detection in plain terms: the two rules our desk runs on SPY and QQQ, what happens when they disagree, and what neither can tell you.

Market regime detection is the practice of sorting price history into a small number of named states — usually bull, bear, or sideways — so that every other decision can be filtered through the state the market is actually in. This desk runs two rules side by side: a deterministic moving-average-and-volatility test, and a three-state Markov model that infers the state from the return distribution itself.

That is the whole method. It is deliberately small, its trend tests can be recomputed by anyone holding the same daily closes, and it is written down here so that a classification recorded in our desk log can be checked rather than trusted.

What a regime read is — and what it is not

A regime label is a description of where price has been relative to its own history. It is not a forecast. When this desk writes “SPY classifies as Bull,” the claim being made is narrow: on the most recent close, price sat above its 200-day average and the 50-day average sat above the 200-day. Nothing in that statement says where the next 20 sessions go.

The distinction matters because regime labels are easy to over-read. A trend classification is a summary statistic with a lag built in, and it will be wrong at exactly the moments it would be most valuable — the turns. What it does reliably is stop a chart from being read in isolation: a breakout means something different in a market whose longer averages are stacked upward than in one where they are not.

The default rule: three computed inputs

All three inputs come from the same source. For the most recent read, that was two years of daily closing prices — 501 bars — pulled from Yahoo Finance via yfinance and computed in code rather than read off a chart.

Price versus the 200-day simple moving average

The 200-day SMA is the average of the last 200 closes. Price above it means the current close is higher than the average price paid over roughly the last ten months; below it means the reverse. We record the gap as a percentage rather than a yes/no, because an asset sitting 0.3% above its 200-day line and one sitting 9% above it are in materially different situations even though both technically pass the test.

The 50-day average versus the 200-day average

This compares a shorter trend to a longer one. When the 50-day average is above the 200-day, the recent ten weeks of pricing have been stronger than the ten-month baseline, and the two averages are stacked in the order associated with an uptrend. The reason to include it alongside the first test is that price is noisy and a single close can sit above a long average on a one-day move; an average-versus-average comparison cannot.

Twenty-day realized volatility against its own one-year median

Realized volatility here is an annualized standard deviation of daily returns measured over a 20-session window. On its own the number means very little — 13% is calm for one asset and stormy for another — so it is always compared against the trailing one-year median of that same measure for that same asset. The output is a ratio, and our operating protocol records the resulting state as elevated or normal.

Two things about this input need stating exactly, because they mark the edge of what our own record supports. First, the ratio is always published next to the word, so the number is the part to read: a 1.05x elevated and a 1.26x elevated carry the same label and describe very different weeks. Second — a gap, not a feature — our desk log does not yet state the numeric cut between the two labels, nor the return convention and annualization factor behind the volatility figure itself. Until it does, this is the least reproducible of the three inputs, and naming that beats asserting a threshold a reader cannot check.

The input is kept separate from the trend classification on purpose — volatility state and trend direction are different questions, and collapsing them into one label hides more than it reveals.

The classification rule

The trend rule is mechanical:

  • Bull — price above the 200-day SMA and the 50-day SMA above the 200-day SMA.
  • Bear — price below the 200-day SMA and the 50-day SMA below the 200-day SMA.
  • Sideways — anything else, meaning the two tests disagree.

The volatility ratio is then attached as a separate note. A market can be in a bull classification and an elevated-volatility state at the same time, and saying so is more useful than forcing one word to carry both facts.

A worked example: the read from 2026-W34

The following is what the default rule produced on 2026-08-23 using closes through 2026-08-21, recorded in the week-34 desk log.

SPY QQQ
Close (2026-08-21) 765.72 713.44
200-day SMA 707.54 652.78
50-day SMA 751.75 713.44
Price vs 200-day +8.22% +9.29%
50-day vs 200-day +6.25% +9.29%
20-day realized vol (annualized) 13.15% 22.32%
1-year median of that vol 12.54% 17.73%
Vol state elevated (1.05x) elevated (1.26x)
Classification Bull Bull

Both tickers passed both trend tests, so both classified as Bull. The volatility column is where the two diverge: SPY’s 20-day reading sat just barely above its own one-year median, while the Nasdaq-100 proxy was running at 1.26 times its median. Same trend label, same volatility label, meaningfully different day-to-day behavior — which is precisely why the ratio is published and not just the word.

One artifact from that same run is worth showing because it is the kind of thing a mechanical method will hand you: QQQ’s close of 713.44 and its 50-day average of 713.4416 round to the same figure — at full precision the close sat about 0.16 cents below the average. That is a rounding coincidence, not a signal. The desk checked the underlying series and found 60 distinct closes in the last 60 bars, confirming it was not a stale-data artifact. A method that generates numbers automatically also generates occasional numbers that look meaningful and are not, and the discipline is to check them rather than narrate them — the same rule that governs a trading journal entry.

When a second method disagrees

Rule-based moving-average classification is not the only approach. Regime-switching statistical models — hidden Markov models and their discrete cousins — infer states from the return distribution itself rather than from fixed price thresholds. For the week-34 pass the desk ran a three-state Markov chain as the primary method and kept the SMA rule as a cross-check. The Markov run fit ten years of daily closes (2,513 rows, 2016-08-23 to 2026-08-21), labelling each 20-day window by whether its return cleared ±5%.

The two methods returned different labels. The Markov model put both SPY and QQQ in Sideways as of the 2026-08-21 close. The SMA rule called both Bull. Both were run on the same closes, and neither is broken.

The disagreement is definitional rather than contradictory, and that is the useful part. The SMA rule asks where price sits relative to its own long averages; both ETFs were comfortably above their 200-day lines, which is that rule’s definition of Bull. The Markov model asks a different question — did the trailing 20-day window move more than ±5%? Most windows do not, and its long-run state mix reflects that: 79.0% Sideways for SPY, 63.9% for QQQ. A slow grind higher registers as Sideways under one definition and Bull under the other.

The Markov run also reported how sticky those states are, which the SMA rule cannot tell you at all: 93.09% odds that SPY was still Sideways at the next step, 89.07% for QQQ. Its directional tilt — bull probability minus bear probability — came out at +0.026 for SPY and +0.038 for QQQ, which on that model’s own −1 to +1 scale is very close to neutral.

That reading came with a walk-forward check worth reporting precisely because it is unflattering. Over 2,240 simulated trades the labelling produced a Sharpe of 0.27 on SPY and 0.28 on QQQ, alongside maximum drawdowns of −33.9% and −43.7%. Those figures describe how the labelling behaved on historical data. They are not achievable returns and say nothing about what comes next — what they establish is the point of this page: a regime model is a context filter, not a trading system.

Where these methods are weak

Three limitations are worth stating plainly.

They lag. Moving averages are backward-looking by construction, and a 20-day return window is too. Neither flags a regime change until enough closes have accumulated to move it, so the label changes after the fact.

Threshold rules whipsaw. When price oscillates around the 200-day line, the SMA classification can flip between Bull and Sideways repeatedly without anything meaningful having changed — which is why the percentage gap is recorded alongside the label.

The label depends entirely on the definition. Week 34 is the plain demonstration: two defensible methods, same data, different words. Anyone reporting a regime without publishing the rule behind it is reporting an opinion.

Why we publish the method before the reads

A regime read is only checkable if the rule that produced it is public, which is the same commitment behind our tool-trial protocol. Publishing the inputs, thresholds, and data source means the classification we post can be recomputed from the same closes and either confirmed or contradicted — and it also makes visible the places where we are not there yet. The two trend tests reconcile today: the closes, the averages, and the percentage gaps are all stated, so the Bull/Bear/Sideways label follows arithmetically. The volatility ratio does not yet meet that standard, because the convention behind the underlying figure has not been published with it. That is ours to close, and saying so here is cheaper than a reader finding it. The label is not the deliverable; the auditability is.

None of the above is a recommendation to buy or sell anything, and a regime classification is not a prediction of future prices. It is a description of the past, kept deliberately simple so that its errors are visible instead of buried.

Frequently asked questions

What does “market regime” mean?

A regime is a named state of the market — most commonly bull, bear, or sideways — summarizing prevailing trend and volatility conditions over a period. Frameworks define the boundaries differently, so the label only has meaning alongside the rule that produced it.

Does a bull classification mean prices will keep rising?

No. The classification states that price is above its long-term average and that the shorter average is above the longer one. Both statements describe history. Neither implies anything about subsequent returns.

Which method should be trusted when two regime models disagree?

Neither, in the sense of picking a winner. A disagreement between a price-threshold rule and a return-distribution model is itself information — typically a slow drift that clears one test and not the other. Read both labels next to their definitions rather than collapsing them into one word.

How often should a regime read be run?

The inputs move slowly by design, so daily recomputation on averages this long mostly produces noise. What matters more than cadence is logging the date of the closes used, so any read can be reproduced against the exact series behind it.