Sequential Monte Carlo and Particle Filters
A method for tracking a hidden, evolving state from noisy observations over time by maintaining a swarm of weighted guesses that gets reweighted by new evidence and periodically resampled to keep the swarm alive where it matters.
Prerequisites: Markov Chains, The Law of Large Numbers
A model for volatility, a hidden regime, or an interest-rate factor is often a state that isn't directly observed — only noisy signals related to it are. If the model is linear and the noise is Gaussian, the Kalman filter tracks that hidden state exactly and cheaply. Real financial state-space models are usually neither linear nor Gaussian, and the Kalman filter's clean formulas break down. Sequential Monte Carlo, better known as the particle filter, tracks the hidden state anyway, using not one estimate but a whole swarm of candidate guesses that gets pruned and refreshed as new data arrives.
An analogy: a search party with shifting confidence
Imagine a search party looking for a lost hiker along a trail, starting with searchers spread out evenly since nobody knows where the hiker is. Each searcher represents a guess. When a clue comes in — a footprint, a sighting — searchers near that clue become more "confident" (get more weight) and searchers far from it become less confident, without anyone physically moving yet. Once confidence gets too lopsided (a few searchers holding almost all the credibility, the rest useless), the party regroups: it disbands the low-confidence searchers and redeploys fresh searchers near the high-confidence ones, ready for the next clue. That regroup step is resampling, and the whole cycle — spread, reweight by evidence, resample — is exactly sequential Monte Carlo.
The method, one symbol at a time
Maintain a set of particles, , each a candidate value for the hidden state at time , with an associated weight summing to 1 across particles. At each new observation : (1) propagate each particle forward through the model's dynamics to get a candidate for ; (2) reweight each particle by the likelihood of the new observation given that particle's state, — particles that would have made the observation likely get heavier; (3) resample — draw a new set of particles, with replacement, choosing each existing particle with probability proportional to its weight, then reset all weights equal. The weighted particle swarm at each step approximates the true posterior distribution of the hidden state given all data seen so far, and that approximation gets better as grows.
Worked example 1: one reweighting step by hand
Suppose 5 particles represent guesses for a hidden state: , all starting with equal weight . A new observation arrives and, based on the model's noise assumption, the likelihood of seeing that observation given each state is . Unnormalized new weights: , , , , . Sum . Normalized weights: . The particle at now carries 40% of the total belief, up from a flat 20%, because it best explains the new observation.
Worked example 2: resampling from those weights
Using the weights above , lay out cumulative bins: , , , , (this is inverse transform sampling applied to the particle weights). Five uniform draws land in bins giving the new particle set — the low-weight particles at and mostly vanish, while is duplicated, concentrating the swarm's computational effort where the evidence says the state most likely is.
Picture each sampled path above as one particle's trajectory through time; a particle filter runs many such paths in parallel and continuously culls the ones that stop matching incoming data.
What this means in practice
Particle filters are used to track latent volatility, filter noisy signals in nonlinear state-space models, and estimate parameters online in models too irregular for a Kalman filter. Their accuracy depends heavily on particle count and how well the propagation step covers the region the true state is likely to move into next; too few particles or a badly-tuned propagation step causes particle degeneracy, where all the weight collapses onto one or two particles and the swarm stops usefully representing uncertainty.
A particle filter tracks a hidden, evolving state by maintaining a weighted swarm of candidate guesses that gets reweighted by how well each guess explains new data, then resampled to concentrate particles where the evidence points — approximating the true posterior distribution of the state at each point in time.
The classic failure mode is particle degeneracy: after several reweighting steps without resampling, almost all the weight can concentrate on a single particle, so the "swarm" of thousands of particles is effectively representing the state with just one. This isn't visible from the particle count alone — you have to check the effective sample size (roughly ) or the weight distribution directly, and resample often enough to prevent it, or the filter silently degrades into tracking a single, possibly wrong, trajectory rather than a genuine distribution of belief.
Related concepts
Practice in interviews
Further reading
- Doucet, de Freitas & Gordon, Sequential Monte Carlo Methods in Practice
- Gordon, Salmond & Smith, Novel Approach to Nonlinear/Non-Gaussian Bayesian State Estimation