Adding stochastic Income
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 8/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 85
- Fork
- 153
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PSLmodels/OG-Core
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
PSLmodels/OG-Core#1218 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PSLmodels/OG-Core
Issue tương tự
-
[BUG]: Compliance rules never see Unity Catalog views as viewsCó thể đã có người làm @wagnercsantos đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
databrickslabs/ontos#1348 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
`forum_pr_poster` action will always return `none` when checking for pre-existing feedback threads, even if a feedback thread already exists.Có thể đã có người làm @pgmzeta đã nhận hôm nay. Đang mởE-Verified P-Major
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
goonstation/goonstation#28259 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
woonstadrotterdam/monumenten#70 ·
Maintainer thường phản hồi trong vòng 15 ngày
-
binding:python bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
The Browser tab fails with a Wayland error when Open Terminal runs from a Wayland desktop sessionĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
open-webui/open-terminal#210 ·