Market regime investing: use HMM detection to rotate between value and momentum

The same stock strategy performs differently in bull, range, and bear regimes. StoQuant detects the current regime daily and adjusts Q-Score weights and portfolio allocation automatically.

Why regime matters

A strategy that works in a bull market can fail in a bear market. Value stocks outperform in recovery phases; momentum stocks outperform in trending bull markets; quality and low-volatility names outperform in high-volatility regimes. Ignoring regime is one of the most common causes of strategy decay. StoQuant uses a Hidden Markov Model (HMM) on S&P 500 log-returns to classify the current market state daily and feed that state into both scoring and allocation.

How it works

  1. Estimate regime probabilities — The HMM fits a state-switching model to S&P 500 log-returns and selects the number of states by Bayesian Information Criterion (BIC). Typical states include bull, range, and bear/high-volatility.
  2. Adjust Q-Score dimension weights — Each Q-Score dimension has different predictive power in each regime. In bull markets momentum gets more weight; in bear markets quality and insider buying get more weight.
  3. Map regime to Black-Litterman uncertainty — Regime confidence feeds into the uncertainty-of-views matrix (Omega). In ambiguous regimes, the optimizer trusts the market equilibrium more and the ML views less.
  4. Rebalance with evidence — The result is a portfolio allocation that shifts exposure based on the current regime without requiring you to time the market manually.

From signal to allocation

Regime detection is not just a dashboard decoration at StoQuant. It changes the math. When the HMM assigns high probability to a bear/high-volatility state, the Q-Score reduces valuation weight (cheap stocks can get cheaper), increases quality and insider weight, and the Black-Litterman optimizer shrinks active positions toward the market portfolio. When the model detects a bull state, momentum and growth weights rise and the optimizer allows more concentrated active bets.

Related on StoQuant

Read the Hidden Markov Model guide (stoquant.com/learn/hidden-markov-model-stocks), explore the Portfolio Optimizer (stoquant.com/portfolio-optimizer), and check today’s market regime at /analytics/macro.

FAQ

What is market regime investing?

Market regime investing means adjusting your strategy based on the current market state — bull, bear, range, or high-volatility — rather than using the same static approach in all conditions.

How does StoQuant detect regimes?

StoQuant uses a Hidden Markov Model on S&P 500 log-returns with BIC-selected states. Both log-likelihood and state probabilities are persisted daily.

Does regime detection improve returns?

Regime-aware weighting can reduce drawdowns and improve risk-adjusted returns by avoiding value traps in bear markets and underweighting momentum in sideways chop. See /proof for out-of-sample metrics.

Can I see the current regime?

Yes. The macro analytics page at /analytics/macro shows the current HMM-classified regime and related macro indicators.

Is regime detection free?

The current regime and basic macro dashboard are available on the free tier. Advanced regime history and portfolio integration are part of Pro/Power.