An agent-based simulation that models a three-tier economic system (central bank, local banks, individuals) to study the emergence of wealth inequality from simple economic rules.
This model simulates a simple economic system with three types of agents:
- Central Bank: Creates money when local bank reserves fall below a threshold
- Local Banks: Lend money to individuals who need loans
- People: Make investment decisions and consume resources
Despite all agents following the same rules with no inherent advantages, wealth inequality naturally emerges through the interactions in the system.
The simulation:
- Creates a population of agents with identical starting wealth
- Establishes a central bank that can create money when local bank reserves are low
- Sets up local banks that lend money to individuals
- Has people making probabilistic investment/consumption decisions each step
- Tracks the Gini coefficient over time to measure wealth inequality
- Produces visualizations showing wealth distribution, Lorenz curves, and economic metrics
- Demonstrates how complex economic patterns like wealth inequality emerge from simple rules
Even though all agents follow the same simple rules with no built-in advantages, the simulation consistently produces significant wealth inequality patterns similar to those observed in real-world economies.
The simulation demonstrates several key economic phenomena:
- Wealth inequality emerges naturally, with Gini coefficients reaching ~0.55
- Power-law distribution of wealth (many poor, few rich) appears without explicit programming
- Money creation by the central bank affects wealth distribution over time
- Banking liquidity impacts individual wealth accumulation
# Run the simulation
model = run_simulation(N_people=5000, N_banks=50, steps=1000, seed=42)
- mesa >= 3.3.0
- numpy
- matplotlib
- seaborn
- pandas
pip install mesa numpy matplotlib seaborn pandas
If you use this model in your research, please cite:
Constantinou, C. (2025). Wealth Inequality Agent-Based Model.
GitHub repository: https://github.com/cconsta1/wealth-inequality-abm
MIT License
Tutorial video coming soon!