Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregated micro consumption and macro consumption do not match in a shock #28

Open
feberbo opened this issue Aug 25, 2024 · 4 comments

Comments

@feberbo
Copy link

feberbo commented Aug 25, 2024

I was using the one-asset Hank notebook as a base for checking on consumption on a micro level after a shock.As a sanity check, I tried to see if I was doing the aggregation of micro right.

So I changed the line :
td_nonlin = hank.solve_impulse_nonlinear(ss, unknowns, targets, rstar_shock_path)
to:
td_nonlin = hank.solve_impulse_nonlinear(ss, unknowns, targets, rstar_shock_path, internals=['hh'])
kept the rest of the notebook untouched and added a block below. However they will not match. I have included the whole notebook in a zip file as well.

Am I doing something wrong on this aggregation?

image

hankAggCons2.zip

@feberbo
Copy link
Author

feberbo commented Aug 25, 2024

I have also made an attempt using Dbeg instead of D, but the plot stays mostly the same.

@thom364e
Copy link

Hi,

Did you by any chance ever find the solution to this problem? I'm running into the same problem, so I'm interested in what's going wrong in the aggregation.

Thanks,
Thomas

@feberbo
Copy link
Author

feberbo commented Dec 23, 2024

No I haven't

@thom364e
Copy link

I've played around with it a little, and this turns out to be the solution (shown for my own project, but should apply universally I guess)
image
i.e. when aggregating, you'll have to also use the steady state policy functions, because in the IRF dict, everything is given in terms of deviations from steady state. You can then subtract the steady state level of the variable you want after doing to aggregation to get back to the deviation from steady state.

Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants