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

Take consumption into account on attention days #38

Closed
sbenthall opened this issue Nov 4, 2021 · 1 comment
Closed

Take consumption into account on attention days #38

sbenthall opened this issue Nov 4, 2021 · 1 comment
Assignees

Comments

@sbenthall
Copy link
Owner

Currently, on an agent's attention day, they compute their share demand by running their Share function on the normalized assets value aNrm.

https://github.com/sbenthall/HARK_ABM_INTRO_public/blob/master/HARK/hark_portfolio_agents.py#L960-L995

But this not a correct use of the Share function, which takes 'cash on hand', mNrm, as an input normally. The Share function takes into account the expectation that some of these resources will be consumed before choosing to invest in the risky asset.

econ-ark/HARK#1064

So, running this function on the aNrm is going to give an incorrect Share value, because it will assume that more of the aNrm have been consumed already. This is not what's going on in the simulation -- the agents will already have consumed on the prior macro day.

We can correct for this by running the Share function on the reconstructed cash on hand, by "giving back" what they consumed in the prior macro day.

asset_normalized = agent.state_now['aNrm'] + agent.control['cNrm']

@sbenthall
Copy link
Owner Author

Need to use sequential portfolio type, now in HARK

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

No branches or pull requests

2 participants