Indexing the archive…
Your Universe of Digital Possibilities
A market hides in plain sight. Each day’s return is drawn from a regime — calm, neutral, or storm — but the regime itself carries no label: only the price, jittering, is observed. Hand a hidden Markov model the rules that generated the series — the per-regime drift and volatility, and a sticky transition matrix — and two recursions recover the hidden truth. Forward–backward, in log space, gives the posterior probability of each regime at each instant; Viterbi traces the single most-likely path of states through the whole series. The same machinery that decodes speech, genes, and handwriting here paints the bull and bear regimes back under the price.
A hidden chain of states you never see — transitions a — each state emitting an observation x through its own distribution b. Three things define it: the start π, the transition matrix, the emissions. Everything else is inference.
Sweep forward accumulating α (the evidence up to t) and backward accumulating β (the evidence after it); their product, normalized, is the probability of each hidden state at every step — the soft regime bands painted under the price.
Replace the forward sum with a max and keep a back-pointer: δ carries the score of the best path reaching each state, and the trace-back yields the single most-likely sequence of regimes — one global decode, not a string of per-step guesses.
When the transitions and emissions are unknown, Expectation–Maximization re-estimates them from the very posteriors forward–backward computes, alternating until they stop moving. The chain learns its own parameters — the unsupervised cousin of The Lens’s given model.
The Regime is the discrete-state twin of The Lens (INST·25): where the Kalman filter carries a Gaussian belief over a continuous hidden position, the HMM carries a categorical belief over a finite set of hidden regimes — and Viterbi is the max-product cousin of the forward pass, returning the single best path rather than a marginal at each step. Like The Lens, it decodes against a known model and never learns it (that would be Baum–Welch, the EM loop named in the spec sheet). It shares with The Oracle (forecasting) the act of extrapolating a latent state forward, and with The Shadow the recovery of hidden structure from a single time-series. Its transition matrix is a Markov chain — the same object The Rankiterates to a stationary distribution — only here the chain’s states are never observed, and the whole instrument is the art of inferring them from their noisy emissions alone.