Quant techniques · Bayesian filtering

Particle filters for stochastic volatility

In a stochastic-volatility model, volatility is a hidden state that evolves over time, while returns are noisy observations of it. A particle filter represents uncertainty about that state with a weighted collection of simulated paths. This works when nonlinear dynamics or non-Gaussian observations make a single Gaussian summary too restrictive.

Particle Monte Carlo error

Relative noise scale

Idealized 1/√N scaling; degeneracy and resampling can change the effective sample size.

A latent-volatility model

Let xtx_t be log variance and rtr_t a demeaned return. A common state-space specification is

xt=μ+ϕ(xt−1−μ)+σηηt,rt=exp⁡(xt/2)ϵt,x_t=\mu+\phi(x_{t-1}-\mu)+\sigma_\eta\eta_t,\qquad r_t=\exp(x_t/2)\epsilon_t,

where ηt\eta_t and ϵt\epsilon_t are standard normal innovations. Usually ∣ϕ∣<1|\phi|<1 so log variance is mean reverting. Conditional on xtx_t, the return is Gaussian with variance exte^{x_t}; marginally, uncertainty about xtx_t creates heavier tails than a single normal distribution.

The filtering target is the posterior distribution p(xt∣r1:t)p(x_t\mid r_{1:t}). It carries more information than a point estimate: quantiles and the shape of the state distribution can matter for risk forecasts, especially after an outlier.

Sequential Monte Carlo update

Represent the previous filtered distribution with particles xt−1(i)x_{t-1}^{(i)} and normalized weights wt−1(i)w_{t-1}^{(i)}, for i=1,…,Ni=1,\dots,N. In the bootstrap filter:

  1. Propagate: draw xt(i)x_t^{(i)} from the state transition conditional on xt−1(i)x_{t-1}^{(i)}.
  2. Weight: multiply the prior particle weight by the observation likelihood. For the Gaussian return model,
w~t(i)=wt−1(i) p(rt∣xt(i))=wt−1(i)12πext(i)exp⁡ ⁣(−rt22ext(i)).\widetilde w_t^{(i)}=w_{t-1}^{(i)}\,p(r_t\mid x_t^{(i)}) =w_{t-1}^{(i)}\frac{1}{\sqrt{2\pi e^{x_t^{(i)}}}} \exp\!\left(-\frac{r_t^2}{2e^{x_t^{(i)}}}\right).
  1. Normalize: set wt(i)=w~t(i)/∑jw~t(j)w_t^{(i)}=\widetilde w_t^{(i)}/\sum_j\widetilde w_t^{(j)}.
  2. Resample when needed: draw a new equally weighted particle set according to wt(i)w_t^{(i)}, preserving high-weight particles and dropping low-weight ones.

A filtered mean is x^t=∑iwt(i)xt(i)\widehat x_t=\sum_iw_t^{(i)}x_t^{(i)}. The full weighted sample also approximates posterior probabilities and quantiles. The one-step predictive return distribution is a mixture over particles, rather than a plug-in normal at x^t\widehat x_t.

Effective sample size and a numerical reading

A standard degeneracy diagnostic is the effective sample size,

ESSt=1∑i(wt(i))2.ESS_t=\frac{1}{\sum_i (w_t^{(i)})^2}.

It ranges from 1 (one particle carries almost all weight) to NN (equal weights). If 1,000 particles have equal weights, ESS is 1,000. If one particle has weight 0.9 and the remaining 999 share 0.1, ESS is about 1.23. An implementation can resample when ESS falls below a chosen fraction of NN, for example N/2N/2, rather than resampling at every time step.

Resampling reduces weight concentration but creates duplicate particles. Repeated resampling can remove diversity in the state paths, so monitor both ESS and the spread of the particle cloud. Systematic or stratified resampling often reduces extra Monte Carlo variation relative to drawing every index independently.

What the filter can and cannot do

The bootstrap filter is a general filtering algorithm, not a guarantee of good approximation with a small particle count. If the observation is surprising under nearly all propagated particles, all weights can collapse. Better proposals that use the current observation, more particles, or specialized filters can help. Log weights and log-sum-exp normalization are important numerically when likelihoods are tiny.

Filtering estimates the current latent state conditional on observations through time tt. Smoothing estimates past states using later observations; it is a different target. Likewise, unknown parameters such as ϕ\phi and ση\sigma_\eta are not automatically learned by the basic state filter. They need an outer estimation procedure, such as likelihood optimization using particle estimates or a Bayesian method designed to handle parameter uncertainty.

A leverage effect can be included by correlating ηt\eta_t and ϵt\epsilon_t. Heavy-tailed return innovations, jumps, or realized-volatility measurements can also be incorporated through a changed observation likelihood. The observation model is a substantive assumption: a misspecified likelihood can make a numerically stable filter confidently wrong.

Filtering is online inference

At each timestamp, the filter uses the new observation and the state transition to update its current distribution. It does not look ahead. Avoid using future returns to construct features or parameters in a historical backtest unless the method is explicitly a smoothing procedure.

Show answer

A filter has 500 particles with normalized weights. What is the largest possible ESS, and what does a low ESS tell you? Why can resampling improve the next update while still reducing path diversity?

Further reading

  • Gordon, Salmond, and Smith, “Novel approach to nonlinear/non-Gaussian Bayesian state estimation,” the original bootstrap filter paper, PDF.