Programming

Much of modern macroeconomic analysis involves an element of computation. From forecasting macroeconomic data to simulating DSGE models, macroeconomists are increasingly embracing computers as an integral part of conducting analyisis. Below you will find links to various sources of information regarding some commonly used programming languages in economics.

Mathematica

  • Kevin D. Salyer (UC Davis) posted this Introduction to Mathematica  guidebook for one of his economics courses. The document walks new users through many basics such as organizing and manipulating lists, solving systems of equations, differentiation and integration, and a nice section on creating graphics.

Comparing Programming Languages

With so many different languages to choose from, it can be intimidating for a new economist to begin paying the fixed cost of learning one. It would be very difficult to compare all languages across all the dimensions which factor into one’s decision to specialize in a particular program, but there have been recent attempts to quantify differences in performance across programs:

  • Macro Group has conducted a computing challenge in which graduate students wrote code to solve an identical problem in multiple languages. Read more about the preliminary results here.
  • Aruoba and Fernandez-Villaverde (2014) solve a neoclassical stochastic growth model using value function iteration and grid search, a standard macroeconomic exercise, in multiple languages. The coding is intended to represent the “Average economist” and thus the code is not optimized for the peculiarities of each language. A link to the most current version can be found here.