RepositoryJuliaITItaly
bancaditalia

bancaditalia/BeforeIT.jl

High-Performance Agent-Based Macroeconomics Made Easy

128stars
24forks
7issues
4views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: macroeconomics

#1 Repository of the week

1
TINIX TRENDING·Topic: abm

#1 Repository of the week

1
TINIX TRENDING·Topic: behavioural-economics

#1 Repository of the week

Aqua QA code style: runic

Logo adapts to light and dark modes *

Behavioural agent-based economic forecasting

Welcome to BeforeIT.jl, a package for Behavioural agent-based economic forecasting, from the IT research unit of the Bank of Italy.

BeforeIT.jl is a Julia-based framework based on the agent-based model presented in Economic forecasting with an agent-based model, the first ABM matching the forecasting performance of traditional economic tools.

With BeforeIT.jl, you can perform economic forecasting and explore different counterfactual scenarios. Thanks to its modular design, the package is also a great starting point for anyone looking to extend its capabilities or integrate it with other tools.

Developed in Julia, a language known for its efficiency, BeforeIT.jl is both fast and user-friendly, making it accessible whether you're an expert programmer or just starting out.

The package currently contains the original parametrisation for Austria, as well as a parametrisation for Italy. Recalibrating the model on other nations is possible of course. For instance, the CalibrateBeforeIT.jl package can be used to initialise the model for all 27 EU member states. This is still work in progress, so get in touch if you are interested!

Julia installation

To run this software, you will need a working Julia installation on your machine. If you don't have Julia installed already, simply follow the short instructions available here.

Installation

To be able to run the model, you can activate a new Julia environment in any folder from the terminal by typing

julia --project=.

Then, whithin the Julia environment, you can install BeforeIT.jl as

using Pkg
Pkg.add("BeforeIT")

You can ensure to have installed all dependencies via

Pkg.instantiate()

Now you should be able to run the the following code

import BeforeIT as Bit

parameters = Bit.AUSTRIA2010Q1.parameters
initial_conditions = Bit.AUSTRIA2010Q1.initial_conditions

T = 20
model = Bit.Model(parameters, initial_conditions)
Bit.run!(model, T)

This will simulate the model with the original Austrian parametrisation for 20 quarters and save the results in the data object. To plot the time series within the data object, make sure you install Plots.jl in the same environment using

Pkg.add("Plots")

and then try running

using Plots

plot(model.data.real_gdp)

In you want to run the script without opening a REPL, you can copy and paste the above lines into a file, say main.jl, and run it directly from the terminal by typing

julia --project=. main.jl

Docs

Extensive documentation on how to use the package is available here. We suggest following the steps in this tutorial to quickly learn the basics.

Furthermore, we suggest reading the software description available here.

Download Source Code and Run Tests

Clone the Repository

git clone https://github.com/bancaditalia/BeforeIT.jl.git
cd BeforeIT.jl

Activate and Instantiate the Environment

julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate();'

Run Tests

julia --proj test/runtests.jl

Format the Package

julia --proj format.jl

Current Authors

Adriano Meligrana
Adriano Meligrana

University of Turin

Email: adrianomeligrana@proton.me

Mitja Devetak
Mitja Devetak

Paris 1: Pantheon - Sorbonne

Aldo Glielmo
Aldo Glielmo

Banca d'Italia

Email: aldo.glielmo@bancaditalia.it

Citing BeforeIT

If you found BeforeIT useful for your research, please cite the following software description

@article{glielmo2025beforeit,
  title={BeforeIT.jl: High-Performance Agent-Based Macroeconomics Made Easy},
  author={Glielmo, Aldo and Devetak, Mitja and Meligrana, Adriano and Poledna, Sebastian},
  journal={arXiv preprint arXiv:2502.13267},
  year={2025}
}

and do not hesitate to get in touch to include your extension in the next release of the package and software description.

Disclaimer

This package is an outcome of a research project. All errors are those of the authors. All views expressed are personal views, not those of Bank of Italy.


* Credits to Sara Corbo for the logo and to Andrea Gentili for the name suggestion.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
mesa/mesa

Mesa is an open-source Python library for agent-based modeling, ideal for simulating complex systems and exploring emergent behaviors.

4.0k
Dec 1, 2026
RepositoryPython
QuantEcon/QuantEcon.py

A community based Python library for quantitative economics

2.4k
Nov 17, 2026
RepositoryRust
krABMaga/krABMaga

krABMaga: A modern developing art for reliable and efficient Agent-based Model (ABM) simulation with the Rust language

228
Nov 24, 2026
Repository
dkgaraujo/OpenSourcedMacroModels

A best-efforts collection of open-sourced macroeconomic models run by central banks and other official sector agencies (ie, ministries of economy)

205
Jul 16, 2025
RepositoryC++
AsPJT/PAX_SAPIENTICA

🌿: ABM & GIS for philological, archaeological, and anthropological data.

199
Jan 31, 2026
RepositoryJava
uwol/computational-economy

An agent-based computational economy with macroeconomic equilibria from microeconomic behaviors

139
Mar 1, 2026
RepositoryStan
amesoudi/cultural_evolution_ABM_tutorial

This tutorial shows how to create very simple simulation or agent-based models of cultural evolution in R

110
May 13, 2025
RepositoryPython
mesa/mesa-llm

Extension to the Mesa repository to provide with the ability to plug LLM directly into your agents for more complex reasoning and inter-agent communication ! Make your own reasoning/memory/communication modules and plug them into the existing code or use the pre-built ones for fast building.⁦

90
Nov 4, 2026
RepositoryR
zizroc/villager

villager is an extensible agent based modeling (ABM) framework for the R language. It supports agents, agent aggregations and their associated resources, as well as flexible data management.

67
Oct 28, 2025