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 implementation of 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, but currently not easily supported. So get in contact if you are interested!
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.
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
using BeforeIT
parameters = BeforeIT.AUSTRIA2010Q1.parameters
initial_conditions = BeforeIT.AUSTRIA2010Q1.initial_conditions
T = 20
model = BeforeIT.initialise_model(parameters, initial_conditions, T)
data = BeforeIT.run_one_sim!(model)
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(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
Extensive documentation on how to use the package is available here. We suggest following the steps in this tutorial to quickly learn the basics.
git clone https://github.com/bancaditalia/BeforeIT.jl.git
cd BeforeIT.jl
julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate();'
julia --proj test/runtests.jl
Aldo Glielmo Banca d'Italia Email: [email protected] |
Mitja Devetak Paris 1: Pantheon - Sorbonne |
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.