feat: add tariff war ABM with realistic calibration and visualization#376
feat: add tariff war ABM with realistic calibration and visualization#376
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
closes #279 |
|
Thanks for the PR, looks like a cool model. Could you:
|
|
Peer Review — Tariff War ABM Reviewed Overall The most economically sophisticated example I've reviewed in this repo. The CEE-SAC recession spiral mechanics (β expectations, lobbying ratchet, firm bankruptcy) are well thought out and go meaningfully beyond toy models. The visualisation is rich and the calibration against real 2018–2025 tariff data is a genuine contribution. A few structural issues need fixing. Critical: An empty Typo in directory name: The example lives at
matplotlib.use("Agg")Calling
The visualization file alone is longer than most complete examples in the repo. Six custom Solara components with dual-axis charts, fill-between shading, and formatted tick labels are impressive but push this beyond what a newcomer can follow. Consider whether the same economic story can be told with 2–3 charts instead of 6, or move the chart components to a separate Model-level correctness: β update rule The CEE (Consistent Expectations Equilibrium) β update is core to the model's recession spiral mechanic. Worth confirming in the README or code comments that the update rule matches the theoretical specification specifically whether β is updated before or after production decisions each step, as order-of-operations affects whether you get a self-fulfilling spiral or dampened oscillation. Sector calibration is documented clearly ✅ The inline comments explaining This level of documentation is exactly what makes an ABM reviewable. ✅
The file is named Summary The economic model is ambitious and technically sound. Three things to fix before merge: (1) remove the root-level |
|
Hi @echo-xiao, Does it belong? Is it correct and current? Is it clean? Summary |
Adds a new Mesa 3 example: Tariff War — an ABM simulating the 2018–2025
US–China trade war with three agent types (State, Organization, Resident)
across three countries (USA, China, Neutral Asia).
Key emergent phenomena
Visualization
7 real-time Solara charts covering tariffs, GDP, firm bankruptcy,
consumer welfare, and expectation gaps.
Parameters calibrated to real data (WTO baseline 3%, peak 35%,
government size 20% GDP).