Quant Memo
Advanced

Approximate Bayesian Computation

A way to do Bayesian inference when the likelihood function is too complicated to write down or evaluate, by instead simulating data from candidate parameters and keeping only the ones whose simulated output looks close to the real data.

Ordinary Bayesian inference needs a likelihood function — a formula for how probable the observed data is, given a candidate set of parameters — which you combine with a prior belief to get a posterior. But for many realistic models (a complex market microstructure simulator, an agent-based model of trader behavior, a biological population model), the likelihood is mathematically intractable: the model is easy to simulate from but has no clean formula describing the probability of any given outcome. Approximate Bayesian Computation (ABC) sidesteps the missing likelihood entirely by working only with simulation.

The method works by repeatedly drawing a candidate parameter value from the prior, simulating a full dataset from the model using that parameter, and comparing the simulated dataset to the real observed data using some summary statistic and a distance measure. Candidate parameters whose simulated data lands close enough to the real data (within a chosen tolerance) are kept as approximate posterior draws; those whose simulated output looks too different are discarded. Repeating this many times builds up an approximate posterior distribution over the parameter, without ever writing down a likelihood formula.

The core tradeoff is the tolerance: a very tight tolerance (accepting only near-perfect matches) gives a more accurate approximation to the true posterior but rejects almost every candidate, requiring enormous numbers of simulations; a loose tolerance accepts more candidates and runs faster but blurs the posterior, since parameters that produce only roughly similar data get lumped in with parameters that produce a near-exact match.

Approximate Bayesian Computation replaces an intractable likelihood with repeated simulation: draw a parameter from the prior, simulate data, keep the parameter only if the simulated data is close enough to the real data, and the resulting kept draws approximate the true Bayesian posterior — with tolerance controlling the tradeoff between approximation accuracy and how many simulations are needed.

Practice in interviews

Further reading

  • Beaumont, 'Approximate Bayesian Computation in Evolution and Ecology', Annual Review of Ecology, 2010
ShareTwitterLinkedIn