BAM Engine
Agent-based macroeconomic simulation in Python
The 2026 Economics Nobel, Seen from the Bottom Up
2026-10-14

What is BAM Engine?#

Imagine a virtual economy where thousands of workers look for jobs, companies compete for customers, and banks decide who gets a loan. BAM Engine creates exactly that: a computer simulation where economic patterns like unemployment, inflation, and business cycles emerge naturally from these individual decisions, just as they do in the real world. It is a Python framework that implements the BAM model from Macroeconomics from the Bottom-up (Delli Gatti et al., 2011), designed for researchers in computational economics and agent-based modeling.

Complete BAM Model
Full implementation of the BAM model from Delli Gatti et al. (2011). Firms, households, and banks interact across labor, credit, and goods markets. Macroeconomic dynamics emerge from the bottom up.
ECS Architecture
Entity-Component-System design separates agent data (Roles) from behavior (Events). Extend or override any aspect of the model without forking the core.
Vectorized Performance
All agent operations use NumPy arrays, with no Python loops over agents. Simulate economies of 100+ firms and 500+ households at interactive speed.
Built-in Extensions
Activate R&D/Growth+, buffer-stock consumption, or taxation with a single sim.use(EXTENSION) call. Extensible design for custom model components.
Validation Framework
Three scenario validators check unemployment, inflation, and firm-size distributions against stylized facts. Robustness analysis and sensitivity sweeps are built in.
Calibration Pipeline
Morris screening, grid search, and tiered stability testing, all accessible from the same high-level API. Reproducible parameter estimation out of the box.

Model Validation

Try BAM Engine

Use the interactive shell to try BAM Engine in the browser

To try the examples in the browser:
1. Type code in the input cell and press
   Shift + Enter to execute
2. Or copy paste the code, and click on
   the "Run" button in the toolbar
# Baseline: GDP fluctuates but stays flat
import bamengine as bam
from bamengine import ops

sim = bam.Simulation.init(seed=42, log_level="ERROR")
results = sim.run(n_periods=100)

# Business cycles emerge from agent interactions
gdp = ops.sum(results.Producer.production, axis=1)
print(f"Baseline GDP: {gdp[-1]:.0f}")
# With R&D: GDP now grows over time
from extensions.rnd import RND
import matplotlib.pyplot as plt

sim = bam.Simulation.init(seed=42, log_level="ERROR")
sim.use(RND)
results = sim.run(n_periods=100)

gdp = ops.sum(results.Producer.production, axis=1)
plt.plot(gdp)
plt.title("GDP with R&D")
plt.show()
The 2026 Economics Nobel, Seen from the Bottom Up

Two economy machines with dials for prices, unemployment and GDP: one closed, one opened to show many different people inside driving the dials

“New Keynesian models are based on microfoundations”, Figure 2 of the 2026 prize announcement. © Johan Jarnestad/The Royal Swedish Academy of Sciences.

On 12 October the 2026 prize in economic sciences went to Robert E. Hall of Stanford and Michael Woodford of Columbia “for microeconomic foundations of macroeconomic stabilisation”. Their work underpins the models central banks use to decide when to raise or cut interest rates. The Royal Swedish Academy of Sciences describes the approach in words that sound very familiar around this project: the models are built “from the bottom up. Economic outcomes are the result of millions of decisions made at the microlevel by households and businesses.”

The BAM model at the heart of BAM Engine comes from a book called Macroeconomics from the Bottom-up. So it is worth asking what the two traditions share and where they part ways.

Read more...
BAM Engine 0.10.0: Benchmarked Against the Ecosystem

BAM Engine 0.10.0 measures itself against the wider agent-based modelling ecosystem. A new benchmark suite runs the identical baseline BAM model on five frameworks, and a round of performance work makes BAM Engine the fastest of the group at scale. There are no breaking changes to the public API.

Read more...
BAM Engine 0.9.0: Results API Redesign

BAM Engine 0.9.0 redesigns the results collection API, making simulation data easier to access and explore. A follow-up patch (0.9.1) adds a log_level convenience parameter.

Read more...

Browse all news  ⟶