[go: up one dir, main page]

0% found this document useful (0 votes)
45 views19 pages

Forecasting Ds Ge Models With Python

This document presents a Python platform for forecasting and analyzing Dynamic Stochastic General Equilibrium (DSGE) models, particularly in the context of the COVID-19 pandemic. It discusses the application of various models, including Eichenbaum-Rebelo-Trabandt and Gali-Smets-Wouters, to simulate macroeconomic effects and policy scenarios related to the pandemic. The platform aims to provide insights into the economic impact of structural changes and inform policy discussions through robust simulations.

Uploaded by

Rafik Nashi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views19 pages

Forecasting Ds Ge Models With Python

This document presents a Python platform for forecasting and analyzing Dynamic Stochastic General Equilibrium (DSGE) models, particularly in the context of the COVID-19 pandemic. It discusses the application of various models, including Eichenbaum-Rebelo-Trabandt and Gali-Smets-Wouters, to simulate macroeconomic effects and policy scenarios related to the pandemic. The platform aims to provide insights into the economic impact of structural changes and inform policy discussions through robust simulations.

Uploaded by

Rafik Nashi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Forecasting DSGE Models with Python

ABSTRACT: We have developed a flexible, powerful, and user-friendly platform for macroeconomic modeling in
Python, including tools for filtering, simulation, estimation, forecasting and model diagnostics for Dynamic
Stochastic General Equilibrium (DSGE) models. This platform can be applied for analysis of New Keynesian
models, Real Business Cycle models, Gap models, and Overlapping Generations models, to name a few. It
applies robust and efficient solution techniques to solve linear and nonlinear perfect foresight models which rely
on rational expectations hypothesis. The system of non-linear model equations is solved with the aid of Michel
Juillard et al. (1998) forward-backward substitution method. A novel feature of this software is an application of
dynamic parameters to analyze models with structural changes which is crucial for policy analysis. For
demonstration purposes we apply this Platform to study macroeconomic effects of COVID-19 pandemic on
country economy. Our analysis utilizes Eichenbaum-Rebelo-Trabandt (2020) and Gali-Smets-Wouters (2012)
models. ERT model is a non-linear model. It integrates the Neoclassical and the New Keynesian approaches
with the theory of infection diseases. GSW model is a linear model. It incorporates unemployment theory
developed by Gali (2011 a, b) into the new Keynesian model framework of Smets and Wouters (2007). The
detrimental effects of epidemic on economy are modeled by an adverse shock to labor supply. We propose
several scenarios of lockdown and vaccination policies and perform forecast simulations. These simulations
produce scenarios forecasts, which can inform policy discussions in the context of surveillance and program
review work. Lastly, we apply Python platform to DIGNAR-19 model analysis and forecast. These forecasts
could help economist to analyze macroeconomic impact of pandemic considering countries debt sustainability.

Contents
I. Introduction ........................................................................................................................................................ 2
II. Literature Review .............................................................................................................................................. 2
III. Epidemic Stylized Facts ................................................................................................................................... 3
IV. Epidemiological Models ................................................................................................................................... 6
One-strain virus model...................................................................................................................................... 6
Two-strains virus model .................................................................................................................................... 6
V. ERT Model ........................................................................................................................................................ 7
Calibration......................................................................................................................................................... 9
VI. Modelling Economic Effects of Epidemic ....................................................................................................... 10
VII. GSW Model .................................................................................................................................................. 12
Forecast ..................................................................................................................................................... 12
Judgmental Adjustments ............................................................................................................................ 15
VIII. Concluding Remarks ................................................................................................................................... 16
IX. References .................................................................................................................................................... 16
I. Introduction
In this paper we aim to estimate effects of COVID -19 epidemic on country economy. We start by analyzing
some facts about this SARS disease rate of transmission and morbidity, then we apply Eichenbaum-Rebelo-
Trabandt (2020 a) model to analyze possible effects of this virus on macroeconomic variables. ERT model lacks
references to unemployment rate. We use Gali-Smets-Wouters (2012) model which embeds unemployment
theory of Gali (2011 a, b). Effects of virus are accounted for by introducing a shock to labor supply.

Numerical calculations and subsequent analysis are accomplished with the aid of in-house developed Python
software. This software1 is a quite versatile and flexible toolbox designed for DSGE modeling.

II. Literature Review


The literature on macroeconomic effects of this disease is constantly growing since the start of this pandemics
at the beginning of 2020.

Mihailov (2020) studied macroeconomic effects of COVID-19 lockdown. Author considers scenarios of labor
force reduction due to this virus for lockdown duration of one to three quarters. In the most optimistic case when
¼ of labor force is unable to work and lockdown duration is of one quarter, per capita loss in consumption is 6-
7%, and per capita annual output loss is 3-4%. The recovery is of V shape and lasts 1.5-2 years. In the most
pessimistic case of ¾ labor force reduction, loss in output could reach astonishing 12% and recovery could last
for 10 years.

Cristina Arellano and Yan Bai (2020) integrated epidemiology concepts into sovereign debt default model.
Authors notice, that lockdowns could alleviate health crisis but induce costly and prolonged debt crisis. Under
the optimal policy output loss reaches 19%, lockdown lasts 8 months with intensity of 51%, and debt default crisis
lasts for 43 months.

Eichenbaum, Rebelo, and Trabandt (2020 a, b) extended the canonical epidemiology model to study mutual
effects of economic decisions and epidemic. While policy measure to reduce consumption and work hours
alleviates health crisis counted by number of deaths, it exacerbates the size of the recession. Authors also
incorporated concepts of treatment, vaccination, and containment into the DSGE framework and found optimal
policy enter and exit times and containment duration.

Alvarez et al. (2020) studied optimal lockdown policy that controls number of infected and fatality cases while
minimizing detrimental economic cost of lockdown. Authors investigated different lockdown regimes and
observed that optimal policy could reduce number of infected at a peak by two times and number of deaths by
1% of population. Welfare under lockdown is lower and is equivalent to 2% of GDP one-time payment.

Caseli et al. (2020) applied panel regression methods to analyze data on effects of government lockdowns on
mobility, social distancing, and COVID-19 infections. Authors conclude that lockdowns have significantly reduced
economic activities that manifest itself thru its proxies, such as mobility and job postings. Authors also conclude
that lockdowns are a powerful tool to reduce infections especially if applied at the early stages of epidemic and
if they are sufficiently tight.
III. Epidemic Stylized Facts
COVID-19 disease is caused by severe acute respiratory syndrome coronavirus. It is an airborne virus that can
spread through small droplets of saliva or indirectly via surfaces that have been touched by someone who was
infected with this virus. Since its outbreak in March 2020, more than 166 million people worldwide had been
infected and about 3.4 million had died. In the US 33 million people were infected, and 588 thousand died.

Below we present data on epidemic in the US and in four major EU economies. We sourced these data from the
Center for System Science and Engineering at John Hopkins University 1. Data on active COVID-19 cases in the
United States were sourced from Worldometer website2.

Percentage of Infected Percentage of Deceased


25%

Infected 0.35%
20%
Current Cases 0.30%

15% 0.25%

0.20%
10%
0.15%

0.10%
5%
0.05%

0% 0.00%

Fig.1.1. Dynamics of coronavirus epidemic in the US. Number of infected is the total number of reported
cases of COVID-19 infection.

Based on these data for US, Germany, France, Italy, and Spain, we calculated daily rate of infection transmission
as a ratio of daily change of the number of infected to the total number, and daily rate of deaths as a ratio of the
number of daily deaths to the total number of infected. At the beginning of epidemic number of infected is small.
Because these calculations assume division by the total number of infected and at the onset of epidemic it is
small, we report daily rates starting from June 2020.

These data demonstrate a seasonal nature of COVID-19 virus: infection transmission increases in winter, and it
decreases in summer.

1
Coronavirus Source Data, https://ourworldindata.org/coronavirus-source-data
2
COVID-19 Cases in the United States, https://www.worldometers.info/coronavirus/country/us/#graph-cases-dail

3
Below we present major macroeconomic indicators1 of US economy for period from January 2006 to March 2021.
This time range includes Global Financial Crisis of 2007 and 2008 and economic recession of 2020. We
computed output and consumption gaps as percentage deviations of time series from HP filtered values. These
data show a drop in output and consumption since epidemic outbreak followed by a V shape recovery. Similarly,
unemployment rate, wage rate, average working hours per week, and total labor force show a quick recovery
from COVID-19 disease impact.

Fig.1.2. Percent of total cases of infected and deceased population in five major world economies. Daily
rates of infected and deceased were filtered by applying HP filter to smooth the scattered data. Vertical
axis displays percentage point.

4
Fig.1.3. Macroeconomic indicators of US economy. Output gap, consumption gap, unemployment and
inflation rates are shown in percentage points. Work hours are average hours per week. Interest rate is
a six-month London interbank offered rate (LIBOR), period averaged.

1
Source: World Economic Outlook and Haver Analytics databases.

5
IV. Epidemiological Models
ONE-STRAIN VIRUS MODEL

Epidemiological models describe spread of an epidemic. These compartmental models assume that an
individual could transition thru several states during infection period: Susceptible, Infected, Recovered and
Deceased. If incubation period of being exposed to infection, but still not infected, is large, then one could add
Exposed state. These models also include models describing transmission of virus when individuals are
vaccinated, and models with individuals’ age structuring.

We consider a simple SIR model consisting of four equations,

𝑑𝑆⁄ = − 𝛽𝐼𝑆
𝑑𝑡
𝑑𝐼⁄ = 𝛽𝐼𝑆 − (𝜇 + 𝛾)𝐼 (1.1)
𝑑𝑡
𝑑𝑅⁄ = 𝜇𝐼
𝑑𝑡
𝑑𝐷⁄ = 𝛾𝐼
𝑑𝑡

Here 𝑆 is the stock of susceptible, 𝐼 is the flow of infected, 𝑅 is the stock of recovered and 𝐷 is the stock of
deceased population.

We assume that at time zero number of infected populations is 0.05%. Rewriting equation for infected individuals
as,

𝑑𝐼⁄ = (𝑅 𝑆 − 1)(𝜇 + 𝛾)𝐼


𝑑𝑡 𝑏

it yields that if 𝑅𝑏 𝑆(0) < 1, then number of infected will decrease with time. Here the basic reproduction number
𝛽
is, 𝑅𝑏 = ⁄𝜇 + 𝛾 . If 𝑅𝑏 ≤ 1 , the disease can never cause a proper epidemic outbreak.

TWO-STRAINS VIRUS MODEL

We assume that there are several strains of pathogen. These pathogens are caused by virus mutation that may
result in a new variant of this virus. Since the beginning of COVID-19 pandemic, the new prominent variants
emerged including Alpha, Delta and Omicron.

Below we present a mathematical model of a two-strain COVID-19 transmission dynamics with strain 1
vaccination. Susceptible individuals 𝑆 can become infected with strain 1 or strain 2. Infected persons are
vaccinated against strain 1. However, vaccinated individuals can acquire COVID-19 strain 2. Infected individuals
recover from both strains, but recovery is not permanent. Following Stéphane Tchoumi et al. (2021), equations
(1.1) can be generalized:

𝑑𝑆⁄ = − (𝛽 𝐼 + 𝛽 𝐼 )𝑆 − 𝑣𝑆
𝑑𝑡 1 1 2 2

6
𝑑𝐼1⁄
𝑑𝑡 = 𝛽1 𝐼1 𝑆 − (𝜇 + 𝛾1 )𝐼1 (1.2)
𝑑𝐼2⁄
𝑑𝑡 = 𝛽2 𝐼2 𝑆 − (𝜇 + 𝛾2 )𝐼2
𝑑𝑅⁄ = 𝜇(𝐼 + 𝐼 ) + 𝑣𝑆
𝑑𝑡 1 2

𝑑𝐷⁄ = 𝛾 𝐼 + 𝛾 𝐼
𝑑𝑡 1 1 2 2

Here 𝐼1 , 𝐼2 are the individuals infected by strains 1 and 2, 𝛽1 , 𝛽2 are the transmission rates of strains 1 and 2, and
𝑣 is the suspected population vaccination rate.

Below we assume that COVID-19 virus mutated to a new strain which is more contagious than the original wild
type, however, is less deadly. The coefficients of daily transmission and death rates are: 𝛽1 = 5.5%, 𝛽2 =
12.3%, and 𝛾1 = 0.02%, 𝛾2 = 0.008%. The recovery rate of infected population for both strains was assumed the
same, 𝛾 = 4% and the vaccination rate was 𝑣 = 0.02%.

Fig.2.1. Diagram of the two-strains SIR model with vaccination forecast. The basic reproduction
numbers of the first the second strains were, 1.29 and 3.37, respectively. The second virus variant
became potent after five quarters since the onset of epidemics. The orange color line shows US data
for active cases of infection and total number of deaths and, the blue color line – forecast. The Y axis
shows percent of population, and the X axis displays time.

V. ERT Model
7
In this section we describe Eichenbaum-Rebelo-Trabandt model. This model embeds epidemiological concepts
into DSGE modelling framework. We start with two-strain SIR model equations. In addition to the standard
channel of infection transmission, the number of newly infected population is affected by an economic activity of
agents,

𝑇𝑡 = 𝜋1 (𝑆1,𝑡 𝑐𝑡𝑆 )(𝐼1,𝑡 𝑐𝑡𝐼 ) + 𝜋2 (𝑆1,𝑡 𝑛𝑡𝑆 )(𝐼1,𝑡 𝑛𝑡𝐼 ) + 𝜋3 (𝑆1,𝑡 𝐼𝑡 ) (2.1)

The first two terms describe infection transmitted thru consumption and work channels. The third term is the
standard equation for virus transmission. We assume that economy is affected by the first strain of COVID-19
virus while the economic effect of the second strain can be neglected. This assumption is corroborated by the
V-shape of output recovery as illustrated by Figure 1.3. The enormous $5.2 trillion U.S. fiscal response to the
COVID-19 pandemic likely has put the economy on a path to recovery. This intervention reduced negative effects
of the second strain infection on economy. Populations of susceptible, infected, recovered, and deceased evolve
according to the equations the epidemiological model (1.2).

ERT model introduces macro variables of suspected, recovered, and infected individuals’ such as consumption
and work hours. The Cobb-Douglass type equation for output 𝑦𝑡 , equations for aggregated consumption 𝑐𝑡 ,
investment 𝑥𝑡 , government spending 𝑔, marginal cost 𝑚𝑐𝑡 , and capital 𝑘𝑡 are standard ones:

𝑦𝑡 = 𝑝𝑡 𝐴 𝑘𝑡1−𝛼 𝑛𝑡𝛼
𝑦𝑡 = 𝑐𝑡 + 𝑥𝑡 + 𝑔
𝑚𝑐𝑡 = 𝐴−1 𝛼 −𝛼 (1 − 𝛼)𝛼−1 𝑤𝑡𝛼 (𝑟𝑡𝑘 )1−𝛼 (2.3)
𝑤𝑡 = 𝛼𝐴𝑚𝑐𝑡 𝑛𝑡𝛼−1 𝑘𝑡1−𝛼
𝑘𝑡+1 = 𝑥𝑡 + (1 − 𝛿)𝑘𝑡

Aggregate equations for consumption 𝑐𝑡 and working hours 𝑛𝑡 of suspected, infected, and recovered are,

𝑐𝑡 = 𝑆1,𝑡 𝑐𝑡𝑆 + 𝐼1,𝑡 𝑐𝑡𝐼 + 𝑅1,𝑡 𝑐𝑡𝑅


𝑛𝑡 = 𝑆1,𝑡 𝑛𝑡𝑆 + 𝐼1,𝑡 𝑛𝑡𝐼 + 𝑅1,𝑡 𝑛𝑡𝑅 (2.4)

Authors introduce utility function of households,

𝑆 𝑆 2 𝜃 𝜃 𝜃
𝑈 = ∑∞ 𝑡 𝐼 𝐼 2 𝑅 𝑅 2
𝑡=0 𝛽 {𝑆𝑡 [log(𝑐𝑡 ) − (𝑛𝑡 ) ] + 𝐼𝑡 [log(𝑐𝑡 ) − (𝑛𝑡 ) ] + 𝑅𝑡 [log(𝑐𝑡 ) − (𝑛𝑡 ) ]} (2.5)
2 2 2

It is subject to budget constraint of household family members,

𝑐𝑡 + 𝜓 = 𝑤𝑡 𝑛𝑡 + 𝑟𝑡𝑘 𝑘𝑡 + 𝜑𝑡 (2.6)

Here 𝜓 is the lump-sum taxes, and 𝜑𝑡 is the firms’ profit. The government finances spending with its income from
taxes.

Eichenbaum et al. (2020a) derived first order conditions by equating derivatives of a Lagrange function to zero.
These derived equations include first-order conditions for consumption and working hours of susceptible,
infected, and recovered individuals, the optimality conditions for price settings and the Taylor rule equation that
links fixed and flexible price economies.

8
CALIBRATION

We calibrated SIR model parameters based on US COVID-19 data. These data display seasonal nature of rate
of infection and deaths – these rates increase in winter and subside in spring. The US average weekly
transmission and weekly death rates since May 2020 are: 𝛽 = 16%, 𝛾 = 0.3%.

Fig.3.1. Rates of infection transmission and death in the United States. These rates are ratios of weekly
changes of the number of current infection cases and death cases to the number of currently infected.

Model parameters 𝜋1 , 𝜋2 , 𝜋3 were computed by solving nonlinear equations,

2
𝜋1 𝑐𝑠𝑠
2 +𝜋 𝑛2 +𝜋 = 1/6
𝜋1 𝑐𝑠𝑠 2 𝑠𝑠 3
2
𝜋2 𝑛𝑠𝑠
2 +𝜋 𝑛2 +𝜋 = 1/6 (2.7)
𝜋1 𝑐𝑠𝑠 2 𝑠𝑠 3

𝑅∞ + 𝐷∞ = 1 − 𝐼∞ = 0.4

9
We assumed that at the beginning of epidemic one third of virus transmission comes from economic activities:
one sixth - from consumption and one sixth - from work. Additionally, we assumed that total number of infected
people at the end of epidemic that are either recovered or dead is 40%.

Equations (2.7) were solved by a constrained optimization method: the lower bound of infection rate 𝜋3 was equal
to the sum of recovery and death rates, 𝜇 + 𝛾.

The calibrated values are: 𝜋1 = 1.5 10−7 , 𝜋2 = 9.4 10−5 , 𝜋3 = 0.5.

VI. Modelling Economic Effects of Epidemic


In this section we present simulations results obtained with the aid of ERT1 model. We assumed that at time zero
there is 0.05% of infected population. Calculations were performed with Juillard et al. (1998) numerical algorithm
applicable to non-linear models. This algorithm solves dynamic macroeconomic models with perfect
foresight expectations of economic agents. Since numerical method can diverge when applied with final
parameters, we solve this model by using homotopy method where we adjusted parameters incrementally step-
by-step.

Fig.4.1. Forecast of infected and deceased. Blue line shows ERT model predictions and orange line
shows the US data. We assumed that epidemic started on February 1st, which coresponds to time zero.
The dotted green and red color lines show infections of strain 1 and 2. X axis displays time in quarters
and Y axis - percentage of population.

1
Authors converted Dynare model file to “yaml” format. The original ERT model code is available at:
https://sites.google.com/site/mathiastrabandt/home/research

10
Fig.4.2. Macroeconomic variables are shown as percentage deviations from their initial steady state.
The blue color lines mark plots of macroeconomic variables for sticky price economy and the dotted red
lines, for flexible price economy.

11
Fig.4.3. Macroeconomic variables are shown as percentage deviations from their initial steady state.

The basic reproduction number can be computed based on rate of infection transmission 𝜋3 , and on weekly
𝜋3
probabilities of recovery 𝜋𝑅 and deaths 𝜋𝐷 ; it is 𝑅𝑏 = = 1. As we have seen before, epidemiological model
𝜋𝑅 +𝜋𝐷
predicts no outbreak of disease in this case. However, because of agent’s economic activities, this reproduction
2 +𝜋 𝑛2 +𝜋
𝜋1 𝑐𝑠𝑠 2 𝑠𝑠 3
number becomes larger: 𝑅𝑏 = = 1.3. This warrants onset of epidemic. The computed peak
𝜋𝑅 +𝜋𝐷
number of infected is 8% and the total number of deaths - 0.3%.

Epidemic negatively affects economy: output drops by staggering 6.5%, aggregate consumption by 8% and
aggregate work hours by 9.6%. Susceptible population experiences the most significant drop compared to
infected and recovered.

VII. GSW Model


ERT model lacks a reference to unemployment - instead, it predicts working hours of individuals. The theory of
unemployment was developed by Gali (2011 a, b). Later it was embedded into the new Keynesian model
framework of Gali, Smets and Wouters (2012). GSW model is comprised of consumption and investment Euler
equations, Calvo model price-settings, price markups equations, un-employment and inflation equations and
monetary policy rule.

GSW model parameters were estimated by Mihailov (2020). GSW model was calibrated based on US quarterly
data for period from 1999Q1 to 2017Q4. These time series included data for real GDP, its deflator, real
consumption, interest rate on lending facilities, employment, and unemployment rates. We corrected elasticity
of investment adjustment cost to 0.2 from its original value of 3.96 to better account for year 2020 output decline.

FORECAST

GSW model1 equations are log linearized. To solve this model equations, we applied a perfect foresight
algorithm. We have seen that COVID-19 shock is both a demand and a supply shock. For illustration purposes
we investigate effects of adverse shocks to labor supply that occur at the first quarter and last for one or two
quarters. The value of these shocks was chosen to make labor supply drop by about 20%.

1 GSW model Dynare code was kindly provided by Alexander Mihailov in a zip archive via e-mail on December 8th,
2020. The Dynare model file was then translated to “yaml” format by authors.

12
Fig.5.1. Forecast of effects of an adverse shock to labor supply on macroeconomic variables. Shocks
occur at the first quarter and last for one or two quarters. Blue and orange color lines show response of
macroeconomic variables to these shocks.

Graphs 5.2-3 present decomposition of deviations of output, work hours, investment, and inflation rate from its
balanced path. Python software analyzes structure of equations and computes contribution of each
endogenous variable and exogenous shock. Those variables and shocks are imposed one at a time to infer
their contribution to macroeconomic variables paths.

To complete this picture, we show graphs of output, work hours, investment, and inflation for an adverse labor
supply shock that lasts two quarters.

13
Fig.5.2. Forecast of an adverse labor supply shock to US economy. Shock occurs at the first quarter and
lasts for one quarter. Vertical axis displays percentage deviation of macroeconomic variables from their
balanced path.

Fig.5.3. Shock to labor supply occurs at the first quarter and lasts for two quarters.

14
JUDGMENTAL ADJUSTMENTS

In this section we present an example of user’s judgmental adjustments 1 to macroeconomic variables. Python
platform allows one to set a specific path of one or more endogenous variables at different time periods. It is
achieved by “exogenizing” endogenous variables and “endogenizing” shock variables. Economic agents
anticipate or don’t anticipate future shocks. We assume that agents make perfect foresight decisions and shocks
are anticipated1. The values of these shocks are computed to bring the path of endogenous variables to the
desired level.

Fig.5.4. Forecast of macro variables with user’s judgmental adjustments of output of 1% for the duration
of three quarters. Adverse shock to labor supply occurs at the first quarter and lasts for two quarters.
User makes a judgmental adjustment on output path. Vertical axis displays percentage deviation of
macroeconomic variables from their balanced path.

1
Assumption of anticipated shocks means that agents make rational expectation decisions on the best information
available.

15
Figure above shows forecast of macroeconomic variables with user’s judgmental adjustments on output. User
makes a judgement that output is 1% for three quarters starting at quarter three. The red color bars show values
of output shocks which result in output path satisfying this judgmental adjustment.

VIII. Concluding Remarks


We have developed a powerful and user-friendly platform for macroeconomic modeling in Python, including tools
for filtering, simulation, estimation, forecasting and model diagnostics for Dynamic Stochastic General Equilibrium
(DSGE) models. This platform can be applied for analysis of New Keynesian models, Real Business Cycle
models, Gap models, and Overlapping Generations models, to name a few. This software is a quite versatile
and a flexible toolbox.

For demonstration purposes we work with a non-linear stationary DSGE model to study macroeconomic effects
of COVID-19 pandemic lockdown and vaccination policies. Our analysis utilizes Eichenbaum-Rebelo-Trabandt
(2020) model which integrates the Neoclassical and the New Keynesian approaches with epidemiological
concepts. The numerical calculations and the subsequent analysis are accomplished with the aid of this Python
software. We study transmission of virus and its effects on country economy. We show that standard
Susceptible-Infected-Recovered compartmental epidemiological model underpredicts rate of infection
transmission and needs to account for virus transmission due to agents’ economic activities.

Eichenbaum-Rebelo-Trabandt model lacks references to unemployment. To compensate for this shortcoming,


we use Gali-Smets-Wouters (2012) linear model which embeds unemployment theory of Gali (2011 a, b). The
effects of virus are accounted for by imposing a shock to labor supply. We ran several simulations including
user’s judgmental assumptions on country output.

Lastly, we apply Python platform to DIGNAR-19 model to assess macroeconomic effects of COVID-19 pandemic.
This model is useful for accessing debt sustainability of resource rich developing countries.

These three examples show capability of Python platform to analyze and forecast DSGE models of small and
medium size economies; they provide economists with a multifaceted view on economic impact of this pandemic.

IX. References
Ali Alichi, Olivier Bizimana, Douglas Laxton, Kadir Tanyeri, Hou Wang, Jiaxiong Yao, Fan Zhang (May 2017),
"Multivariate Filter Estimation of Potential Output for the United States", IMF working paper,
https://www.imf.org/-/media/Files/Publications/WP/2017/wp17106.ashx

Armstrong John, Black Richard, Laxton Douglas, Rose David. (1998), “A robust method for simulating forward-
looking models”, Journal of Economic Dynamics and Control, v.22, pp. 489-501.

Anderson-Moore Algorithm, https://www.federalreserve.gov/econres/ama-index.htm

16
Anderson, G. "A Reliable and Computationally Efficient Algorithm for Imposing the Saddle Point Property in
Dynamic Models." Journal of Economic Dynamics and Control, 2010, vol. 34, issue 3, pp. 472-489.

Cristina Arellano, Yan Bai (2020), “Deadly Debt Crises: COVID-19 in Emerging Markets”, Federal Reserve Bank
of Minneapolis, Staff Report 603,
https://www.minneapolisfed.org/research/staff-reports/deadly-debt-crises-covid-19-in-emerging-markets

Eichenbaum M.S., Rebelo S., Trabandt M. (2020a), “Epidemics in the Neoclassical and New Keynesian Models”.
NBER Working Paper 27430, http://www.nber.org/papers/w27430

Eichenbaum M.S., Rebelo S., Trabandt M. (2020b), “The Macroeconomics of Epidemics”, NBER Working Paper
No. 26882.

Fernando E. Alvarez, David Argente, Francesco Lippi (2020), “A Simple Planning Problem for Covid-19
Lockdown”, NBER Working paper 26981, http://www.nber.org/papers/w26981

Francesca Caselli, Francesco Grigoli, Weicheng Lian, Damiano Sandri (2020), “Protecting Lives and Livelihoods
with Early and Tight Lockdowns”, IMF Working paper.

Dixit, A., Stiglitz, J. (1977), “Monopolistic Competition and Optimum Product Diversity,” American Economic
Review 67, pp. 297—308, https://www.aeaweb.org/aer/top20/67.3.297-308.pdf

Galí, Jordi (2011a): "The Return of the Wage Phillips Curve," Journal of the European Economic Association.

Galí, Jordi (2011b): Unemployment Fluctuations and Stabilization Policies: A New Keynesian Perspective, MIT
Press (Cambridge, MA).

Gali J., Smets F., and Wouters R. (2012). "Unemployment in an Estimated New Keynesian Model”. NBER
Working Paper 17084, https://www.nber.org/papers/w17084

Goodman Jonathan and Weare Jonathan (2010), "Ensemble Samplers with Affine Invariance",
Communications in Applied Mathematics and Computational Science, Volume 5, Number 1, pp. 65-80,
https://projecteuclid.org/download/pdf_1/euclid.camcos/1513731992

Kermack, W., and A. McKendrick. (1927), "A contribution to the mathematical theory of epidemics", Proceedings
of the Royal Society of London, series A., pp.115:700–721.

Klein P. (1997). “Using the Generalized Schur Form to Solve a System of Linear Expectational Difference
Equations,” discussion paper, IIES, Stockholm University, klein@iies.su.se.

Juillard Michel, Laxton Douglas, McAdam Peter, Pioro Hope (1998), “An algorithm competition: First-order
iterations versus Newton-based technique”, Journal of Economic Dynamics and Control, No. 22, pp.1291—
1318, https://www.sciencedirect.com/science/article/pii/S016518899800013X

Melina Giovanni, Yang Shu-Chun S., Zanna Luis-Felipe (2016), "Debt sustainability, public investment, and
natural resources in developing countries: The DIGNAR model", Economic Modelling, v. 52, pp. 630–649.
Elseveir publisher.

17
https://www.sciencedirect.com/science/article/pii/S0264999315002898

Michal Andrle (2007). "Linear Approximation to Policy Function in IRIS Toolbox".


https://michalandrle.weebly.com/uploads/1/3/9/2/13921270/michal_iris_solve.pdf.

Mihailov A. (2020), “Quantifying the Macroeconomic Effects of the COVID-19 Lockdown:


Comparative Simulations of the Estimated Galí-Smets-Wouters Model”. Department of Economics, Economic
Analysis Research Group (EARG). Discussion Paper No. 2020-07, www.reading.ac.uk

Mihailov, A., Razzu, G., Wang, Z. (2019), “Heterogeneous Effects of Single Monetary Policy on Unemployment
Rates in the Largest EMU Economies,” Department of Economics, University of Reading, Economics &
Management Discussion Paper 2019-07.

Michael Binder and M. Hashem Pesaran. (1997), “Multivariate rational expectations models. Characterization of
the Nature of the Solutions and Their Fully Recursive Computation.”
https://www.jstor.org/stable/pdf/3532897.pdf?refreqid=excelsior%3A5e82c86594ec2406dc1607c3c337e0

Paul R. Miles. (2019), “pymcmcstat: A Python Package for Bayesian Inference Using Delayed Rejection Adaptive
Metropolis”, The Journal of Open Source Software, https://joss.theoj.org/papers/10.21105/joss.01417

Samia Ghersheen, Vladimir Kozlov, Vladimir G. Tkachev and Uno Wennergren (2019), “Dynamical behavior of
SIR model with coinfection: the case of finite carrying capacity”, Mathematical Methods in the Applied Sciences,
42(17), 5805-5826; https://doi.org/10.1002/mma.5671

Sebastien Villemot (2011). “Solving Rational Expectations Models at First Order: What Dynare Does.”
https://www.dynare.org/wp-repo/dynarewp002.pdf,

Smets, Frank and Wouters, Rafael. (2007), “Shocks and Frictions in US Business Cycles: A Bayesian DSGE
Approach”, American Economic Review, 97(3), pp.586-606.

Stéphane Tchoumi, Herieth Rwezaula,, Jean M. Tchuenche (2021), “Dynamic of a two-strain COVID-19 model
with vaccination”, Authorea, https://www.authorea.com/doi/full/10.22541/au.163500462.24575457

Ugo Avila-Ponce de León, Eric Avila-Vales, Kuan-Lin Huang (2022), "Modeling COVID-19 dynamic using a
two-strain model with vaccination", Chaos Solitons Fractals. 2022 Apr; 157: 111927;
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8847090/

Coronavirus Source Data, https://ourworldindata.org/coronavirus-source-data

COVID-19 Cases in the United States, https://www.worldometers.info/coronavirus/country/us/#graph-cases-


daily

Epidemiological models overview,


https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology#The_SIR_model

DIGNAR-19 Manual, https://www.imf.org/en/Publications/TNM/Issues/2021/06/23/DIGNAR-19-Toolkit-Manual-


460484

18
DIGNAR-19 Toolkit,
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwi2guuH2IPyAhURZN8K
HcI_B5EQFjABegQIAhAD&url=https%3A%2F%2Fwww.imf.org%2F-
%2Fmedia%2FFiles%2FTopics%2Fsovereign-debt%2Fdignar-19-toolkit.ashx&usg=AOvVaw10UP_79gfz9R-
Z6iyTOq1s

19

You might also like