Unraveling Economic Trends Using Statistical Models
How Bayesian VARs can transform Monetary Policy Analysis
In an economy's complex and ever-evolving landscape, discerning the impact of monetary policies amid fluctuations such as high inflation rates and robust economic expansion presents a significant challenge. This task, however, is crucial for policymakers aiming to steer the economy toward stability and growth.
Enter Bayesian Vector Autoregressions (BVARs)1, a powerful statistical tool that helps economists and researchers dissect and predict economic dynamics. BVARs build on the traditional Vector Autoregression (VAR) model by incorporating Bayesian statistical methods, allowing for the incorporation of prior information into the analysis. This can help enhance the model's precision, especially when data is limited or highly volatile.
In this blog post, we will delve into the technical mechanics of BVARs, explaining how they work and are set up parametrically. We will also explore some practical applications to demonstrate how BVARs can provide insights into the relationship among economic variables where it is unclear what drives what. By the end of this article, we hope the readers will understand why BVARs can be vital for economic forecasting and make complex economic trends more accessible and comprehensible.
Figure 1: What could a futuristic industrial shop look like? Here's an image generated with the assistance of ChatGPT
Dissecting The Model: The Framework and Intuition Behind BVARs
Basic Formulation
A Vector Autoregression (VAR) model is a system of equations that captures the dynamic interrelationships among multiple time series. For instance, it can model how current inflation rates depend not only on past inflation rates but also on past interest rates and GDP growth. A VAR model involving these three variables might look something like this:
Each equation explains one variable as a linear function of past values of itself and past values of the other variables. The coefficients measure the influence of each variable's lagged values on the current value of the dependent variable, while the error terms capture any random shocks.
The intuition behind VAR models is that economic variables are often interrelated and influence each other over time. Instead of treating variables in isolation, a VAR model considers the mutual feedback between them. For instance, an increase in interest rates might lead to lower GDP growth, which in turn could affect inflation rates. By incorporating these relationships, VAR models provide a more comprehensive and realistic framework for understanding and forecasting economic dynamics.
Bayesian Augmentation
Bayesian VARs (BVARs) enhance this structure by utilizing Bayes' theorem, allowing the model to incorporate prior beliefs about the economy's behavior.
Let collect all of the parameters of the model that we want to estimate, and let Y denote the available data that we use for the estimation of these parameters. Then, Bayes' rule is simply represented as:
On the LHS of the equation above, there is the posterior distribution. A posterior distribution fully characterizes the knowledge about the parameters of the model having observed the data.
On the RHS of the equation above, in the numerator, we have a joint distribution of the data and the parameters that are factored into a product of the conditional distribution of the data given the parameters (or what is referred to as the likelihood function), and the marginal distribution of parameters.
But Why Choose Bayesian VARs Over Traditional VARs?
Bayesian VARs incorporate prior distributions, which capture pre-data uncertainty about the parameters. These priors can be derived from historical data, economic theory, or expert judgment. This integration of prior knowledge helps in grounding the model in realistic assumptions and informed insights.
The Bayesian framework allows for constant updating of parameter estimates as new data become available. This dynamic and continuous process ensures that the model remains relevant and accurate over time, adapting to changes in the economic environment.
Bayesian VARs operate within a probabilistic framework, allowing for an outright quantification of uncertainty. This approach provides a comprehensive understanding of the range of possible outcomes and their associated probabilities, which is crucial for informed decision-making.
The Bayesian approach modifies the estimation of the VAR model by calculating the posterior distribution of the coefficients, which combines the likelihood of the observed data (given the coefficients) with the prior distribution of the coefficients2:
This posterior distribution is then used for inference and forecasting, providing a richer and more nuanced understanding of the potential paths the economy could take.
Figure 2: Here's an illustrative figure demonstrating how the Bayesian approach can modify the estimation of the VAR model by calculating the posterior distribution of the coefficients, combining the likelihood of the observed data with the prior distribution of the coefficient. Image was generated by the author using Python.
Estimation Process
The estimation process for BVARs typically involves the following steps:
Specify Priors
Priors play a crucial role in BVARs by incorporating additional information into the estimation process. These priors can be derived from various sources:
Historical Data
Economic Theory
Expert Judgment
One approach for the specification involves choosing the prior from a family of distributions which are known for their simplicity and analytical tractability. The choice, if strategic, can allow for quicker and more efficient derivation of the posterior distribution. By simplifying the prior, we can streamline the computational process, making the estimation faster without compromising the integrity of the model.
A bit of terminology before we proceed:
When we talk about priors and posteriors in Bayesian statistics, the concept of a conjugate prior often comes into play. A conjugate prior is a specific type of prior distribution that, when combined with a given likelihood function, results in a posterior distribution that shares the same functional form as the prior. This property greatly simplifies the process of updating beliefs in light of new data/evidence.
Moreover, if the conjugate prior belongs to the same distribution family as the likelihood function, it is referred to as a natural conjugate prior.
We wish to choose a prior (for this section) which is conjugate to the likelihood. For a BVAR model, let 𝑌 be the matrix of observed data, 𝑋 be the matrix of lagged values (regressors), and β be the matrix of coefficients we wish to estimate. The Normal-Wishart prior assumes3:
Figure 3: The scatter plot on the left shows samples of the mean vector from the simulated Normal-Wishart prior, illustrating our initial beliefs about the central tendency of the variables in our BVAR model. The histograms on the right display the samples of the covariance matrix elements reflecting our prior uncertainty about the relationships between variables. Simulations were done by the author using Python’s scipy library.
Formulate the Likelihood
The likelihood function represents the probability of the observed data given the parameters of the model. It plays a crucial role in combining the observed data with the prior distribution to obtain the posterior distribution of the parameters.
To exemplify, below is the likelihood function of a d-dimensional Multivariate Normal Distribution:
Imagine you have a collection of variables, like height, weight, and age, that you believe are normally distributed and related to each other. The multivariate normal distribution is a mathematical way to describe the behavior of these variables together. For this distribution, two pieces of information are key: mean and covariance. The likelihood function is a tool that helps us understand how well our chosen mean and covariance matrix explain the actual data we have collected.
Essentially, when we have a sample of n observations from a d-dimensional multivariate normal distribution, the likelihood function is the joint probability of observing the entire sample given the parameters. We assume the observations are independent and identically distributed (i.i.d.) and, hence, the likelihood function is the product of the individual PDFs of the observations. The figure below shows a 3d plot of the multivariate normal distribution (generated by the author using Python).
Figure 4: 3D plot of the multivariate normal distribution. Z-axis shows the probability densities. Image generated by Author using Python.
Compute the Posterior Distribution
The posterior distribution of the parameters is computed using Bayes' theorem. Think of it like mixing ingredients in a recipe: the likelihood function (how well our model explains the observed data) and the prior distribution (our initial guess about the parameters before seeing the data) are combined. This mix creates the core flavor of the posterior distribution, which tells4 us what we believe about the parameters after considering both the data and our initial guesses.
In this section, we've selected a specific prior, and the process of deriving the posterior is quite complex. To keep things concise and accessible, we won't dive into the detailed derivations here. Instead, we'll provide the formulaic definition of the posterior.
If you're interested in a deeper exploration of the derivation steps, we're more than happy to discuss them in a follow-up post (comment below and let us know!).
Use Markov Chain Monte Carlo (MCMC) Methods
When discussing BVARs, we often encounter complex posterior distributions that are difficult to solve analytically. This is where Markov Chain Monte Carlo (MCMC) techniques come into play. Let’s break down what MCMC is and how it helps in the context of BVARs.
What is MCMC?
Markov Chain Monte Carlo is a class of algorithms used to sample from probability distributions when direct sampling is challenging. These techniques allow us to approximate the posterior distribution of model parameters by generating a sequence of samples that represent the distribution. Intuitively, a Markov chain is a random process where the system's behavior at any given time depends solely on its behavior in the previous period. The system moves between states according to specific transition probabilities.
Why MCMC for BVARs?
In BVAR models, we want to estimate the posterior distribution of the parameters given the data and priors. Due to the high dimensionality and complexity of these models, the posterior distribution often doesn't have a closed-form solution. MCMC helps us to:
Sample from the Posterior: By generating samples from the posterior distribution, we can make inferences about the parameters.
Estimate Parameters: We can use these samples to estimate the summary statistics such as the mean, variance, and other statistical properties of the unknown parameters.
How Does MCMC Work?
Here’s a simplified explanation of how MCMC methods work:
Start with a Random Guess: Begin with an initial guess for the parameters.
Generate a Markov Chain: Create a sequence (chain) of samples where each sample depends only on the previous one. This dependency ensures that the chain explores the parameter space effectively.
Use Transition Rules: Apply rules (like Metropolis-Hastings or Gibbs sampling) to decide whether to accept or reject new samples based on how well they fit the data.
Converge to the Posterior: After many iterations, the distribution of the samples approximates the true posterior distribution.
Applications: Investigating the Impact of Monetary Policy using BVARs
BVARs are particularly well-suited for examining the questions posed about an economy in the context of any ongoing monetary policy adjustments.
Figure 5: This image, which depicts a non-existing central bank building, was generated using DALL-E, an AI image generation tool by OpenAI
Here's how BVARs can shed light on some issues:
Effectiveness of Monetary Policy: By incorporating data on monetary policy actions, inflation rates, GDP growth, and other relevant variables into a BVAR model, analysts can assess how changes in policy rates have historically influenced economic activity and prices. This can help determine whether current policy settings are likely ineffective or if their impacts are yet to fully materialize.
Policy Lags: Monetary policy is widely recognized to act with long and variable lags. BVAR models, with their ability to capture dynamic interdependencies and incorporate various lags, are ideally positioned to quantify these lags. By analyzing the time it takes for policy changes to affect economic indicators, researchers can better understand the delayed effects of monetary tightening or easing.
Forecasting and Scenario Analysis: BVARs enable policymakers and economists to run scenario analyses and make forecasts under different policy settings. By adjusting the inputs to reflect alternative monetary policy paths, one can explore a range of outcomes for the economy. This can be invaluable for central banks and government agencies in planning future policy moves.
Fitting a Simple BVAR Model on GDP, FDTR, and CPI data for the US economy
Here are the variables we include in the fit5:
Raw Data is plotted below:
Figure 6: Raw data for the variables included in the BVAR model fit. Graphs generated by Author using Python
Quarterly % changes are computed for the variables above before the model is fit. Date range for model fitting: Jan 1, 2000 to March 31, 2024. We create lagged variables (1) for the VAR model and we drop any rows with missing values caused by the lagging process. We then define the priors for the coefficients (beta) and the covariance matrix (sigma). Finally, we plot histograms of the generated coefficients. This visual representation helps us understand the distribution and variability of the coefficients estimated by the BVAR model.
Figure 7: To better understand the relationships between our variables (CPI, GDP, and FDTR), we generated histograms of the coefficients estimated by our Bayesian Vector Autoregression (BVAR) model. Each histogram represents the distribution of a specific coefficient across 1,000 MCMC samples. Image generated by Author using Python.
We can also compute the one-step-ahead forecasts of GDP:
Figure 8: Histogram of one-step ahead forecasts of GDP across 1,000 MCMC samples. Image generated by Author using Python.
Conclusion
Bayesian VARs offer a sophisticated lens through which to examine complex economic dynamics, merging economic theory, statistical rigor, and practical insights. By leveraging BVARs, researchers and policymakers can navigate the intricacies of the economic landscape with greater confidence, ensuring that monetary policies are both informed and impactful. Whether assessing the current state of the economy or planning for future challenges, BVARs stand as a critical tool in the economist's toolkit, illuminating the path ahead with clarity and precision.
Appendix
Books:
Hamilton, J. D. (1994). Time Series Analysis. Princeton University Press.
Journal Articles:
Sims, C. A., & Zha, T. Bayesian Methods for Dynamic Multivariate Models.
Working Papers and Reports:
Bayesian Vector Autoregressions by Tomasz Wozniak: https://fbe.unimelb.edu.au/__data/assets/pdf_file/0010/1942966/2021TomaszWozniakBVARs.pdf
A Bayesian VAR Model Perspective on the Lagged Effect of Monetary Policy: https://libertystreeteconomics.newyorkfed.org/2023/11/a-bayesian-var-model-perspective-on-the-lagged-effect-of-monetary-policy/
Disclaimer
General Information Only: The content provided in this article is for informational & educational purposes only and is not professional advice or advice of any other kind. The information is provided on an as-is basis without any warranties, representations, or guarantees of any kind.
Not Financial Advice: This article is not intended to provide, and should not be relied on for, financial advice. You should always consult with a financial advisor or other professional to ensure that any information and material provided herein is appropriate for your individual circumstances.
Personal Opinions: The views and opinions (if any) expressed in this article are those of the author and do not necessarily reflect the official policy, position, views, or opinions of any other agency, organization, or company. The author provides all content personally, and the information herein represents their own perspective and may not be factual or current.
No Liability: The author, platform, or any associated entities or individuals are not liable for any losses, injuries, or damages from the display or use of this information.
Errors, Omissions, and Changes: While every effort is made to ensure the accuracy of the information shared in this article, the document may inadvertently contain inaccuracies or errors, or information that is subject to change without notice.
Third-Party Links: This article may contain links to external websites that are not provided or maintained by or in any way affiliated with the author. Please note that the author does not guarantee the accuracy, relevance, timeliness, or completeness of any information on these external websites.
Updates and Changes: This disclaimer may be updated at any time, with or without notice. It's the responsibility of readers and subscribers to review this disclaimer periodically to stay informed.
Use of ChatGPT: Some content and information in this article may have been assisted by ChatGPT, an AI language model developed by OpenAI. While efforts have been made to ensure accuracy and relevance, AI-generated content should be independently verified for accuracy and appropriateness.
Professional Advice: For advice tailored to your specific situation, please consult a qualified professional. This article does not replace the need for such professional advice.
https://en.wikipedia.org/wiki/Bayesian_vector_autoregression
https://en.wikipedia.org/wiki/Posterior_probability
https://www.imf.org/en/Publications/WP/Issues/2016/12/30/Bayesian-Vars-A-Survey-of-the-Recent-Literature-with-An-Application-to-the-European-Monetary-16440
https://www.imf.org/en/Publications/WP/Issues/2016/12/30/Bayesian-Vars-A-Survey-of-the-Recent-Literature-with-An-Application-to-the-European-Monetary-16440
All data was sourced from the FRED Website
U.S. Bureau of Economic Analysis, Real Gross Domestic Product [GDPC1], retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/GDPC1, May 31, 2024
Board of Governors of the Federal Reserve System (US), Federal Funds Effective Rate [FEDFUNDS], retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/FEDFUNDS, May 31, 2024
U.S. Bureau of Labor Statistics, Consumer Price Index for All Urban Consumers: All Items in U.S. City Average [CPIAUCSL], retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/CPIAUCSL, May 31, 2024