Models Module#

The macrostat.models module

The macrostat.models module consists of the following classes

ECO3IOPC

Macro Veronese Passarella's ECO-3IO-PC model

GL06PC

Godley & Lavoie (2006, Chapter 4) Model PC

GL06SIM

Godley & Lavoie (2006, Chapter 3) Model SIM

GL06SIMEX

Godley & Lavoie (2006, Chapter 3) Model SIMEX

NK3E

New Keynesian 3-Equation (NK3E) Model - https://macrosimulation.org/a_new_keynesian_3_equation_model

IOPC

Macro Veronese Passarella's 3IO-PC model

model_manager

Model Manager

macrostat.models.get_available_models(model_directory=None)[source]#

Get all available models in the models directory.

Parse the models directory and return a list of all available models, which are in subdirectories of the models directory and are named after the model. They are valid when they contain a __init__.py, parameters.py, variables.py, scenarios.py, behavior.py file.

Parameters:

model_directory (str, optional) – The directory to look for models in. If None, uses the directory of this file.

Returns:

A list of all available models.

Return type:

list

macrostat.models.get_model(modelname: str, model_directory=None)[source]#

Get a model from the models directory.

Parameters:

modelname (str) – The name of the model to get.

Returns:

Named tuple containing all model component classes

Return type:

ModelClasses

Raises:
  • ValueError – If model name is invalid or model is not available

  • ImportError – If there are problems importing the model components

macrostat.models.get_model_classes(modelname: str, model_directory=None)[source]#

Get a model from the models directory.

Parameters:

modelname (str) – The name of the model to get.

Returns:

Named tuple containing all model component classes

Return type:

ModelClasses

Raises:
  • ValueError – If model name is invalid or model is not available

  • ImportError – If there are problems importing the model components