Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 1 point for degenerate income distributions #1115

Merged
merged 2 commits into from
Feb 23, 2022

Conversation

Mv77
Copy link
Contributor

@Mv77 Mv77 commented Feb 21, 2022

This PR modifies the engines for transitory and permanent income shocks so that if the distribution is degenerate (sigma == 0.0) they use only one point to approximate it. This is useful, for instance, in retirement.

Currently, with TranShkCount and PermShkCount being constant, multiple points are being used even if sigma==0.0. This behavior was probably my own making, in my recent updates.

  • Tests for new functionality/models or Tests to reproduce the bug-fix in code.
  • Updated documentation of features that add new functionality.
  • Update CHANGELOG.md with major/minor changes.

@alanlujan91
Copy link
Member

YES! This is a great PR @Mv77! Was just talking to @iworld1991 about how I always have to remember to set PermShkCount = 1 when a random process is shut down.

This can also help when comparing RiskyAsset solutions when we shut down uncertainty.

@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2022

Codecov Report

Merging #1115 (731e9a9) into master (ea73795) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1115   +/-   ##
=======================================
  Coverage   73.83%   73.83%           
=======================================
  Files          69       69           
  Lines       10636    10636           
=======================================
  Hits         7853     7853           
  Misses       2783     2783           
Impacted Files Coverage Δ
HARK/ConsumptionSaving/ConsIndShockModel.py 85.82% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea73795...731e9a9. Read the comment docs.

@Mv77
Copy link
Contributor Author

Mv77 commented Feb 21, 2022

Ha! Thanks for the endorsement!

@sbenthall
Copy link
Contributor

Review discussion on Feb. 23 2022 : It's a little odd how this interacts with the baked-in constant income for retirement, but as it stands this PR is just fine and should be merged.

@sbenthall sbenthall merged commit 413e6d6 into econ-ark:master Feb 23, 2022
@sbenthall sbenthall added this to the 0.13.0 milestone Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants