Skip to content

bam-engine 0.3.0

Choose a tag to compare

@kganitis kganitis released this 11 Feb 19:43
· 378 commits to main since this release

This release adds the Consumption & Buffer-stock extension (Chapter 3.9.4 of Delli Gatti et al., 2011) and introduces a composable extension API that replaces the global hook registry.

New extension: Consumption & Buffer-stock

  • extensions/buffer_stock/ — BufferStock role and events
  • examples/extensions/example_buffer_stock.py — buffer-stock consumption example

New built-in role: Shareholder

  • Tracks per-period dividends for accurate buffer-stock MPC metrics

Composable extension API:

  • sim.use_events(*event_classes) — explicit pipeline hook activation
  • sim.use_config(config) — extension defaults with "don't overwrite" semantics
  • sim.use_role(cls, n_agents=N) — non-firm role attachment

Breaking changes:

  • Hook system refactored: global _EVENT_HOOKS dict removed, hooks now stored as class attributes and applied explicitly via sim.use_events()
  • Dict-form collect default aggregate changed from "mean" to None (full per-agent arrays); add "aggregate": "mean" for previous behavior

See CHANGELOG for complete details of what's included in this version.

If you want to get started with using BAM Engine, see the README.