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.
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.
sim.use(EXTENSION) call. Extensible design for custom model components.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()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.
BAM Engine 0.8.0 extends the calibration toolkit with four new composable tools, recalibrates all validation targets from extracted book figure data, and redesigns buffer-stock validation around aggregate improvement over Growth+.
Read more...BAM Engine 0.7.0 replaces the batch-sequential goods market with a pure sequential implementation, eliminating inventory collisions and delivering 6.5% faster simulations.
Read more...BAM Engine 0.6.0 consolidates two parallel market-matching implementations into a single vectorized path, delivering ~30% faster simulations.
Read more...We are excited to announce BAM Engine 0.5.1 and the launch of bamengine.org.
Read more...