Sequential Bayesian Regression

Written by proinvestinginvest

March 30, 2026

When the Model Doesn’t Know — That Is the Signal.

Sequential Bayesian Regression reveals where the market is breaking from history — before volatility catches up.

Most risk models measure how much markets moved. This one measures how much the model itself doesn’t know — and that epistemic gap is often the earliest warning signal you have.

 

What Most Risk Tools Miss

Standard volatility measures — rolling standard deviation, VIX, ATR — all answer the same question: how large were recent moves? They are retrospective. They describe what already happened.

There is a different question worth asking: how well does the current market environment fit the model’s expectations based on history? When returns start behaving in ways the model has not seen before, that divergence is information — and it arrives before realized volatility has time to spike.

This is exactly what the Sequential Bayesian Regression system captures through its predictive variance signal Σ*(t).

The Signal: Σ*(t) Decomposed

The model fits a Bayesian linear regression over a rolling 120-day window on each asset’s return series. At every point in time, it asks: given my current beliefs about the parameters β, how uncertain am I about tomorrow’s return?

Σ*(t) = β⁻¹ + x_t’ Σ’ x_t

β⁻¹ → aleatoric noise (irreducible market randomness)
x_t’Σ’x_t → epistemic uncertainty (parameter uncertainty)

Prior: θ ~ N(0, α⁻¹·I) with α = 2
Posterior: Σ’ = (Σ⁻¹ + β·Φ’Φ)⁻¹
μ’ = Σ’·(Σ⁻¹·μ + β·Φ’y)

The first term, β⁻¹, is the floor — irreducible market noise that no model can eliminate. The second term is what matters for regime detection: x_t’Σ’x_t rises when the model’s parameter uncertainty is high — when current returns are inconsistent with recent history. That is epistemic uncertainty. That is the signal.

Regime classification requires no arbitrary thresholds. We use an expanding-window percentile rank of Σ*(t) against its full history, avoiding any look-ahead bias:

Σ*(t) < 33rd pct → BULL (low uncertainty — market behavior fits history)
Σ*(t) > 67th pct → BEAR (high uncertainty — model is struggling)
33rd–67th pct → NEUTRAL

The Full History: Eight Years of Market Uncertainty

The heatmap below shows Σ*(t) across all four assets from 2016 to today. Each row is one asset; each column is one trading day. The colour scale runs from near-black (low uncertainty) through cyan and amber to white-hot red (extreme uncertainty). The red dashed line marks today.

Figure 1. Sequential Bayesian uncertainty heatmap. Rows = assets. Columns = trading days. Colour = Σ*(t) normalised per-asset. Deep blue/black = model is confident; amber/red = model is uncertain. The ◄ NOW marker shows the current reading at the 21st historical percentile — the model is highly confident about market behaviour relative to 8+ years of history.

 

Several stress episodes are immediately visible across all four assets simultaneously. The 2020 COVID crash stands out as a vertical column of red cutting through all rows in unison — a true systemic shock where no asset offered a stable anchor. The 2022 bear market is equally visible: a sustained band of elevated uncertainty concentrated in SPY and TLT as rising rates rewrote the correlation regime between equities and bonds.

The current reading is structurally different. Uncertainty is historically low — the 21st percentile. The model is calibrated. Returns across SPY, GLD, USO, and TLT are behaving in ways consistent with historical patterns. That is not a signal to be complacent; it is context.

Current Risk Snapshot: What the Model Sees Now

The histogram below shows the full distribution of Σ*(t) values across 8+ years of history. The red dashed line marks today’s reading. The current value sits firmly in the lower tail of the distribution — the model has been this certain about market dynamics or more uncertain in roughly 79% of all historical observations.

Figure 2. Distribution of portfolio Σ*(t) across full history. Green shaded region = low-uncertainty zone (below 25th percentile). Red shaded region = high-uncertainty zone (above 75th percentile). The ◄ NOW marker at the 21st percentile confirms the current LOW regime classification. The KDE overlay (cyan) shows the density structure.

Cross-Asset Ranking and 60-Day Divergence

Portfolio-level uncertainty tells the macro story. Asset-level divergence tells the trading story.

The panel below shows two views simultaneously: on the left, the current Σ*(t) ranking across all four assets with their historical percentile and trend direction; on the right, the 60-day evolution of each asset’s uncertainty signal. The divergence between assets during the same macro period is where the cross-sectional signal lives.

Figure 3. Left panel: current Σ*(t) per asset, ranked descending, with historical percentile rank and 10-day trend arrow. Right panel: 60-day Σ*(t) evolution per asset. Assets with rising uncertainty (▲, red) are breaking from historical patterns; falling uncertainty (▼, green) indicates model re-calibration. Cross-sectional divergence between assets is a relative-value signal independent of absolute level.

When two assets diverge in their epistemic uncertainty during the same macro environment, the model is telling you their return-generating processes are decoupling — not just in level, but in structure.

Short-Term View: Last 180 Days

The 180-day window below provides the actionable near-term lens. Unlike the full-history heatmap, this view shows the granular dynamics of each asset over the past six months — how quickly uncertainty is building or releasing, and whether divergences are accelerating or converging.

    Figure 4. Σ*(t) per asset over the last 180 trading days. Fill-under-curve highlights the area above zero. The ◄ NOW marker (red dashed line) anchors the current date. SPY (green) and TLT (cyan) show the tightest uncertainty — consistent with a low-vol, well-calibrated equity and rates environment. USO (orange) exhibits the widest dispersion, reflecting the structural unpredictability of crude oil dynamics relative to recent history.

    Bayesian Convergence: Watching the Model Learn

    The animated chart below makes the mechanics visible. Each frame represents one batch of 10 trading days. The left panel tracks how Σ*(t) evolves as the model processes more data — starting high when the prior is diffuse, converging toward the irreducible noise floor β⁻¹ as the posterior tightens. The right panel shows the joint posterior distribution over θ₀ (intercept) and θ₁ (trend slope), which sharpens into a narrow contour as data accumulates.

    Figure 5. Animated Bayesian convergence for SPY (last 180D). Left: predictive variance Σ*(t) converging toward the irreducible noise floor β⁻¹ (cyan dotted line) as posterior tightens. Right: joint posterior over [θ₀, θ₁] — the contour sharpens and shifts as each batch updates beliefs. The × marker shows the MAP (maximum a posteriori) estimate. Frame rate: 3 fps, 18 batches of 10 days each.

    This convergence visualisation is rarely shown in quantitative finance content — most implementations stop at the output signal and skip the parameter dynamics. The posterior contour is where the information lives. When the contour is wide, the model is uncertain about the drift and level of returns; when it tightens, the market is behaving predictably. The width of the contour is the epistemic uncertainty — and its projection onto the x-axis is Σ*(t).

    Why This Is Different From Rolling Volatility

    THE KEY DISTINCTION

    Rolling volatility measures aleatoric uncertainty — how noisy the market has been. It rises after stress has materialized. It is inherently backward-looking.

    Σ*(t) measures epistemic uncertainty — how uncertain the model is about the parameters governing returns. It rises when returns begin to break from historical patterns, often beforerealized volatility has had time to respond. It is a leading indicator of regime stress, not a lagging confirmation.

    The practical difference: in the 2020 COVID crash, Σ*(t) began elevating in mid-February as daily return patterns started diverging from the 120-day window — approximately two weeks before the VIX crossed 40. That two-week lead time is the difference between hedging into stress and reacting to it.

    THIS WEEK’S SIGNAL

    • Portfolio Σ*(t) sits at the 21st historical percentile — LOW regime. The Bayesian model is highly calibrated. Returns across all four assets are consistent with historical patterns.
    • USO (Oil) carries the highest epistemic uncertainty of the four assets. Its return structure is least well-explained by recent history — this is a cross-sectional signal, not a directional one.
    • SPY and TLT show the lowest uncertainty. The equity-bond correlation regime is currently stable and model-consistent — an important structural context given the 2022 dislocation.
    • LOW regime does not mean low risk. It means low model surprise. Fat-tail events can and do occur during low-Σ* periods — the irreducible noise floor β⁻¹ never reaches zero.
    • Monitor for a sustained breach above the 67th percentile. That crossing — especially if simultaneous across multiple assets — is the Bear regime trigger and the signal to re-examine gross exposure.

    Bottom Line

    Markets do not become dangerous only when they move violently. They become dangerous when they start moving in ways that are inconsistent with the model’s understanding of them. That inconsistency — epistemic uncertainty — is what Σ*(t) measures.

    The current LOW reading means the market is behaving predictably by its own historical standards. That is informative. But the value of this system lies not in the current number — it lies in the architecture that will detect when that number begins to rise, asset by asset, before the broader stress becomes obvious to everyone.

    Regime change is not an event. It is a process. Σ*(t) is the instrument that tracks it in real time.

    Model built in Python (NumPy only, no TensorFlow). Data via yfinance. Full code available on request.

    More articles

    Las tasas reales hablan. El oro escucha.

    Las tasas reales hablan. El oro escucha.

    Esta Semana en Macro Las tasas reales siguen siendo restrictivas. El rendimiento del TIPS a 10 años se mantiene por encima del 1.80%, comprimiendo la ventaja del costo de oportunidad que el oro necesita para ganar impulso sostenido. Los tipos nominales al 4.64%...

    Real Rates Are Talking. Gold Is Listening.

    Real Rates Are Talking. Gold Is Listening.

    Distribution tails are widening — gold's return profile is shifting regime, and the macro backdrop explains exactly why.   This Week in Macro Real rates remain restrictive. The 10-year TIPS yield holds above 1.80%, compressing the opportunity cost advantage gold...

    Por qué los Traders Profesionales Piensan en Probabilidades

    Por qué los Traders Profesionales Piensan en Probabilidades

    Por qué los Traders Profesionales Piensan en Probabilidades El trading discrecional depende de convicción.El trading sistemático depende de calibración estadística. Los inversores cuantitativos rara vez intentan predecir con exactitud la dirección de los mercados. En...

    Stay up to date with the latest news and updates

    Master Portfolio

    You'll have access to monthly investment opportunities, daily market updates, and our investment community.

    Join our newsletter

     

    Join our newsletter

     

    Follow us

    Find information and advice on our social networks