Giter Site home page Giter Site logo

andkound98 / macro-research-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 1.17 MB

Material of my project paper on Representative-Agent NK vs Two-Agent NK models | Winter 2022 | University of Bonn

Python 100.00%
economics macroeconomics tank-model econpizza

macro-research-project's Introduction

The Dynamic Consequences of Technology and Discount Factor Shocks in Medium-Scale RANK vs TANK Models

By the end of January, I will collect in this repository the relevant material for the project I submit in January 2023 for the Research Module "Macroeconomics and Public Economics" in the Economics Master's programme at the University of Bonn.

In brief, the paper contrasts a two-agent New Keynesian model (TANK) to an otherwise unchanged non-linear medium-scale representative-agent New Keynesian model (RANK) by first discussing the changes needed to obtain the two-agent structure and consequently implementing the two models computationally to solve for the dynamics of TANK and RANK after two distinct shocks.

run_models.py

This code file implements the analyses of subsections 4.1 and 4.2 of the paper and produces the plots found therein.

The code first loads the files in which the RANK and TANK models are stored (from the models folder), then solves for the steady state of the respective model by the means of root-finding. Thereafter, one of the shocks is initiated, which is done by setting one of the two disturbances equal to $0.02$ (other values are also possible) in $t = 1$.

As a next step, the resulting (non-linear) equilibrium dynamics, i.e. the impulse responses to each of the shock are solved for, thereby guaranteeing that all variables return to their respective steady state within a prescribed period of time. The results for some key variables, on the aggregate as well as on the individual level, are then plotted. If desired, one can plot all variables' impulse responses as well.

run_tank_loop_eta_lambda.py

This file conducts the analysis of subsection 4.3. In particular, the code runs a double loop, which iterates over a sequence of values for $\eta$, thereby solving in each step the RANK model with that given value of $\eta$. In each iteration, the code also loops over a sequence of values for $\lambda$ in TANK and computes the corresponding TANK models. With this approach, each of the TANK models with a different value for $\lambda$ can be compared to a respective RANK model with the same choice for $\eta$.

Finally, the code produces the plots for figure 5 of the paper.

Note that this code takes roughly six minutes to complete for each shock separately.


All codes were run using the Spyder IDE 5.3.3 with Python 3.9.12 and econpizza 0.4.2 on macOS 12.6.1.

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.