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

Perfect Foresight MIT Shock Option Added #1013

Merged
merged 12 commits into from
Jul 13, 2021
Merged

Perfect Foresight MIT Shock Option Added #1013

merged 12 commits into from
Jul 13, 2021

Conversation

wdu9
Copy link
Collaborator

@wdu9 wdu9 commented May 25, 2021

Please ensure your pull request adheres to the following guidelines:

  • 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.

@project-bot project-bot bot added this to Needs Triage in Issues & PRs May 25, 2021
self.t_cycle[
which_agents
] = 0 # Which period of the cycle each agent is currently in

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think about whether you need to add a test for whether the PerfMITShk variable exists, like:

if hasattr(self, 'PerfMITShk'):

before using the variable

@@ -1577,7 +1578,7 @@ class PerfForesightConsumerType(AgentType):
MPCmax=1.0,
)
time_vary_ = ["LivPrb", "PermGroFac"]
time_inv_ = ["CRRA", "Rfree", "DiscFac", "MaxKinks", "BoroCnstArt"]
time_inv_ = ["CRRA", "Rfree", "DiscFac", "MaxKinks", "BoroCnstArt", "PerfMITShk" ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make PerfMITShk something like tolerance which the user does not have the option of causing to be a time_varying thing at all.

@codecov-commenter
Copy link

Codecov Report

Merging #1013 (34a343b) into master (db6d206) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1013   +/-   ##
=======================================
  Coverage   71.78%   71.78%           
=======================================
  Files          64       64           
  Lines        9300     9301    +1     
=======================================
+ Hits         6676     6677    +1     
  Misses       2624     2624           
Impacted Files Coverage Δ
HARK/ConsumptionSaving/ConsIndShockModel.py 85.86% <100.00%> (+0.01%) ⬆️

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 db6d206...34a343b. Read the comment docs.

@@ -25,7 +25,7 @@ PR: [#832](https://github.com/econ-ark/HARK/pull/832). See [this forthcoming REM
* Using Lognormal.from_mean_std in the forward simulation of the RiskyAsset model [#1019](https://github.com/econ-ark/HARK/pull/1019)
* Fix bug in DCEGM's primary kink finder due to numpy no longer accepting NaN in integer arrays [#990](https://github.com/econ-ark/HARK/pull/990).
* Add a general class for consumers who can save using a risky asset [#1012](https://github.com/econ-ark/HARK/pull/1012/).

Add Boolean attribute 'PerfMITShk' to PerfForesightConsumerType. When true, allows perfect foresight MIT shocks to be simulated. [#1013](https://github.com/econ-ark/HARK/pull/1013).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Novice users might not realize that adding this to PerfForesightConsumerType also adds it to most of our other consumption models, because most of them inherit from PerfForesightConsumerType. Revise this to be vaguer: "most consumption models" instead of "PerfForesightConsumerType"

@llorracc llorracc merged commit 83f1b8b into econ-ark:master Jul 13, 2021
Issues & PRs automation moved this from Needs Triage to Done Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Issues & PRs
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants