{"id":28381190,"url":"https://github.com/kganitis/bam-engine","last_synced_at":"2026-03-04T13:03:27.713Z","repository":{"id":289700272,"uuid":"972128676","full_name":"kganitis/bam-engine","owner":"kganitis","description":"High-performance Python implementation of the macroeconomic agent-based BAM model using ECS architecture","archived":false,"fork":false,"pushed_at":"2026-02-25T12:54:14.000Z","size":10361,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-25T14:38:39.180Z","etag":null,"topics":["agent-based-modeling","computational-economics","macroeconomics","numpy","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kganitis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-24T15:21:48.000Z","updated_at":"2026-02-25T12:54:17.000Z","dependencies_parsed_at":"2025-04-24T16:44:30.754Z","dependency_job_id":"bf9a54e6-5672-4e49-8c7c-0e49ff20727b","html_url":"https://github.com/kganitis/bam-engine","commit_stats":null,"previous_names":["kganitis/bam-engine"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/kganitis/bam-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kganitis%2Fbam-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kganitis%2Fbam-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kganitis%2Fbam-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kganitis%2Fbam-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kganitis","download_url":"https://codeload.github.com/kganitis/bam-engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kganitis%2Fbam-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30081093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T12:28:08.313Z","status":"ssl_error","status_checked_at":"2026-03-04T12:27:28.210Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-based-modeling","computational-economics","macroeconomics","numpy","python"],"created_at":"2025-05-30T03:38:51.680Z","updated_at":"2026-03-04T13:03:27.706Z","avatar_url":"https://github.com/kganitis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/kganitis/bam-engine/main/docs/_static/logo-dark.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/kganitis/bam-engine/main/docs/_static/logo.svg\"\u003e\n    \u003cimg alt=\"BAM Engine\" src=\"https://raw.githubusercontent.com/kganitis/bam-engine/main/docs/_static/logo.svg\" width=\"280\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eA Modular Python Framework for the BAM Agent-Based Macroeconomic Model\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A Python implementation of the BAM (Bottom-Up Adaptive Macroeconomics) model\n  from \u003ca href=\"https://doi.org/10.1007/978-88-470-1971-3\"\u003e\u003cem\u003eMacroeconomics from the Bottom-up\u003c/em\u003e\u003c/a\u003e\n  (Delli Gatti et al., 2011). Simulate households, firms, and banks\n  interacting across labor, credit, and goods markets, where macroeconomic\n  dynamics emerge from individual agent decisions.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://bam-engine.readthedocs.io\"\u003e\u003cstrong\u003eDocumentation\u003c/strong\u003e\u003c/a\u003e\n  \u0026bull;\n  \u003ca href=\"https://bam-engine.readthedocs.io/en/latest/quickstart.html\"\u003e\u003cstrong\u003eGetting Started\u003c/strong\u003e\u003c/a\u003e\n  \u0026bull;\n  \u003ca href=\"https://bam-engine.readthedocs.io/en/latest/auto_examples/index.html\"\u003e\u003cstrong\u003eExamples\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n[![Python](https://img.shields.io/pypi/pyversions/bamengine.svg)](https://pypi.org/project/bamengine/)\n[![PyPI version](https://img.shields.io/pypi/v/bamengine.svg?color=blue)](https://pypi.org/project/bamengine/)\n[![DOI](https://zenodo.org/badge/972128676.svg)](https://doi.org/10.5281/zenodo.17610305)\n[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n\n[![Tests](https://github.com/kganitis/bam-engine/actions/workflows/test.yml/badge.svg)](https://github.com/kganitis/bam-engine/actions/workflows/test.yml)\n[![Repo-Review](https://github.com/kganitis/bam-engine/actions/workflows/repo-review.yml/badge.svg)](https://github.com/kganitis/bam-engine/actions/workflows/repo-review.yml)\n[![codecov](https://codecov.io/github/kganitis/bam-engine/graph/badge.svg?token=YIG31U3OR3?color=brightgreen)](https://codecov.io/github/kganitis/bam-engine)\n[![Benchmarks](https://img.shields.io/badge/benchmarks-asv-brightgreen)](https://kganitis.github.io/bam-engine/)\n\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/kganitis/bam-engine/main.svg)](https://results.pre-commit.ci/latest/github/kganitis/bam-engine/main)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Type Checked](https://img.shields.io/badge/type%20checked-mypy-black)](http://mypy-lang.org/)\n\n\u003e **Note**: This release is feature-complete for the core BAM model but APIs may change in future releases before v1.0.0.\n\n## Quick Start\n\n```bash\npip install bamengine\n```\n\n**Requirements**: Python 3.11+. NumPy and PyYAML are installed automatically.\n\n```python\nimport bamengine as bam\n\n# Initialize and run simulation\nsim = bam.Simulation.init(n_firms=100, n_households=500, seed=42)\nresults = sim.run(n_periods=100, collect=True)\n\n# Export to pandas DataFrame\ndf = results.to_dataframe()\n\n# Add extensions with one call\nfrom extensions.rnd import RND\n\nsim = bam.Simulation.init(seed=42)\nsim.use(RND)\nresults = sim.run(n_periods=1000, collect=True)\n```\n\nSee the [Getting Started guide](https://bam-engine.readthedocs.io/en/latest/quickstart.html) for a complete walkthrough.\n\n## Features\n\n- **Complete BAM Model:** Full Chapter 3 implementation: firms, households, and banks interacting across labor, credit, and goods markets\n- **ECS Architecture:** Entity-Component-System design separates data (Roles) from behavior (Events) for clean extensibility\n- **Vectorized Performance:** All agent operations use NumPy arrays; no Python loops over agents\n- **Built-in Extensions:** R\u0026D / Growth+, buffer-stock consumption, and taxation modules\n- **Validation Framework:** Three scenario validators with scoring and robustness analysis\n- **Calibration Pipeline:** Morris screening, grid search, and tiered stability testing\n- **Easy Configuration:** All parameters configurable without code changes via YAML files\n\n## Architecture\n\nBAM Engine uses an ECS (Entity-Component-System) architecture: agents are lightweight entities, state lives in Role components stored as NumPy arrays, and behavior is defined by Event systems executed via a YAML-configurable pipeline. Custom roles, events, and relationships can be added without modifying core code.\n\nSee the [User Guide](https://bam-engine.readthedocs.io/en/latest/user_guide/index.html) for a full walkthrough of the model and its architecture.\n\n## Documentation\n\nFull documentation is available at [bam-engine.readthedocs.io](https://bam-engine.readthedocs.io).\n\n| Section                                                                           | Description                                                                   |\n| --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |\n| [Getting Started](https://bam-engine.readthedocs.io/en/latest/quickstart.html)    | Installation, first simulation, data collection                               |\n| [User Guide](https://bam-engine.readthedocs.io/en/latest/user_guide/index.html)   | Model overview, configuration, custom roles/events, pipelines, best practices |\n| [API Reference](https://bam-engine.readthedocs.io/en/latest/api/index.html)       | Complete reference for all components and operations                          |\n| [Examples](https://bam-engine.readthedocs.io/en/latest/auto_examples/index.html)  | 16 runnable examples: basic, advanced, and extensions                         |\n| [Extensions](https://bam-engine.readthedocs.io/en/latest/extensions/index.html)   | R\u0026D / Growth+, buffer-stock consumption, taxation                             |\n| [Validation](https://bam-engine.readthedocs.io/en/latest/validation/index.html)   | Scenario validation, scoring, robustness analysis                             |\n| [Calibration](https://bam-engine.readthedocs.io/en/latest/calibration/index.html) | Morris screening, grid search, stability testing                              |\n\n## Development\n\n```bash\ngit clone https://github.com/kganitis/bam-engine.git\npip install -e \".[dev]\"\npytest\nruff format . \u0026\u0026 ruff check --fix . \u0026\u0026 mypy\n```\n\nThis project was developed as part of MSc thesis research at the University of Piraeus, Greece. External contributions are not currently accepted during thesis work. For bug reports and feature requests, please open an issue on the [issue tracker](https://github.com/kganitis/bam-engine/issues).\n\nSee the [Development Guide](https://bam-engine.readthedocs.io/en/latest/development/index.html) for more on testing, linting, benchmarking, and contributing.\n\n## Citation\n\nIf you use BAM Engine in your research, please cite:\n\n1. **This software** - Use [`CITATION.cff`](CITATION.cff) or GitHub's \"Cite this repository\"\n1. **The original BAM model** - Delli Gatti, D., Desiderio, S., Gaffeo, E., Cirillo, P., \u0026 Gallegati, M. (2011). *Macroeconomics from the Bottom-up*. Springer. DOI: [10.1007/978-88-470-1971-3](https://doi.org/10.1007/978-88-470-1971-3)\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkganitis%2Fbam-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkganitis%2Fbam-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkganitis%2Fbam-engine/lists"}