Code Monkey home page Code Monkey logo

master-thesis's Introduction

Master Thesis: Financial Constraints and Household Heterogeneity in the Macroeconomy

This repository accompanies my master thesis, titled Financial Constraints and Household Heterogeneity in the Macroeconomy and supervised by Prof. Dr. Keith Kuester and Dr. Gregor Böhl. This thesis was presented to the Department of Economics at the Rheinische Friedrich-Wilhelms-Universität Bonn in partial fulfillment of the requirements for the degree of Master of Science (M.Sc.) in Economics. In particular, you can find in this repository the thesis itself and the codes to generate the results as well as the figures found therein.

main.py

This is the main file of the project. The code herein produces the core results of my thesis. Some of the results are used by other code files, such as compare_transitions.py. The code here allows the user to select one or more of the possible combinations of models and shocks. Having set the respective choices, the code loads, adjusts and solves the initial and terminal models, computes the fully non-linear perfect-foresight transition paths and prints various informative plots and tables about the steady states and the transitions. If desired, these results are stored in the folder Results. The transitions can also be stored as pickle files in the end, for easy re-use by compare_transitions.py.

compare_transitions.py

This file contains code which visually compares the transitions produced by different models and shocks. In particular, the user selects the combination of instances to be compared. To compare transitions, these must have been implemented and stored first via the main.py file.

beta_shock.py

This file implements the permanent shock to the household discount factor in the baseline model, as described in appendix E.3 of the thesis.

calibration.py

This file calculates targets for the calibration of the models in the thesis and plots some of the time series.

custom_functions.py

This file contains custom functions used throughout the project.

plot_functions.py

This file contains custom functions for plotting various results throughout the project.

Models

The folder Models contains the models employed by the various code files:

  1. hank_baseline.yml: baseline model
  2. hank_slow_shock.yml: model with high persistence in shock processes
  3. hank_fast_shock.yml: model with low persistence in shock processes
  4. hank_end_L.yml: extended model with CRRA preferences and endogenous labour supply
  5. hank_very_slow_phi.yml: model with very high persistence in borrowing limit
  6. hank_no_ZLB.yml: model without zero-lower bound
  7. hank_low_B.yml: model with low calibration of liquid assets
  8. hank_baseline_beta.yml: baseline model with shock to household discount factor

All of these are to the largest part based on the models from the Econpizza package, which is also used for the model solution. Finally, the Models folder also contains hank_functions.py, which contains functions necessary for the solution of the models and similarly derives almost entirely from an example file in Econpizza.

Results

The folder Results contains the results produced by the main.py file and the custom_functions.py file. The figures and tables are in various subfolders, whose names are meant be indicative for their respective contents. However, it might be much more useful to run the simulations through the files main.py and custom_functions.py to obtain the specific results one desires.

Data

The folder Data contains a CSV file with data on US household balance sheets, obtained from the Federal Reserve website on the Flow of Funds and used by calibration.py.

Thesis

The folder Thesis contains the TeX code of the thesis, its .bib file and its PDF version.


All these codes were run using the Spyder IDE 5.4.3 with Python 3.9.12 and Econpizza 0.6.1 on macOS 12.6.5.

master-thesis's People

Contributors

andkound98 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.