PSLmodels / OG-Core

An overlapping generations model framework for evaluating fiscal policies.
https://pslmodels.github.io/OG-Core/
Creative Commons Zero v1.0 Universal
68 stars 119 forks source link

Adding stochastic Income #314

Open jdebacker opened 7 years ago

jdebacker commented 7 years ago

An addition to this model that @jorgebarro is working on is to incorporate stochastic income processes into the model. This necessitates changing the solution method and thus some of the structure of the computational solutions. This issue discusses the entry points into the OG-USA source code for modules/functions that will allow for stochastic income processes to be included into the model.

In household.py:

Because household solution would now rely on methods that involve solving the problem over a discrete grid, the household solution would return policy functions defining savings and labor supply for each point on that grid. These would be used together with the distribution of the population over these grid points to solve for economic aggregates. Thus in aggregates.py, all functions would need to be updated to sum across these grids, where the sums include the sum weighted implied by the distribution of agents over the grid points in the capital-labor supply grids and over age (as given by the omega matrix (or array in the time path).

A new model should be created to store functions related to the computation of the distribution of agents over the grid points in the capital-labor supply state spaces. Such a module would include a function to solve for the stationary distribution over these grid points as well as over age. This function would take in the omega_SS matrix and the policy functions to find the stationary distribution for the steady state. Another function would compute the distribution over these points from the initial state over the time path using the omega array that gives the exogenous distribution of households by age over each period in the time path. These distributions would be used in the aggregation functions outlined above.

With the above in place, one would alter the OG-USA code in a few ways: 1) Update SS.py:

2) Update TPI.py:

Note also:

There may be some things I left out, but this should help in conceptualizing how the stochastic income solution method will enter the current model.

cc @rickecon

jdebacker commented 4 months ago

Work happening on this in the stochastic_income branch. Finally. Thanks to @john-p-ryan!

jorgebarro commented 4 months ago

Wow--great to see it picking up some traction!