Consumer Spending during Unemployment: Positive and Normative Implications
Analysis of Models for “Consumer Spending During Unemployment: Positive and Normative Implications”
By Peter Ganong and Pascal Noel
We thank Xian Ng for outstanding research assistance. Please send feedback and questions to ganong@uchicago.edu.
Directory Structure
code/- all estimation and analysis codeinput/- model estimation targets from JP Morgan Chase Institute (JPMCI) dataout/- code output including figures, logfiles, and raw tablesParameters/- environment parameters for estimation and analysis; stored model estimation resultstables/- formatted tables
Files in the code/ directory
Master Scripts: do_min.py, do_mid.py, do_all.py
The master scripts in the code directory re-run the code. To call the script from the command line, go to the code/ directory and enter ‘python
Setup scripts
setup_estimation_parameters.pyreads inParameters/params_ui_reemp.jsonto build the estimation environmentbuild_JPMC_targets.pybuilds the model estimation targets from files ininput/and writes toParameters/JPMC_inputs.py. It only needs to be run once.
Model Solving, Estimation, and Simulation scripts
solve_cons.py- contains a function that takes environment and preference parameters and computes optimal consumption in each period as a function of cash-on-hand. It solves this problem using backwards induction for a finite horizon.job_search.pyextendssolve_cons.py. Takes environment and preference parameters and computes optimal consumption and job search in each period as a function of cash-on-hand.- Agent chooses search effort with an isoelastic cost and with the gains from search equal to V_emp(a) - V_unemp(a).
- To accomplish the above, we compute a value function which sums over utility in each period. We do not need the value function to compute optimal consumption, but we do need it to compute optimal job search effort.
sparsity.pysolves the sparse model from Gabaix (2016) in the UI context.estimate_models.pytakes environmental parameters and consumption and job search moments and solves for the preference parameters that generate consumption and job search behavior similar to the moments. Relies on the class injob_search.py. By default, solves for the models in the paper one at a time. Can also be used to solve multiple models at once on a cluster.agent_history.pyWith a given set of environmental and preference parameters, simulates employment histories, consumption behavior, and job search behavior for N agents.
Plotting and Replication scripts
model_plotting.pycontains plotting functions.make_plots.pyuses therpy2package to create some wrappers for making PDF plots in R.model_plots.pyproduces plots using the estimated preference parameters contained inParameters/model_params_main.jsonandParameters/model_params_sec.json.model_welfare.pyperforms the simulations for lifecycle welfare analysis.comp_SEs.pycalculates standard errors for estimated models. Note: all output is in the/out/directory.
Other files
est_robust_gamma.pyestimates models with different risk aversion parameters.estimate_models_helper.pycontains helper functions for estimating many models simultaneously on a cluster.grid_submit.shshell script for submitting jobs to a cluster. Edit as necessary.make_plots.pycontains aesthetic options for plots.prelim.pyis a helper script for setting up the model environment.est_models_in/containsinitial_conditions_master.jsonfor estimating the models in the paper. csv files in the directory are examples of different initial conditions for model estimation. Convert to JSON for estimation using function inestimate_models_helper.pyest_models_outlogs final estimates as JSON files when estimating preference parameters for multiple models at the same time on a cluste. Convert to csv using function inestimate_models_helper.py
References
Ganong, P., & Noel, P. (2019). Consumer spending during unemployment: Positive and normative implications. American economic review, 109(7), 2383-2424.
Details
Authors
Abstract
Analysis of Models for "Consumer Spending During Unemployment- Positive and Normative Implications"
Actions
No GitHub repository in metadata.
Metadata
| Key | Value |
|---|---|
| abstract | Analysis of Models for "Consumer Spending During Unemployment- Positive and Normative Implications" |
| authors | {"family-names"=>"Ganong", "given-names"=>"Peter"} {"family-names"=>"Noel", "given-names"=>"Pascal"} |
| cff-version | 1.2.0 |
| message | If you use this software, please cite it as below. |
| references | {"authors"=>[{"family-names"=>"Ganong", "given-names"=>"Peter"}, {"family-names"=>"Noel", "given-names"=>"Pascal"}], "date-released"=># |
| remark-name | GanongNoelUI |
| remark-version | 1.0 |
| repository-code | https://github.com/econ-ark/GanongNoelUI |
| tags | REMARK Replication |
| title-original-paper | Consumer Spending During Unemployment: Positive and Normative Implications |
| date |
