Recession probability models are one of the most practically useful tools in macroeconomic forecasting — they translate noisy economic indicators into a single, interpretable signal: how likely is a recession in the near future? In this case study I walk through how I built a recession probability indicator in R, combining the classic Neftci (1982) sequential probability method with a Bayesian updating framework, FRED macro series, and Blue Chip survey-based forecasts.
The Neftci method is the academic foundation behind the CME FedWatch-style probability tools used across Wall Street. Rather than relying on a single indicator, it sequentially updates the probability of a regime shift (expansion → recession) as new data arrives, based on the likelihood ratio between recession and expansion states.
The model pulls macro series directly from FRED (industrial production, employment, real income, and manufacturing/trade sales — the same four series the NBER dating committee references) and merges them with Blue Chip Financial Forecasts survey data stored in a MariaDB backend. This combination lets the model react not just to hard data but to forward-looking professional forecaster sentiment.
The output feeds into an app.fedprobability table that powers an interactive dashboard, so the probability estimate updates automatically every time new survey or FRED data lands.
The full code is available on GitHub, and a live version of the model is deployed as an interactive app where you can explore the current probability estimate and historical accuracy.