MORPHIQLABS
Quant Research4 min read

Wavelet-Domain Regime Detection with the MODWT

Markets change character at different speeds. The MODWT splits a return series into scale components whose variances add up exactly — which turns a vague question about regimes into an estimable one.

By MorphIQ Labs · Quant research

"The market changed" is the kind of statement that is obviously true and almost useless. Changed how fast? Changed in the minute-scale chop, or in the multi-day trend? A single rolling volatility number cannot tell you, because it sums all of those timescales into one figure and throws the decomposition away.

The maximal-overlap discrete wavelet transform (MODWT) keeps the decomposition. This post is about why that decomposition is the right coordinate system for regime detection, and how MorphIQ Labs uses it.

Why not just the DWT

The ordinary discrete wavelet transform decimates: each scale has half the samples of the one below it. That is efficient, but for time-series analysis it has two costs we are not willing to pay — the transform is not shift-invariant (sliding the window by one bar reshuffles the coefficients), and the coefficients are not aligned in time with the events that produced them.

The MODWT drops the decimation. Every scale keeps the full sample count NN. You give up orthogonality and the O(N)O(N) flop count of the DWT for an O(NlogN)O(N\log N) transform that is shift-invariant and time-aligned. For research on a return series — where we constantly slide windows and want a coefficient at time tt to mean something at time tt — that is the right trade.

The decomposition

Let XtX_t be a return series. The MODWT to level JJ produces, at each scale j=1,,Jj = 1, \dots, J, a vector of wavelet coefficients W~j,t\widetilde{W}_{j,t} capturing variation at physical scale τj=2j1\tau_j = 2^{j-1}, plus one vector of scaling coefficients V~J,t\widetilde{V}_{J,t} holding everything slower than τJ\tau_J.

The property that makes this worth doing is an exact additive decomposition of the sample variance. With no approximation,

σ^X2  =  j=1Jν^X2(τj)  +  ν^V2\hat{\sigma}_X^2 \;=\; \sum_{j=1}^{J} \hat{\nu}_X^2(\tau_j) \;+\; \hat{\nu}_V^2

where the wavelet variance at scale τj\tau_j is

ν^X2(τj)  =  1NjtW~j,t2\hat{\nu}_X^2(\tau_j) \;=\; \frac{1}{N_j}\sum_{t} \widetilde{W}_{j,t}^{\,2}

Total risk is partitioned, scale by scale, with the pieces summing back to the whole. That is the sentence that does the work: a regime is no longer a vague mood, it is a shape of the vector (ν^X2(τ1),,ν^X2(τJ))\bigl(\hat\nu_X^2(\tau_1), \dots, \hat\nu_X^2(\tau_J)\bigr).

Regimes as energy ratios

Define the energy share at scale jj over a rolling window:

πj,t  =  ν^X2(τj)i=1Jν^X2(τi)\pi_{j,t} \;=\; \frac{\hat{\nu}_X^2(\tau_j)}{\sum_{i=1}^{J}\hat{\nu}_X^2(\tau_i)}

The vector πt=(π1,t,,πJ,t)\boldsymbol{\pi}_t = (\pi_{1,t}, \dots, \pi_{J,t}) lives on the simplex and is scale-of-volatility invariant — multiply every return by a constant and πt\boldsymbol{\pi}_t does not move. It describes the texture of the market, not its loudness. Two readings tend to matter:

  • High-frequency-dominated — energy concentrated in τ1,τ2\tau_1, \tau_2. The fast scales are loud relative to the slow ones: choppy, mean-reverting, microstructure-heavy tape. Short-horizon signals are favored; trend-following bleeds.
  • Low-frequency-dominated — energy concentrated in τJ1,τJ\tau_{J-1}, \tau_J. A persistent, directional regime where slow scales carry the variance. Trend signals have room; fast mean-reversion is fighting the drift.

A scalar that compresses this is the high-to-low energy ratio

Rt  =  jjν^X2(τj)j>jν^X2(τj)R_t \;=\; \frac{\sum_{j \le j^\star}\hat{\nu}_X^2(\tau_j)} {\sum_{j > j^\star}\hat{\nu}_X^2(\tau_j)}

with the split scale jj^\star chosen for the instrument's bar size. Crossings of logRt\log R_t through a hysteresis band give discrete regime labels without the flip-flopping a single threshold produces.

Putting an error bar on it

A regime label with no confidence interval is a guess wearing a lab coat. The wavelet variance has tractable sampling theory: for a Gaussian process the estimator is approximately

ν^X2(τj)    Normal ⁣(νX2(τj),  2AjNj)\hat{\nu}_X^2(\tau_j) \;\overset{\cdot}{\sim}\; \text{Normal}\!\left(\nu_X^2(\tau_j),\; \frac{2\,A_j}{N_j}\right)

where AjA_j is an integral of the squared spectral density over the scale's octave band. In practice we estimate the variance of the estimator directly, either from the autocovariance of the squared wavelet coefficients or by a block bootstrap over W~j,t\widetilde{W}_{j,t}, and propagate it into a confidence band on πt\boldsymbol{\pi}_t.

Practical notes

A few things that matter once this leaves the notebook:

  • Filter choice. The Daubechies least-asymmetric LA(8) filter is the default — long enough for clean scale separation, short enough that boundary contamination stays contained.
  • Boundary coefficients. Some MODWT coefficients near each end depend on circular wrapping. They are excluded from the variance sums; NjN_j counts only interior coefficients. Pretending otherwise quietly biases the most recent — and most decision-relevant — estimates.
  • Determinism. The whole transform is a fixed sequence of FIR convolutions. Given the same returns it returns the same coefficients bit-for-bit, which is what lets the regime label sit inside the Anvil event log and replay exactly.

Where this goes

Energy shares are a descriptive statistic. The open work is the dynamics: model πt\boldsymbol{\pi}_t as a hidden-state process so the system anticipates a regime turn rather than confirming it after the fact. A Dirichlet state-space model on the simplex is the current candidate. That, and the link between wavelet scales and the volatility-surface term structure from the Ferro risk work, are the next two write-ups.

More from Quant Research

July 6, 2026 · 1 min

Options Spread Analytics Should Be a Workflow, Not a Table

Most options tools start with a table. Rows of contracts, columns of Greeks, filters, probabilities, and implied volatility fields. The table is useful, but it is not a decision process. A trader still has to assemble…