Git Product home page Git Product logo

advmacrohet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

advmacrohet's Issues

Negative cash on hand from transitory chock

My question is regarding the third exercise from lecture 1, where a transitory chock is introduced in the model, giving the following budget constraint:

$a_{t}=(1+r)a_{t-1}+wz_{t}-c_{t}+\xi_{t}$

given that $\xi_{t}$ is gaussian it can potentially be very negative and offset all income and savings in a given period giving negative cash-on-hand right?
I'm a bit unsure of how we deal with this, both directly in the code and theoretically.
Theoretically, do we just have a model where each period some fraction of the agents endure negative consumption even though the utility function is not really defined in this space?
If there is a tail-end risk of 0-consumption and infinitely negative utility how does that affect the expected utility in next period?
Implementation wise I ended up choosing a small std of $\xi$ and the number of gauss hermite grid low enough so I never looked at shocks there were more negative than the lowest possible income. But this feels very hacky. (My implementation is in the Exercises folder of my fork: https://github.com/AskerNC/AdvMacroHet )

I feel like I might be missing something here. Hope you can help.

Best regards and thanks in advance,
Asker

Assignment 3 - should we discuss calibration

Hi Jeppe,
This is not really related to the code so perhaps the wrong place to ask this question.

In the assignment, does the part about step-step explanation of analysis include stuff like parameter calibration and how we would solve the model if we had to?

Best,
Jacob

A question about MPC with endogenous labor supply

Hi Jeppe

Ill try one final question if you have time.

How do we compute MPC with endogenous labor supply. As I understand it, we would want income to be unchanged so that we can "shock it" using the code in the HANC model in GEModelToolsNoteBooks.

But how do we compute MPC with endogenous labor supply. Their income is endogenous so we can't shock it in the same way?

We would need to hold labor supply exogenous I think.

Possible typos in assignment

Hi Jeppe

While this may just be me misunderstanding matters, I noticed some weird stuff in the assignment.

  1. In the maximization problem of the household, It is written as if the household only maximizes over their consumption choice.
  2. In the section about handling the liquidity constraint: $c_t$ is set as
    $$c_t = (1+r_t) a_{t-1}+w_t l^{*}_t \zeta_i z_t - c^{*}_t$$

Should the $c^{*}_t$ not be omitted such that we satistfy the FOC for labor and then uses the budget constraint(while consuming all savings) to compute consumption residually.

Zeta in factor in EGM household problem assignment #1

Hi,

I wondered whether there might be a zeta missing in the numerator of the factor tilde(w)z/phi in eq. 8 of the assignment. Is that right? I haven't gone through the math in detail but intuitively I would've thought fixed heterogeneity in productivity should be accounted for there too.

I may v well have missed something though!

Assignment #2: lags and leads in the block code

I seem to have a problem getting the block code to run properly. I have solved for the steady state, and that part is working, but running the model.test_path() command gives results that are very different from the steady state values (although they should be nearly identical).

I have tried to replace all lag() and lead() routines in the block-code by their respective ss. values (e.g. ss.q instead of lag(ini.q,q)). These values should be the same, considering that we are modelling the steady state only. Doing this helps!

So I guess, I have a problem getting the lag() and lead() routines to work properly. I use the exact same form for the routines as in the GEModelToolsNotebooks HANK block file, i.e.

lag(ini.var,var) for lags
lead(var,ss.var) for leads

Can anyone see what I'm doing wrong here?

G in goods market?

Hi,

Maybe I remember my micro badly, or I've made a mistake in my model equations, but solving the model gives me a "K_clearing" and "L_clearing" of 0, but a "C_clearing" of 0.3 - which lead me to conclude that government consumption was missing from the market clearing equation for the goods market, i.e. that it should be:

$$ Y_t = C_t + I_t + G_t $$

This makes sense to me intuitively, however, is this a mistake?

Assumption that mass of agents correspond to the stationary distribution

Hi Jeppe

I was reading the Auclert et al. paper 2021a where they state the assumption the mass of agents always correspond to the stationry distribution. While this assumption seems fairly reasonable in steady state, I am uncertain how to interpret it when we are on the transition path.

Is this simply assuming that shocks are always distributed across agents corresponding to their stationary distribution regardless of other shocks to the economy.

Hope the question was somewhat understandable.

Best,
Jacob

Different methods of solving leading to slightly different solutions

In the assignment I tried a few different ways of solving for the transition path.

I stumbled upon an issue that puzzled me a bit.

I used four targets(model can be solved with less, but this was a test) which was:

  1. Asset Market clearing
  2. NKPC
  3. Taylor Rule
  4. Government budget constraint

How I wrote the government budget constraint matters for the solution. I tried:

  1. $q_t(B_t - \delta B_{t-1}) = B_{t-1} + G_t + \chi_t - \tau_t Y_t$
  2. $q_t = (B_{t-1} + G_t + \chi_t - \tau_t Y_t) /(B_t - \delta B_{t-1})$

With the first option, the linear approximation is fairly close to the non-linear path. That is not the case with the second option. I assume it is because dividing with something close to zero is bad idea numerically.

As a final note, when I solved the model with only two targets (NKPC and asset market clearing), the linear approximation was almost identical to the non-linear path. In all cases, all marking clearing conditions were satisfied and the zero-shock(giving sequence of steady values) seems to pass, but the non-linear path was slightly different between them.

Is the above just an issue of numerical precision?

I am unsure whether I should link the assignment code as this is part of the exam.

Best,
Jacob

Path dependancy in the solution

Hi Jeppe

Some of us seems to have path dependancy in our model solution. That is - using different initial guesses result in different equilibria.

Should we see this as evidence of a code mistake? If not - do we simply choose one equilibrium for display in the assignment?

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.