← Blog

Regime detection in illiquid frontier markets.

Why volatility-clustering regime models break in thin markets, and a Hidden Markov Model approach that holds up across NGX, NSE, and BVMW.


Draft. This post collects working notes from regime-detection work on three frontier exchanges. We’ll publish the formal version of this as Paper 001 once peer review wraps. Reach out at info@theelixirslab.com if you’d like an early read.

The problem

Most regime-detection literature assumes the market gives you enough trades to compute meaningful volatility. In G10 equities, that assumption is so taken-for-granted that it doesn’t even appear in the methodology section. In a frontier market like the Nigerian Exchange (NGX), some securities trade fewer than five times a day. The realised-volatility series you compute from that doesn’t measure regime — it measures whether anyone bothered to show up.

We see two common failure modes when teams import G10 regime models into thin markets:

  1. The “everything is volatile” failure. A single 2% move on Tuesday in a stock that didn’t trade Wednesday or Thursday produces a volatility spike that lasts the rest of the week. The model thinks we entered a high-vol regime; actually, we just have sparse data.
  2. The “everything is calm” failure. When the same stock doesn’t trade for three days running, realised vol drops to zero and the model declares a low-vol regime. The market has done nothing of the kind — it has merely been silent.

Both failures share the same root: the volatility series is contaminated by the market’s liquidity state, and standard models conflate the two.

What we tried first

The obvious fixes don’t work, and it’s worth saying which ones we tried so we don’t have to keep relitigating them.

  • Resampling to weekly bars. Smooths the noise but loses the regime — a weekly bar that captures both a sell-off and a recovery looks identical to a quiet week.
  • Forward-filling stale prices. Mathematically equivalent to assuming the security keeps its last printed price between trades. Produces zero variance during quiet stretches and an artificial gap when trading resumes.
  • Trade-time clocks instead of calendar time. A real fix in some markets, but on NGX the trade arrival rate is itself regime-dependent — when the market panics, more trades happen. We replaced one bias with another.

The approach we settled on

A two-state Hidden Markov Model with liquidity-conditioned emissions. Concretely:

  • The hidden state is the regime (calm / stressed).
  • The observable is a tuple of (return, log trade count, log time since last trade).
  • Emissions are Gaussian on returns conditional on the liquidity covariates.
  • Transition probabilities are estimated separately for liquid days and illiquid days.

The key insight is that the information content of a price move depends on how much trading produced it. A 1% move on a day with 2,000 trades is real; the same 1% on a day with three trades is roughly noise. Our emission model accounts for that.

What changed when we ran it

Across NGX, NSE (Nairobi), and BVMW (Mozambique), three things changed:

  1. Regime persistence stabilised. The naive model flipped state every 4–6 days on average; ours holds for 2–3 weeks, which matches what discretionary traders in those markets describe.
  2. Crisis lead time improved. On three of the four episodes in our 2018–2024 backtest, the model entered the stressed state 2–4 days before headline volatility spiked. The liquidity covariates picked up the regime change before the price covariate did.
  3. Sharpe of a simple regime-conditioned position-sizing rule went from 0.6 to 1.1. Not magic; not a strategy. Just evidence that the regime signal is real.

Caveats

This approach has worked on three African exchanges. We do not claim it generalises to every illiquid market. We are particularly uncertain about:

  • Markets with regulatory circuit breakers that artificially gap returns.
  • Single-stock applications versus index-level applications (we tested both; the index case is much cleaner).
  • Whether the trained transition probabilities transfer across exchanges or need to be re-fit per market.

Next

We’re working on the formal write-up with full backtest details, code, and ablations. If you operate in a frontier or emerging market and you’ve been frustrated by off-the-shelf regime models, we’d like to hear what you’ve tried — drop a line.

— Segun