shade-econ / sequence-jacobian

A unified framework to solve and analyze heterogeneous-agent macro models.
MIT License
242 stars 144 forks source link

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

Open feberbo opened 2 weeks ago

feberbo commented 2 weeks ago

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 commented 2 weeks ago

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