1. Introduction#

This manual describes the implementation of the World Bank’s MFMod Framework [Burns et al. [2019]] using the open source modeling package ModelFlow. (Hansen, 2023 https://ibhansen.github.io/doc/index).

The impetus for this paper and the work that it summarizes was to make available to a wider constituency the work that the Bank has done over the past several decades to build and develop Macro-structural models[1] for developing countries.

This manual exists in a variety of formats:

  • a PDF version

  • an html version (available here). The html version of the manual includes live links to:

    • the PDF version

    • the Jupyter Notebooks that comprise this book

    • links to the Jupyter notebooks that comprise the book on google colab where they can be run using the colab infrastructure

    • links to World Bank github site that hosts the repository for the manual and the models that have been released

Note access to individual Jupyter notebooks and collab versions of the notebooks are provided by the icons that appear at the top of each html page:

Image of links from html site

The first icon links to colab. The second to the github site. The third allows downloads of the Jupyter Notebook and PDFs of the Jupyter Notebook currently being viewed in the html document. The final two icons shift the html to fulls-screen mode and switch between dark and light screen modes.

1.1. The MFMod Framework at the World Bank#

MFMod is the World Bank’s work-horse macro-structural economic modeling framework. It exists both as a linked system of 184 country-specific models that can be solved independently or as a larger system (MFMod), and as a series of standalone customized models, known collectively as MFMod Standalones (MFModSA). These Standalone models have been developed from the central model to fit the specific needs of individual countries. Both the central and Standalone models were developed using the EViews modeling language, and are run in that environment directly or through the intermediation of an easy-to-use excel front-end developed by the Bank.

The main MFMod global model evolved from earlier macro-structural models developed during the 2000s to strengthen the basis for the forecasts produced by the World Bank. Some examples of these models were released on the World Bank’s isimulate platform https://isimulate.worldbank.org early in 2010, along with several CGE models dating from this period. These earlier models were substantially extended into what has become the main MFMod model. Since 2015, MFMod has been the Bank’s main tool for forecasting and economic analysis, and is used by all of the Bank’s country economists for the World Bank’s twice annual forecasting exercise The Macro Poverty Outlook (https://www.worldbank.org/en/publication/macro-poverty-outlook).

The main documentation for MFMod are Burns et al. [2019] and Burns and Jooste [2019].

In this Chapter – Introduction

This chapter provides a high-level overview of the MFMod system and the motivation for releasing some of the models in an open-source format using the ModelFlow python package.

1.1.1. Climate-aware version of MFMod#

Most recently, the Bank has extended the standard MFMod framework to incorporate the main features of climate change Burns et al. [2021]– both in terms of the impact of the economy on climate (principally through green-house gas emissions, like \(CO_2, N_{2}O, CH_4, ...\)) and the impact of the changing climate (higher temperatures, changes in rainfall quantity and variability, increased incidence of extreme weather) on the economy (agricultural output, labor productivity, physical damages due to extreme weather events, sea-level rises etc.). So called co-benefits from climate policy, such as pollution reduction, changes in informality, health and productivity effects are also incorporated into the MFMod CC models. For the moment Burns et al. [2021] is the most up to date documentation of the MFMod CC models, but the models have evolved substantially from the initial climate model described there.

As of June 2025, variants of the model initially described in Burns et al. [2021], have been developed for 70 countries and underpin the economic analysis contained in the majority of the World Bank’s Country Climate Development Reports (https://www.worldbank.org/en/publication/country-climate-development-reports).

1.2. Early steps to bring the MFMod system to the broader economics community#

Bank staff were quick to recognize that the models built for its own needs could be of use to the broader economics community. An initial project, isimulate, made several versions of this earlier model available for simulation on the isimulate platform (https://isimulate.worldbank.org) in 2007, and these models continue to be available there. The isimulate platform continues to house early versions of the MFMod system. While the platform allows simulation of these and other models, it does not give researchers access to the code or the ability to construct complex simulations.

In another effort to make models widely available a large number (more than 100 as of June 2025) customized stand-alone models (collectively known as MFModSA - MacroFiscalModel StandAlones) have been built from the main model. Typically developed for a country-client (Ministry of Finance, Economy or Planning or Central Bank), these Standalones extend the standard model by incorporating additional details not in the standard model that are of specific import to different economies and the country-clients for whom they were built. These features frequently include: a more detailed breakdown of the sectoral make up of an economy, more detailed fiscal and monetary accounts, and other economically important features of the economy that may exist only inside the aggregates of the standard model.

In addition to making customized models available to client governments, since 2013 the World Bank has conducted training and dissemination around these customized versions of MFMod, designed to train government officials in the use of these models, their maintenance, modification and revision.

1.3. Moving the framework to an open-source footing#

Models in the MFMod family are normally built and simulated using EViews, a proprietary econometric and modeling package. While offering many advantages for model development and maintenance, its cost may be a barrier to clients in developing countries. As a result, the World Bank joined with Ib Hansen, a Danish economist formerly with the European Central Danish Central Banks, who over the years has developed ModelFlow a generalized solution engine for economic models written in Python. Together with World Bank, Hansen has worked to extend ModelFlow so that MFMod models can be ported and run in the framework.

This paper reports on the results of these efforts. In particular, it provides step-by-step instructions on how to install the ModelFlow framework, import a World Bank macrostructural model, perform simulations with that model and report results using the many analytical and reporting tools that have been built into ModelFlow. It is not a manual for ModelFlow, such a manual can be found here (https://ibhansen.github.io/doc/index). Nor is this paper documentation for the MFMod system, such documentation can be found here Burns et al. [2019],Burns and Jooste [2019], Burns et al. [2021], and here Burns et al. [2021]) for the specific models described and worked with below.