Skip to content

An agent-based model simulating the emergence of wealth inequality in a three-tier economic system with a central bank, local banks, and individuals using Mesa 3.3.0

License

Notifications You must be signed in to change notification settings

cconsta1/wealth-inequality-abm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Wealth Inequality Agent-Based Model

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.

Overview

This model simulates a simple economic system with three types of agents:

  1. Central Bank: Creates money when local bank reserves fall below a threshold
  2. Local Banks: Lend money to individuals who need loans
  3. 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.

What the Code Does

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.

Results

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

Usage

# Run the simulation
model = run_simulation(N_people=5000, N_banks=50, steps=1000, seed=42)

Requirements

  • mesa >= 3.3.0
  • numpy
  • matplotlib
  • seaborn
  • pandas

Installation

pip install mesa numpy matplotlib seaborn pandas

Citation

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

License

MIT License

Watch the Tutorial

Tutorial video coming soon!

About

An agent-based model simulating the emergence of wealth inequality in a three-tier economic system with a central bank, local banks, and individuals using Mesa 3.3.0

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published