This package implements the Sequential Monte Carlo (SMC) sampling algorithm, an alternative to Metropolis Hastings Markov Chain Monte Carlo sampling for approximating posterior distributions. The SMC algorithm implemented here is based upon Edward Herbst and Frank Schorfheide’s paper “ Sequential Monte Carlo Sampling for DSGE Models” and the code accompanying their book, Bayesian Estimation of DSGE Models. More information and the original MATLAB scripts from which this code was derived can be found at Frank Schorfheide’s website.

This implementation features what we term generalized tempering for “online” estimation, as outlined in our recent paper, “ Online Estimation of DSGE Models.” For a broad overview of the algorithm, one may refer to the following Liberty Street Economics article.

Comments and suggestions are welcome, and best submitted as either an issue or a pull request. ☝️

Installation and Versioning

SMC.jl is a registered Julia package in the General registry, compatible with v1.x. To install it, open your Julia REPL, type ] to enter the package manager, and run

pkg> add SMC


The package requires our auxiliary package, ModelConstructors.jl, which contains useful data structures for creating custom models (e.g. Parameter, State, Observable, Setting types).

For examples of how to set up a model in the form SMC can estimate, see scripts in the examples/ folder.

William Chen
William Chen
Ph.D. Student in Economics

I am a Ph.D. student in Economics at MIT. I am also a former Senior Research Analyst of the DSGE Team at the Federal Reserve Bank of New York. My research interests include macroeconomics, finance, and computational macroeconomics. Within these fields, I am particularly interested in business cycle theory, financial crises, and macro-labor. My pronouns are he/him.