Adding stochastic Income
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 8/100
Direzione di ricerca
This is a design proposal, not a ready task. Start with household.py, aggregates.py, SS.py (inner_loop, SS_solver, run_SS), TPI.py (inner_loop, run_TPI) and parameters.py to see the current structure it describes. Done would mean agreeing on a stochastic-income solution design with maintainers before any code is written. The thread has been idle for about two years and the work has no assignee or pull request.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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:
- Essentially every function can be removed.
- New functions will include those necessary to solve the problem of an individual household.
- e.g., if we look at this code, an updated
household.pywould include the functionssolve_agent()andsolve_value()(and perhapssolve_cohort()) - One will also want a function that defines the utility function of the agent so that is can be changed easily.
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:
- Update
SS.py:
- Remove
euler_equation_solver() - In
inner_loop(), replace lines 309-329 will calls to the relevant functions in household.py that solve the household problem and return policy functions - in
inner_loop(), between lines 329 and 331, insert functions to compute the distribution of agents over the state space (capital, labor supply, age) - In
inner_loop()in lines 331-379, update calls to functions that find economic aggregates to include what needs to be passed to these functions in the stochastic income case (i.e., grids and distributions) - In
SS_solver(), update 533-636 to update calls to aggregate functions. - In
run_SS(), one will want to change some things about initial values passed in to accord with the new solution method for the household problem.
- Update
TPI.py:
- remove the
firstdoughnutring()andtwist_doughnut()functions. - update
inner_loop()to replace lines 410-482 (and what is returned from the function) to work with the new household solution (where one will still loop over the time path in a way similar to the current structure - i.e., with the twist donut) - Update a lot in
run_TPI-- e.g., will need to compute the distribution of the state space at each point on the time path, use updated functions to compute aggregates.
Note also:
- One needs to be careful in stationarizing the value function used for the solution.
- Obviously parameters passed to function calls throughout will likely need to be changed to reflect new parameters used to define the stochastic income process and characteristics of the solution method. This will include changes to
parameters.pyto define new parameters. - One will want to make smart use of starting values - e.g. solving for one agent type/cohort to help inform the starting value for the solution to the next cohort/type if they are solved serially.
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
- Lingua principale
- Python
- Stelle
- 85
- Fork
- 153
- Merge medio
- 1g 19h
- PR unite (30g)
- 19
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PSLmodels/OG-Core
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
PSLmodels/OG-Core#1218 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PSLmodels/OG-Core
Issue simili
-
documentation good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
MarketSquare/robotframework-browser#5479 ·
I maintainer di solito rispondono entro 1 giorno
-
Visual COBOL: missing 11.0 and 12.0, and 9.0 date differs from Rocket Software's lifecycle pageAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
endoflife-date/endoflife.date#11561 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
OCA/l10n-brazil#5602 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation review-2.0.0
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
dkuenzel/meshcore-home-gateway#106 ·
I maintainer di solito rispondono entro 1 giorno