A Multivariable Approach to Forecasting the Federal Funds Rate : A STATA Tutorial on Vector Autoregression (VAR)


This post will not focus on the history of economic theory with respects to money, but I do have to lay a framework for the exigency and significance of such monetary research and theory.  The effectiveness of monetary policy, the Federal Reserve Bank’s influence on bank lending, is a topic widely researched among financial economist.  The macroeconomic effects of monetary policy have spawned vigorous debates among economists for over a century. During the Great Depression the great economist John M. Keynes successfully attacked the Quantity Theory of Money and proposed a fiscal stimulus to revived the economy. The Quantity Theory was revived in the 1970’s by a brilliant Nobel Prize winning economist by the name of Milton Friedman.  Friedman made some accommodating modifications to the old theory that gained traction in the inflationary environment of those times.  In the current economic slump that the U.S. is in, this policy has come to the forefront of public discussions on the state of the economy.

The main objective of this post is to develop a  vector autoregressive model of the U.S. macroeconomy.   The output from the Vector Autoregressions will be used to construct a model used to forecast U.S. the Federal Funds Rate.  In a latter post the Impulse Response Functions will be generated based on special restrictions to the model I will estimate here.  This later post  will shed further light on the how the monetary and real variables are connected in the macroeconomy.   The statistical analysis of the macroeconomy will be done on STATA a popular statistical package that can handle the complex calculations.


The Federal Reserve Bank of St. Louis’s FRED Database located at http://research.stlouisfed.org/fred2/.  Monthly data for the following variables were collected from 1985 to 2005 and stored in an Excel file that was imported into STATA.

Federal Funds Rate-The overnight  interest rate for interbank loans and it is also the rate at which banks lend to the federal reserve.  The Federal Funds Rate is the policy variable that is controlled by the Fed via open market bond purchases and sales.

Nominal Interest Rate-This is the market interest rate in the economy that the Fed tries to influence via the Federal Funds Rate.  There are many different interest rates in the economy but typically economist a three-month treasury bill’s rate as the ‘nominal interest rate’

Exchange Rate- A trade weighted exchange rate of U.S. dollars in foreign currency.

Industrial Production – An index of the industrial production of the U.S. that is published by the Federal Reserve.


Stata thinks about monthly data in numeric terms with a base year of 1960m1 which corresponds to the number zero.  A new series was created that started at 300 and ends at 351, this was declared as the monthly time variable.

tsset statadate,monthly

The next step is to estimate the Vector Autoregressive Model (VAR) with 3 lagged endogenous variables STATA by using the following command:

var ip  interest_rate  ff_rate  exchange_rate,lag(1/3)

The following output should materialize on the screen for STATA:

Note: The term L1 refers to the first lag a variable and that the subsections above are separated by the variable in bold above.  For example the last table above is the VAR for the US exchange rate where the independent variables are the current and past values of industrial production, interest rate, federal funds rate, and the exchange rate.

Creating A Vector Autoregressive Model to Forecast the Federal Funds Rate

As an example of how the output above can be interpreted we can create a model to forecast the Federal Funds Rate based on the the current and past values of the exchange rate, interest rate, federal funds rate and industrial production.  Using only the statistically significant values for the exchange rate equation we can create the following model.

The model suggest that in order to forecast the federal funds rate you can use a weighted average of the last two months of industrial production, market interest rates and last months exchange rate and federal funds rate.  This is not to say that this is the optimal model or lag length, but given the restriction for 3 lags it is representative.  Placing the parameter values into the model above we get the value with all the weights included and ready for estimation:

The model above fits the data fairly well as illustrated by this graph:

The absolute value of the error in the forecast  is represented in the graph below:

It seems as if the model that is fitted to the data overestimated the actual FF rate in the 1980’s, was fairly accurate during the mid-1990’s and underestimated how the FF rate was going to be during the early and mid-200’s.  It is important to realize that these kind of retrospective analysis can be misleading since the objective of regression is to fit the best line to the data.  The accuracy of the model is best understood when looking at how the Federal Funds rate performed after 2005 and what the model estimated above would have predicted.   The analysis of the accuracy of this model in predicting future FF rate changes will be examined and reported at the end of this post as a way of critically examining the VAR model estimated above.  Finally, an Impulse Response Function will be generated to get a deeper understanding of the interconnections between all these macroeconomic variables.