Skip to content
Subconscious

A Regime-Aware Risk Model: What to Validate Before You Trust the Probability

On this page

A single distribution can obscure changing return behavior. A regime-aware model is one possible representation, with probabilities conditional on its assumed states and transition process. A risk team needs predictive and decision evidence before using those probabilities to change an allocation.

Why does one distribution misprice risk?

Consider a baseline that fits one constant mean vector and covariance matrix to a long return history. If the history combines calm and stress periods with different means, volatility and cross-asset dependence, that pooled fit can miss the conditional risk in either period. Time-varying volatility and covariance models are other possible approaches; a regime model is one representation to compare against them.

A regime-switching model replaces that single distribution with one distribution per regime, plus a transition matrix that governs how the market moves between them. Instead of assigning a single label, the model outputs how likely the market is to be in each regime at a given point in time. This framework traces to Hamilton's original Markov-switching model for business-cycle analysis (Hamilton, "Regime-Switching Models," UC San Diego).

What is a Bayesian Hidden Markov Model?

A Bayesian Hidden Markov Model (HMM) with two latent states, growth and stress, treats returns as conditionally Normal given the active regime, with a first-order Markov chain governing transitions between regimes. Fitting it means sampling the joint posterior over the transition matrix, regime means, and regime covariances given observed returns.

The discrete regime sequence itself is analytically marginalized via the forward algorithm, because the sampler used here, the No-U-Turn Sampler, requires a continuous, differentiable parameter space and cannot sample discrete states directly (PyMC NUTS documentation). After fitting, a forward-filter backward-sampler pass recovers the latent regime sequence as smoothed posterior probabilities, the model's best retrospective read on which regime was active.

Validating the model before trusting its output

The PyMC Labs Bayesian equity-regime demonstration generates three synthetic equity series from a two-state process. It reports 94% retrospective state agreement and generating parameters within posterior intervals in that simulation. This is a parameter/state-recovery illustration. Uncertainty near transitions and one set of covered parameters do not establish calibration; the demonstration notes that posterior predictive checks were not performed.

Repeated simulation calibration can test posterior coverage under the model, while posterior predictive checks assess adequacy for observed data. A matched business validation study also needs its own treatment, outcome, and agreement criteria.

What does the demonstration not show?

The synthetic-data result shows the modeling machinery recovers a known answer, not real-market performance. Several assumptions built into this version of the model matter to anyone considering it for live risk management:

Real markets are also non-stationary in ways synthetic data by construction is not: regimes, correlations, and the rules that govern transitions between them can all shift in the underlying process itself.

Four assumptions: Normal emissions, constant transitions, two prespecified states, and an in-sample allocation illustration.
Synthetic recovery checks the illustrated process; live adequacy and decision performance remain untested.

Evaluate probabilities available at the decision time

Real markets rarely provide gold-standard latent regime labels. Evaluate predictive return distributions with temporal holdouts and walk-forward allocation utility using filtered probabilities available at each date. Retrospective smoothed probabilities use future observations and create lookahead if used as a trading signal. Include costs, repeated estimation, and uncertainty. A study protocol should name these boundaries; discuss the intended decision.

Validation path: repeated synthetic recovery, posterior predictive checks, temporal prediction, filtered walk-forward allocation, and costs plus uncertainty.
A retrospective state match does not establish real-time allocation performance.