pandemic

Analysis of the household consumption response to the Covid-19 crisis and the CAREs Act response

https://github.com/econ-ark/pandemic

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.5%) to scientific vocabulary

Keywords from Contributors

economics
Last synced: 7 months ago · JSON representation ·

Repository

Analysis of the household consumption response to the Covid-19 crisis and the CAREs Act response

Basic Info
  • Host: GitHub
  • Owner: econ-ark
  • Language: TeX
  • Default Branch: master
  • Size: 149 MB
Statistics
  • Stars: 20
  • Watchers: 5
  • Forks: 9
  • Open Issues: 2
  • Releases: 1
Created almost 6 years ago · Last pushed 10 months ago
Metadata Files
Readme Citation

README.md

Pandemic-ConsumptionResponse

This repository is a complete software archive for the paper "Modeling the Consumption Response to the CARES Act" by Carroll, Crawley, Slacalek, and White (2020). This README file provides instructions for running our code on your own computer, as well as adjusting the parameters of the model to produce alternate versions of the figures in the paper.

Reproduce using nbreproduce.

This repository and the paper can be reproduced using nbreproduce and the corresponding docker image of this repository.

$ nbreproduce --docker econark/pandemic

REPRODUCTION INSTRUCTIONS in your local environment.

  1. All of the code for the project is written in Python 3, and is intended to be run in an iPython graphical environment. Running the main script outside of iPython may cause unintended consequences when figures are created.

  2. The easiest way to get iPython running on your computer is to use the Anaconda distribution of Python, available for download at https://www.anaconda.com/distribution/

  3. The code for this project uses the Heterogeneous Agents Resources and toolKit to solve and simulate our model. To install HARK, open a console (on Windows, use the Anaconda Prompt) and run pip install econ-ark==0.10.7. This will put HARK and all of its dependencies in your Python package library. HARK is still under development, so we strongly recommend you use this exact version in order to ensure the code runs properly.

  4. All code files are in the ./Code/Python/ subdirectory of this repository. If you've installed Anaconda, our code can be run in a graphical iPython environment by opening up the Spyder IDE.

  5. The main script for this project is GiveItAwayNowMAIN.py. You can run this file by clicking the green arrow "run" button in Spyder's toolbar. Text will print to screen as it completes various computational tasks. Most of these take about 3 minutes to run on a modern desktop, but there are many of them. The figures are produced after running all counterfactual scenarios, and the entire run time is about 75 minutes. Our main results hold when many fewer simulated agents are used (say, 50,000 versus the 1,000,000 used in the code).

  6. We recommend that you instead run the script GiveItAwayNowMINI.py, which produces a smaller number of figures (and thus runs a smaller number of counterfactuals), saving the results to a subdirectory of ./Figures/ given by specname at the top of `parameterconfig.py`.

  7. All figures are saved to the ./Figures subdirectory.

  8. All parameters can be adjusted in ./Code/Python/parameter_config.py, and are described below. Each parameter should have an in-line description to give you a pretty good sense of what it does.

STRUCTURAL PARAMETERS

  1. The parameters for the project are defined in parameter_config.py and imported en masse into Parameters.py; they are divided into several blocks or types of parameters.

  2. The distribution of the intertemporal discount factor (beta) is defined by the parameters in the first block. For each education level, we specify the center of a uniform distribution; the half-width of the distribution is the same for all education levels (DiscFacSpread).

  3. The second block of parameters is the largest, concerning what happens when the pandemic strikes. This includes the marginal utility scaling factor during the "lockdown", the real and perceived duration of deep unemployment spells and the "lockdown", and coefficients for the logit probabilities of employment and deep employment (see paper appendix). It also includes a boolean to indicate whether the lifting of the lockdown should be simulated as an idiosyncratic event (as in the paper, to synthesize an average consumption path) or as a common event shared across all agents (to see what happens with a particular timing of the return to normalcy).

  4. The third parameter block specifies the terms of the fiscal stimulus package (CARES Act), including the timing of the stimulus checks relative to announcement, the size of the stimulus checks, the term of the income-based means testing, the size of additional unemployment benefits, and the proportion of the population who notices and reacts to the announement of the stimulus before the checks actually arrive in their bank account. Note that all values are specified in thousands of dollars, and the model is quarterly.

  5. The fourth parameter block includes basic model parameters like the population growth rate, aggregate productivity growth rate, and a description of "normal" unemployment (and benefits).

  6. The fifth parameter block specifies the initial distribution of permanent income for each education level and the share of the education levels in the population.

  7. The remaining parameters specify the density of the grid that the problem is solved on and the discretization of the income shocks (for computing expectations).

  8. Most parameters in Parameters.py should not be adjusted, as they concern objects constructed from the primitive parameters defined above or basic features of the lifecycle (such as the number of periods in the problem). The number of periods simulated in the counterfactuals and the total number of simulated households can be safely changed.

  9. Because of rounding, the actual number of simulated agents might be slightly different than the number of agents specified in Parameters.py. Agents are heterogeneous in their education level and intertemporal discount factor; the fraction of each type times the total number of agents is unlikely to result in a whole number, so the result is rounded. Summed across types, these rounded values do not necessarily sum to the requested number of agents.

Owner

  • Name: Econ-ARK Team
  • Login: econ-ark
  • Kind: organization

Citation (CITATION.cff)

cff-version: "1.2.0"
message: "To predict the effects of the 2020 U.S. CARES Act on consumption, we extend a model that matches responses of households to past consumption stimulus packages; all results are paired with illustrative numerical solutions."
authors:
  - family-names: "Carroll"
    given-names: "Christopher D."
    orcid: "https://orcid.org/0000-0003-3732-9312"
  - family-names: "Crawley"
    given-names: "Edmund"
  - family-names: "Slacalek"
    given-names: "Jiri"
  - family-names: "White"
    given-names: "Matthew N."
title: "Modeling the Consumption Response to the CARES Act"
abstract: "To predict the effects of the 2020 U.S. CARES Act on consumption, we extend a model that matches responses of households to past consumption stimulus packages. The extension allows us to account for two novel features of the coronavirus crisis. First, during the lockdown, many types of spending are undesirable or impossible. Second, some of the jobs that disappear during the lockdown will not reappear when it is lifted. We estimate that, if the lockdown is short-lived, the combination of expanded unemployment insurance benefits and stimulus payments should be sufficient to allow a swift recovery in consumer spending to its pre-crisis levels. If the lockdown lasts longer, an extension of enhanced unemployment benefits will likely be necessary if consumption spending is to recover."

references:
  - type: article
    authors:
      - family-names: "Carroll"
        given-names: "Christopher D."
        orcid: "https://orcid.org/0000-0003-3732-9312"
      - family-names: "Crawley"
        given-names: "Edmund"
      - family-names: "Slacalek"
        given-names: "Jiri"
      - family-names: "White"
        given-names: "Matthew N."
    title: "Modeling the Consumption Response to the CARES Act"
    doi: "10.3386/w27876"
    date-released: 2020-09-14
    publisher:
        name: "NBER"
repository-code: https://github.com/econ-ark/Pandemic

keywords: # optional
  - Consumption
  - COVID-19
  - Stimulus
  - Fiscal Policy

GitHub Events

Total
  • Issue comment event: 1
  • Push event: 2
  • Pull request event: 2
Last Year
  • Issue comment event: 1
  • Push event: 2
  • Pull request event: 2

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 175
  • Total Committers: 6
  • Avg Commits per committer: 29.167
  • Development Distribution Score (DDS): 0.08
Past Year
  • Commits: 3
  • Committers: 2
  • Avg Commits per committer: 1.5
  • Development Distribution Score (DDS): 0.333
Top Committers
Name Email Commits
llorracc g****t@l****g 161
Mridul Seth s****b@g****m 5
Cameron Riddell c****n@d****o 4
Mridul Seth s****l@g****m 3
akshay_shanker a****r@i****m 1
Christopher Carroll c****l@c****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 2
  • Total pull requests: 16
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 2
  • Total pull request authors: 5
  • Average comments per issue: 11.5
  • Average comments per pull request: 0.63
  • Merged pull requests: 11
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 2.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • alanlujan91 (1)
  • derrickhatcher (1)
Pull Request Authors
  • MridulS (8)
  • camriddell (5)
  • llorracc (4)
  • akshayshanker (2)
  • dependabot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (1)

Dependencies

reproduce/Dockerfile docker
  • $BASE_CONTAINER latest build
requirements.txt pypi
  • bqplot ==0.12.36
  • econ-ark ==0.10.7
  • ipywidgets ==8.0.3
  • numpy ==1.19.1
  • pandas ==1.1.1
  • pyyaml *
  • scipy ==1.5.2
  • voila ==0.4.0