Computational economics
Computational economics uses computers to solve, simulate, and estimate economic models. Many realistic models, such as a household planning its saving under an uncertain future, have no exact formula for their answer. Economists turn such models into step-by-step procedures (algorithms) and run them to get approximate answers.
The field sits where Economics meets computational science, and it builds on mathematical economics. Its methods come from numerical analysis, simulations of many interacting software agents, and machine learning applied to economic data.
Why economists compute
Economic theory describes choices and markets with equations. When the equations have a closed-form solution, meaning an exact formula, results can be read off directly. Many models with realistic features have no such formula and must be solved numerically.[1]
The QuantEcon lectures show this with a "cake-eating" problem, in which a person decides how much of a fixed cake to eat now and how much to save for later. The basic version has an exact formula, but once the problem is modified, numerical methods become needed.[2]
The basic version is still useful. Because its exact answer is known, it serves as a test of how accurate a numerical method is.[2]
Kenneth Judd argued in 1997 that the study of a theory need not be limited to proving theorems. Computers, he argued, create new ways to analyze theories.[3]
His 1998 textbook Numerical Methods in Economics brought techniques from numerical analysis and applied mathematics to economists.[4] Its topics include:[4]
- linear and nonlinear equations;
- optimization, finding the best choice within given limits;
- approximation of functions;
- numerical integration, estimating the value of an integral by calculation;
- Monte Carlo methods, which estimate a result by repeated random sampling;
- numerical dynamic programming, solving choices made over time by working backward;
- perturbation methods, which build approximations from a simpler nearby case, and projection methods, which fit a solution over a whole range of possible states.
Main strands
Computational economics is a set of related approaches rather than one method. Central banks, finance ministries, and the European Commission use such tools to study monetary policy, taxes, and trade.[5][6][7] The table lists the main strands, each covered in a later section.
| Strand | What the computer does | Example |
|---|---|---|
| Equilibrium computation | Finds prices at which all markets clear | Computable general equilibrium models of tax and trade policy[7] |
| Dynamic programming | Finds the best plan for choices made over time | Saving and consumption decisions[8] |
| Solving macroeconomic models | Approximates the decision rules of a whole model economy | Business cycle models used at central banks[9] |
| Agent-based simulation | Runs many interacting software agents forward in time | The Santa Fe artificial stock market[10] |
| Simulation-based estimation | Fits a model to data when the model must itself be solved or simulated | Rust's model of bus engine replacement[1] |
| Microsimulation | Applies tax and benefit rules to records of real households | EUROMOD in the European Union[6] |
| Machine learning and text | Predicts, classifies, and measures from large data sets, or from data such as text that is not arranged in a table | A policy uncertainty index built from newspaper articles[11] |
| Economics and computation | Studies algorithms for markets and games, and their limits | The difficulty of computing a Nash equilibrium[12] |
Computing equilibrium
General equilibrium and fixed points
An economy-wide equilibrium is a set of prices at which supply equals demand in every market.[7]
General equilibrium theory studies such equilibria. Computing them can be framed as finding a fixed point, a point that a function maps back to itself.[13]
Herbert Scarf had used the Brouwer fixed-point theorem in an existence proof. At first he thought the approach too abstract ever to yield a step-by-step algorithm.[14]
In 1967 Scarf announced a method that approximates fixed points by simplicial subdivision. It breaks the space of possible prices into many small simplices (the higher-dimensional version of triangles).[13]
The method became the basis of his 1973 book The Computation of Economic Equilibria, written with Terje Hansen, which launched applied general equilibrium analysis.[13]
In the 1970s Scarf's students John Shoven and John Whalley led a wave of such models in major journals.[7]
Computable general equilibrium models
A computable general equilibrium (CGE) model is a numerical model of a whole economy, split into industries, in which each type of agent behaves by a stated rule.[7] In a typical CGE model:[7]
- households maximize utility (their satisfaction) within their budgets;
- industries choose inputs to minimize costs;
- prices adjust until demand equals supply in markets for goods and for inputs such as labor and capital.
This explicit agent behavior is what separates CGE models from Leontief's earlier input-output system, which tracks how each industry's output serves as input to other industries.[7]
The Norwegian economist Leif Johansen built what is considered the first CGE model, published in 1960.[7] He wrote it as a linear system of 86 equations in 132 variables, expressed in changes and percentage changes. He solved it by matrix inversion, a standard way to solve a system of linear equations.[7]
Johansen's linear form had a cost. It ignores how the model's responses shift as variables move away from their starting values, so the answer was only approximate.[7] From the late 1960s, repeated correction methods such as Newton's method (which uses the slopes of the equations to improve an approximate answer step by step) were used to reach accurate solutions.[7]
CGE models now address many policy questions, including:[7]
- trade and taxation;
- the environment and resources;
- labor markets and immigration;
- income distribution.
One network of CGE modelers, GTAP, alone includes 7,500 users in 150 countries, according to a 2010 account.[7]
Dynamic choices and dynamic programming
Many economic decisions unfold over time, such as saving, investing, or replacing a machine. Dynamic programming is the standard tool for them.[15] Richard Bellman gave the name to this recursive method, which solves a problem by repeatedly solving smaller versions of it, working backward.[15]
The Bellman equation
The cake-eating problem shows the idea. A person with cake of size eats today and keeps for tomorrow, and future enjoyment counts for less than enjoyment today.[8] The best total enjoyment from a cake of size satisfies the Bellman equation:[8]
- is the state variable, the cake left at the start of the period.
- is the control variable, the amount eaten now.
- is the utility, or enjoyment, from eating .
- is the discount factor, with , so a later unit of utility is worth less than one today.
- is the value function, the best total discounted utility possible from cake .
With the utility function , where and , the best rule has an exact form: eat the fraction of the remaining cake each period.[8] Small changes to the problem remove this exact form, which is why the numerical method below matters.[2]
Value function iteration
Value function iteration finds by repeatedly applying the right side of the Bellman equation to a guess. A computer cannot store a function at infinitely many points, so it works on a grid. It fills in between grid points by interpolation, which estimates values between known grid points.[2]
- Choose a grid of cake sizes and an initial guess for at each point, such as .[2]
- Build a function over all cake sizes by piecewise linear interpolation between the grid values.[2]
- At each grid point, choose to maximize the right side of the Bellman equation, and record the new value.[2]
- Stop if the new values are close enough to the old ones; otherwise return to step 2.[2]
In QuantEcon's stochastic optimal growth model, theory guarantees that these repeated updates get closer and closer to the true value function from any bounded, continuous starting guess.[16]
Accuracy improves with a finer grid or a tighter stopping rule, at the cost of longer run times.[2]
Faster alternatives iterate on a guess of the decision rule itself. The decision rule bends less than the value function, so it is easier to interpolate.[2]
The curse of dimensionality
The main obstacle in dynamic programming is what Bellman called the curse of dimensionality: the computer power needed grows exponentially as a problem gains more state and control variables.[15] A grid makes this concrete. With 10 points for each state variable, the number of grid points grows as follows.
| State variables | Grid points |
|---|---|
| 1 | 10 |
| 2 | |
| 3 | |
| 6 |
John Rust gives a formal version for continuous problems. A class of problems is subject to the curse if the work needed to reach accuracy grows at least as fast as:[17]
- is the required accuracy of the solution.
- and are the numbers of state and control variables.
- marks a lower bound on the work needed.
Chow and Tsitsiklis proved in 1989 that the general continuous dynamic programming problem is subject to this curse.[17] For the most general classes, no algorithm can avoid it, but some subclasses with special structure can break it, sometimes with randomized methods similar to Monte Carlo integration.[15]
Macroeconomic models
Calibration and simulation
Finn Kydland and Edward Prescott's 1982 paper "Time to Build and Aggregate Fluctuations" was the first study to work out the equilibrium of a full dynamic, stochastic (subject to random shocks) macroeconomic model built from individual decisions.[18]
They relied on numerical solution and computer simulation to an extent not previously seen in economics.[18]
Their work was cited for the 2004 Nobel Memorial Prize in Economic Sciences.[18]
Instead of statistically estimating every parameter, Kydland and Prescott used calibration. Their procedure had three steps:[18]
- Choose parameter values to match long-run facts and evidence from microeconomic studies. The facts include average interest rates and capital-output ratios, the ratio of the economy's capital stock to its output.
- Solve the model numerically and simulate it to produce artificial data.
- Compare the artificial data with real business cycle data.
This line of work grew into dynamic stochastic general equilibrium (DSGE) models. In these models, households and firms optimize over time under uncertainty.[9]
DSGE models have become one of the main tools of monetary policy analysis at central banks.[9]
Solving a DSGE model means finding its unknown decision rules, functions that map the current state of the economy into choices. Two main families of methods do this: perturbation and projection.[9]
Perturbation methods
Perturbation methods build an approximate solution from the known solution of a simpler, nearby case.[9] Their main features are:
- How they work. In macroeconomics they usually build a Taylor series approximation of the decision rules around the deterministic steady state, the point where the economy would settle without shocks.[9] Traditional linearization, which replaces a curved rule with a straight-line approximation near a chosen point, is simply a first-order perturbation.[9]
- Accuracy. Perturbation solutions are very accurate near the approximation point and often stay good over a wide range of states.[9]
- Higher orders. A second-order expansion adds a term for the size of the shocks. That term captures precautionary behavior, such as saving more to prepare for an uncertain future, which linear approximations miss.[9]
- Software. Free software such as Dynare makes higher-order perturbations easy to compute.[9]
Projection methods
Projection methods write the unknown decision rule as a weighted sum of basis functions, simple known functions such as Chebyshev polynomials. They choose the weights to make a residual function small, where the residual measures how far the model's equilibrium conditions are from holding.[19]
Because the fit covers the whole range of states, projection gives a global solution.[19]
Its main drawback is a serious curse of dimensionality in models with many state variables.[19]
Comparing methods
Caldara, Fernández-Villaverde, Rubio-Ramírez, and Yao compared the three main methods on one DSGE model in 2012. They judged accuracy by Euler equation errors, which measure how far an approximate decision rule is from satisfying the model's optimality condition (a condition the best choice must meet) across states.[19]
| Method | Kind of solution | Findings in the 2012 comparison |
|---|---|---|
| Perturbation (second and third order) | Local, around the steady state | Accurate enough for most uses; errors grow away from the steady state[19] |
| Projection (Chebyshev) | Global | Most accurate; higher computing cost and concern about dimensionality[19] |
| Value function iteration | Global, on a grid | Slow but reliable; with 125,000 grid points only slightly better than perturbation[19] |
The authors concluded that all three did a fair job, and that value function iteration is best avoided unless the model has kinks or other features that the smooth methods handle poorly.[19]
Agent-based computational economics
Agent-based computational economics (ACE) is the computational modeling of economic processes, including whole economies, as open-ended dynamic systems of interacting agents.[20]
Such systems unfold step by step as a sequence of events driven by the agents themselves.[20]
Leigh Tesfatsion named the approach in August 1996.[20]
In ACE, an agent is a software thing that acts over time on the basis of its own data, features, and methods.[20]
Tesfatsion defines ACE by seven modeling principles. Among them:[20]
- Agents can stand for individuals, groups, institutions, or physical entities.
- Each agent's action depends only on its own state at that time.
- Coordination cannot be forced from outside the agents.
- After the modeler sets the initial agent states, all later events come only from agent interactions.
This differs from standard equilibrium modeling. Finding a rational expectations solution, for example, is a global fixed-point problem that considers all time periods at once, which a step-by-step agent simulation does not do.[20]
The Santa Fe artificial stock market is a well-known example of an artificial financial market. It was described by W. Brian Arthur, John Holland, Blake LeBaron, Richard Palmer, and Paul Tayler.[10]
Its traders keep sets of forecasting rules and trade on the best ones. From time to time they replace poor rules using a genetic algorithm, a search method modeled on natural selection.[10] This use is part of the wider field of genetic algorithms in economics.
The market behaved in two ways depending on how fast traders explored new rules.[10] In the table, volatility means how much prices change over time.
| Slow exploration | Faster exploration | |
|---|---|---|
| Prices | Settle at the rational expectations equilibrium, matching the academic view that markets offer no reliable speculative profit | Show temporary bubbles and crashes |
| Trading | Volume stays low; technical trading (trading on past price patterns) does not emerge | Volume is high; technical trading becomes profitable |
| Volatility | No bubbles, crashes, or bunching of turbulence | Calm and turbulent periods bunch together, as in real markets |
All entries in the table come from Arthur and colleagues' experiments.[10]
Computation in estimation
Econometrics fits models to data, and computation lets it fit models that have no formula.
Structural estimation recovers the parameters of agents' preferences and constraints from their observed choices. It often requires solving the agents' problem many times.
The nested fixed point algorithm
John Rust's nested fixed point algorithm estimates models in which an agent repeatedly picks one of a few options over time.[1] It uses maximum likelihood, which chooses the parameters that make the observed data most probable.[1] The procedure nests one calculation inside another:[1]
- Choose a trial set of parameters.
- Solve the agent's dynamic program numerically for those parameters, as a fixed point.
- Use the solution to compute how likely the observed choices are.
- Update the parameters and repeat until the likelihood is as high as possible.
Rust's 1987 paper applied it to the decisions of Harold Zurcher, who managed bus engine replacement at the Madison Metropolitan Bus Company.[1] The paper won the 1992 Ragnar Frisch Medal for the best empirical paper in Econometrica in the preceding five years.[1]
Simulation in place of integration
Some models predict choice probabilities that require integrals over many variables at once, which are slow to compute. Daniel McFadden's 1989 method of simulated moments replaces these probabilities with estimates from Monte Carlo simulation.[21] It does not need precise simulated probabilities, because averaging across many observations controls the simulation error.[21]
Bayesian estimation, which estimates parameters by combining prior beliefs with observed data, also depends on simulation. Dynare, for example, uses Markov chain Monte Carlo, a family of random sampling methods, for Bayesian estimation of DSGE models.[5]
Microsimulation and tax-benefit models
The method
Microsimulation applies rules to records of individual people or households rather than to averages. A tax-benefit model uses it to compute each household's taxes and benefits under current law or a proposed reform.
EUROMOD
EUROMOD is the tax-benefit microsimulation model for the European Union.[6] It applies coded tax and benefit rules to household survey data made comparable across countries, and calculates the effects on household income.[6] The data come mainly from the European Union Statistics on Income and Living Conditions (EU-SILC).[6] It simulates:[6]
- income taxes;
- social insurance contributions;
- family, housing, social assistance, and other income-related benefits;
- consumption taxes, since 2024.
EUROMOD is a static model, so it applies the rules without modeling how people change their behavior in response.[6] Uses include estimating the budget cost of policy changes and their effects on how income is shared.[6]
EUROMOD began in 1996 as a series of European Commission research projects.[6] The Commission's Joint Research Centre has run it since 2021.[6]
Machine learning and text as data
Machine learning methods
Sendhil Mullainathan and Jann Spiess argued in 2017 that machine learning solves a different problem from much of econometrics. Machine learning centers on prediction, while many economic applications center on estimating parameters.[22]
They also warned that easy-to-use software raises the risk that algorithms are applied naively or their output is misread.[22]
Susan Athey and Guido Imbens surveyed the methods most useful to economists in 2019.[23] They covered:[23]
- supervised learning, which predicts an observed outcome from other variables, for regression and classification;
- unsupervised learning, which groups data into clusters when no outcome is observed;
- matrix completion, which estimates missing entries in a table of data.
They also highlighted new methods that combine machine learning with econometrics for causal inference, optimal policy estimation, and consumer choice.[23]
Text as data
Text as data treats documents such as news articles or speeches as inputs to economic research.[11]
The simplest approach is dictionary-based: count words or phrases from a fixed list.[11]
Baker, Bloom, and Davis measured economic policy uncertainty this way. They counted newspaper articles that contain terms such as "policy", "uncertainty", and "Federal Reserve".[11]
Economics and computation
The field
Computer scientists also study economics. They ask what markets and games can compute and how fast.[12]
This work is linked to algorithmic game theory and algorithmic mechanism design.
The conference
The field meets each year at the ACM Conference on Economics and Computation. ACM SIGecom has sponsored the conference since 1999, and it took its current name in 2014, replacing "Electronic Commerce".[24]
Computing a Nash equilibrium
A central result concerns the Nash equilibrium, a set of strategies in which no player gains by changing alone. In a mixed Nash equilibrium, players choose among their strategies at random with set probabilities.[12]
PPAD is a class of search problems that always have a solution. In each, a parity argument on directed graphs guarantees that the solution exists.[12]
Constantinos Daskalakis, Paul Goldberg, and Christos Papadimitriou showed that finding a mixed Nash equilibrium is PPAD-complete, meaning among the hardest problems in PPAD, for games with three or more players.[12] Chen and Deng extended this to two-player games.[12]
Because PPAD contains other problems suspected to be hard, the result is evidence that in some games, reaching equilibrium takes too long to be practical.[12]
Software, books, and community
The Handbook of Computational Economics
The Handbook of Computational Economics has four volumes.[25]
| Volume | Year | Coverage |
|---|---|---|
| 1 | 1996 | Methods for general equilibrium, rational expectations, and dynamic optimization[26] |
| 2 | 2006 | Agent-based computational economics[27] |
| 3 | 2014 | Topics including learning in dynamic models, auctions, asset pricing, heterogeneous agents, and large-scale dynamic models[27][25] |
| 4 | 2018 | Heterogeneous agent models, including agent-based macroeconomics and finance[25] |
Community and tools
- The Society for Computational Economics promotes computational methods in economics and finance and runs an annual conference, Computing in Economics and Finance.[28][20]
- The journal Computational Economics, published by Springer with the society, covers computational methods in econometrics, agent-based modeling, machine learning, and dynamic optimization.[29][30]
- QuantEcon, co-founded by Thomas Sargent and John Stachurski, publishes free lectures and code libraries for economic modeling in Python and Julia.[31][32]
- Dynare is free software for solving, simulating, and estimating DSGE models and overlapping generations models (models in which people from different generations are alive at the same time). It runs on MATLAB or GNU Octave.[5]
- Modeling languages such as GAMS let economists state optimization and equilibrium models in a form close to their mathematics.[26]
History
| Year | Event |
|---|---|
| 1960 | Leif Johansen publishes the first CGE model, of Norway[7] |
| 1967 | Herbert Scarf announces his algorithm for approximating fixed points[13] |
| 1973 | Scarf's book The Computation of Economic Equilibria appears[13] |
| 1982 | Kydland and Prescott's "Time to Build and Aggregate Fluctuations"[18] |
| 1987 | Rust's bus engine paper applies the nested fixed point algorithm[1] |
| 1989 | McFadden introduces the method of simulated moments[21] |
| 1996 | Handbook of Computational Economics Volume 1; Tesfatsion names ACE; EUROMOD project begins[26][20][6] |
| 1998 | Judd's Numerical Methods in Economics[4] |
| 1999 | ACM SIGecom begins sponsoring the EC conference[24] |
| 2006 | Handbook Volume 2, on agent-based economics[27] |
| 2014 | Handbook Volume 3; EC conference renamed Economics and Computation[27][24] |
| 2018 | Handbook Volume 4, on heterogeneous agent models[25] |
Open problems
- Dimensionality. Models with many state variables remain hard to solve, and both projection methods and value function iteration suffer from the curse of dimensionality.[19] Approximate dynamic programming, a set of methods that estimate a dynamic programming solution rather than compute it exactly, targets such problems.[15] It draws on reinforcement learning, learning from the rewards that actions bring. It also uses neural networks, computer models made of connected units that learn patterns from data, though its convergence theory is incomplete.[15]
- Accuracy. Perturbation solutions can lose accuracy far from the steady state, so researchers must check errors across the states a model actually visits.[19]
- Equilibrium as prediction. Hardness results raise doubts about using mixed Nash equilibrium as a general prediction of behavior, and whether good approximations can be computed efficiently is still open.[12]
- Careful use of machine learning. Matching prediction tools to economic questions, and avoiding misreading their output, remains an active concern.[22]
References
- Nested Fixed Point Maximum Likelihood Algorithm, John Rust, 1995.
- Optimal Savings II: Numerical Cake Eating, QuantEcon, 2025.
- Computational economics and economic theory: Substitutes or complements?, Journal of Economic Dynamics and Control, 1997.
- Numerical Methods in Economics, MIT Press, 1998.
- What is Dynare?, Dynare Reference Manual, n.d.
- What is EUROMOD?, European Commission Joint Research Centre, n.d.
- Johansen's Contribution to CGE Modelling: Originator and Guiding Light for 50 Years, Centre of Policy Studies, 2010.
- Optimal Savings I: Cake Eating, QuantEcon, 2025.
- Solution and Estimation Methods for DSGE Models, National Bureau of Economic Research, 2016.
- Asset Pricing Under Endogenous Expectations in an Artificial Stock Market, Santa Fe Institute, 1997.
- Text as Data, Journal of Economic Literature, 2019.
- The Complexity of Computing a Nash Equilibrium, Communications of the ACM, 2009.
- Herbert E. Scarf, History of Economic Thought Website, n.d.
- Distinguished Fellow: Herbert Scarf's Contributions to Economics, Journal of Economic Perspectives, 1994.
- Dynamic Programming, Numerical, Wiley StatsRef, 2017.
- The Stochastic Optimal Growth Model, QuantEcon, 2025.
- Numerical Dynamic Programming in Economics, Handbook of Computational Economics, 1996.
- Finn Kydland and Edward Prescott's Contribution to Dynamic Macroeconomics, Royal Swedish Academy of Sciences, 2004.
- Computing DSGE Models with Recursive Preferences and Stochastic Volatility, Federal Reserve Board, 2012.
- Agent-Based Computational Economics: Overview and Brief History, Leigh Tesfatsion, 2021.
- A Method of Simulated Moments for Estimation of Discrete Response Models Without Numerical Integration, Econometrica, 1989.
- Machine Learning: An Applied Econometric Approach, Journal of Economic Perspectives, 2017.
- Machine Learning Methods Economists Should Know About, Annual Review of Economics, 2019.
- A Resolution on the Name of the ACM EC Conference, ACM SIGecom, 2013.
- Handbook of Computational Economics, ScienceDirect, Elsevier, n.d.
- Handbook of Computational Economics, Volume 1, Elsevier, 1996.
- Introduction for Volume 3 of the Handbook of Computational Economics, Elsevier, 2014.
- Society for Computational Economics, Society for Computational Economics, n.d.
- Computational Economics, Springer, n.d.
- Computational Economics: Springer & Society for Computational Economics, IDEAS/RePEc, n.d.
- About QuantEcon, QuantEcon, n.d.
- QuantEcon: Open Source Tools for Computational Economics, QuantEcon, n.d.
