Allow a supplied initial distribution of wealth in the transition - #1209
Open
arihantlodha-cmd wants to merge 1 commit into
Open
Allow a supplied initial distribution of wealth in the transition#1209arihantlodha-cmd wants to merge 1 commit into
arihantlodha-cmd wants to merge 1 commit into
Conversation
The time path solver initializes the t=0 distribution of household wealth from the steady-state distribution, scaled so its aggregate matches the steady-state B. That assumes the economy starts already at its steady-state age-wealth profile. For a country whose model start-year age structure is far from its steady state, such as a rapidly aging population, that profile is a poor initial condition and can leave a small resource-constraint residual in the first periods of the path. This adds an optional hook to supply an observed initial distribution instead. A new boolean use_initial_b_dist gates a new SxJ array initial_b_dist; when the flag is set, get_initial_SS_values takes the shape of the initial wealth distribution from initial_b_dist rather than the steady state. The aggregate is still rescaled to the steady-state B, so only the cross-sectional shape is overridden. The default leaves the flag off and reproduces the previous initial_b exactly, so existing runs are unchanged. Adds test_get_initial_SS_values_custom_dist covering the aggregate-preserving and shape-override behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The time path solver initializes the t=0 distribution of household wealth from the steady-state distribution, scaled so its aggregate matches the steady-state B. That assumes the economy starts already at its steady-state age-wealth profile. For a country whose model start-year age structure is far from its steady state, such as a rapidly aging population, that profile is a poor initial condition and can leave a small resource-constraint residual in the first periods of the path.
This adds an optional hook to supply an observed initial distribution instead. A new boolean
use_initial_b_distgates a new SxJ arrayinitial_b_dist; when the flag is set,get_initial_SS_valuestakes the shape of the initial wealth distribution frominitial_b_distrather than the steady state. The aggregate is still rescaled to the steady-state B, so only the cross-sectional shape is overridden. The default leaves the flag off and reproduces the previousinitial_bexactly, so existing runs are unchanged.Adds
test_get_initial_SS_values_custom_distcovering the aggregate-preserving and shape-override behavior; the existingtest_get_initial_SS_valuesregression cases and the parameter/util tests pass unchanged.