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

MrkvNow into model state shocks['Mrkv'] in AggShockMarkov and KrusellSmith models #935

Merged
merged 3 commits into from
Feb 7, 2021

Conversation

sbenthall
Copy link
Contributor

Fixes #933.

In the AggShockMarkov and KrusellSmith agents and associated economies, the MrkvNow property was being set as an object attribute, despite being a model variable. It's an aggregate property in both cases.

This PR replaces these with a shock Mrkv. This is small progress towards #920, which otherwise can be done with simple search-and-replace operations.

Mrkv is a shock and not a state in this implementation because the way Market interactions with the Agent currently works, if the Market sets and agent state in its sow step, it will be rolled over into the state_prev namespace during the simulation in the cultivate step. Because here the Mrkv state really is exogenous to the agent, shocks seems more appropriate, though I hope we can scaffold this a bit better in, say, v1.1

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

@sbenthall sbenthall mentioned this pull request Jan 29, 2021
3 tasks
@sbenthall
Copy link
Contributor Author

Needs CHANGELOG. Merge after.

@sbenthall sbenthall merged commit 0a0daf8 into econ-ark:master Feb 7, 2021
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.

refactor MrkvNow into model state variable in ConsAggShockModel
1 participant