Giter VIP home page Giter VIP logo

hactrep.jl's Introduction

HACTRep

Build Status Codecov

Please see the folder Explanation for a document with a detailed explanation of the model and some graphs with the results.

In this repository I replicate most of the paper "Income and wealth distribution in macroeconomics: a continuous-time approach" by Achdou et al. This papers has basic algorithms to solve heterogeneous agents models in continuous time. I focus in 3 parts: i) a Huggett economy, for which I calculate the policy functions and the equilibrium interest rate, ii) MIT shocks in the context of the Huggett model, and iii) the Huggett model including housing, which introduces non-convexities.

Most of the functions have two inputs: interest rate and the probability of keeping high income. This is a list of the functions:

  • HJBequation(r0, lambda2): calculates the policy functions for a Huggett economy
  • KF(a,z,A): after calculating the policy functions, KF takes as arguments the state variables and the matrix A to calculate the stationary distribution
  • AssetSupply(): calculates the net supply of bonds for an interval of interest rates
  • equilibriumR(lambda2): calculates the equilibrium interest rate (net supply = 0) for a given value of the parameter lambda2

Now the functions to estimate the transition dynamics of a MIT shock:

  • TimeHJBequation(rl, resultsT,T,lambda2): calculates the policy functions for each period between 0 and T, given the policy functions for the new steady state (resultsT) and a path for the interest rate (rl)
  • TimeKF(a,z,A,g0,rl,T): calculates the distributions for each period between 0 and T. Takes as arguments the state variables, the matrices A for each period, the path of interest rate and the maximum time (T) to consider
  • shockSim(): estimates the transition dynamics between to moments when lambda2 changes.

Finally, the model with housing has two functions:

  • HJBequationHousing(r0, lambda2): calculates the policy functions
  • KFHousing(a,z,A): calculates the distribution in steady state

hactrep.jl's People

Contributors

sebastiangomez87 avatar

Watchers

James Cloos avatar  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.