Comments (12)
from hark.
In "ConsRiskyAssetModel.py", I understand there's a RiskyAssetConsumerType which allows for an agent to solve for optimal consumption given they can invest only in a risky asset (so the share=1). There are also "fixedshare" and "portfolio" agent types which allow for fixed or optimal shares.
My question is, when the "IndShockRiskyAssetConsumerType" class is being defined, why isn't the method "get_Rfree" being called/referenced anywhere else in the code? It seems like this method should be called somewhere in one of the solver's for the "RiskyAssetConsumerType".
This is of interest because the other agent types, and presumably solvers as well, are made using "RiskyAssetConsumerType" as the parent class, so they would seemingly inherit this omission. Is the "get_Rfree" method not needed anywhere?
from hark.
from hark.
Is there any concise way of understanding why two programs ("ConsRiskyAssetModel.py" and "ConsPortfolioModel.py") are needed to solve the portfolio problem using HARK?
My current interpretation is that the former is used to define the agent and solver for the case of i) only having access to the risky asset and ii) having a fixed share in the risky asset across the simulation. The latter defines and solves what the end user has in mind when thinking of "optimal portfolio choice". So the former seems to be constructed only for completeness -- to not leave out "special cases" of the more general portfolio choice problem.
If that's true, then why does the more general "portfolio choice" program use the special case as the parent class? From the naive user's perspective, I am just not seeing why the "ConsRiskyAssetModel" is so important. Shouldn't it be that ConsPortfolioModel could standalone and i) and ii) could be implemented in a notebook which imports from ConsPortfolioModel? That would be the meaning of a special case of a more general setting, anyways.
P.S. None of these are major points. I am just reading through HARK's treatment of the portfolio choice problem as a naive end user.
from hark.
A small, related question: A "SequentialPortfolioConsumerType" is defined in "ConsPortfolioModel.py" but there is no doc string which describes what this agent type is. I'm having some issue inferring what the agent type is from its defined methods.
from hark.
from hark.
This is a good point. I think we should call all of these models some variation of "WealthInUtility", and whether we are talking about bequests, savings as luxury, or derived services from wealth (social or political power), depends on the particular interpretation of the user.
from hark.
Two questions:
-
Are there articles in the literature which use a non-separable WUF specification such as the one found here: https://github.com/econ-ark/SolvingMicroDSOPs-LifeCycle/blob/main/content/paper/structural_estimation.pdf ? I have look at the references there but may have missed it. I ask because this is the specification that is implemented in "ConsWealthPortfolioModel.py". This would also point me in the direction of finding papers which explain what "bequests as a luxury good" means.
-
Similar to the point of the previous comment, each of these models are called "bequests", but as I understand it, HARK is not solving an "overlapping generations" model where it keeps tracks of households parents and descendants? If not, then how does HARK keep track of where a households assets go upon death to retain the notion of "bequests"? For ex., if we are modeling bequests, shouldn't I be able to pick out a wealthy household and how much that household left to its replacement during the simulation?
This is why I think calling it wealth-in-utility is nicer; no need to change the way assets are dealt with upon death to fit the implications of a title like bequests... assuming I understand this correctly.
from hark.
Another small comment: In "ConsBequestModel.py", the consumer types are being called "BequestWarmGlowConsumerType" and "BequestWarmGlowPortfolioType" but they are being initialized by the dictionary "init_wealth_in_utility", which has "TermBeqFac = 0". As I understand it, isn't the "warm glow" referring to agents who get some utility from leaving a bequest upon death, which should be in reference to the terminal period (meaning "TermBeqFac > 0")?
Minor point, since the end-user can set the values of these parameters before solving. But a change could make the default settings of the code consistent with the definitions of these terms in the literature.
from hark.
When trying to duplicate what is done here https://github.com/econ-ark/HARK/blob/master/examples/ConsBequestModel/example_ConsIndShockComp.ipynb but for the consumer type with bequest motives and portfolio choice, a bug occurs when setting beq_type.TermBeqFac = 0.
I've made a branch "examples-beq-extensions" which contains the example notebook producing the bug.
from hark.
@dedwar65 just tried to debug this and it solves on my end. Have you tried this again? maybe re-install the environment?
from hark.
@alanlujan91 I just reran it and got the same error. I published a branch called examples-beq-extensions
. There you will find a notebook called example.ConsPortfolioComp.ipynb which replicates the error.
To recap the issue: when I try to make the analog of the example.ConsIndShockComp.ipynb
notebook, there is an issue specific to how the cfunc is defined for portfolio choice (cfunc_adjust).
from hark.
Related Issues (20)
- Configurable mortality and aging in an AgentTypeMonteCarloSimulator HOT 1
- YAML config file to New Python Model Format (NPMF)
- NPMF for ConsIndShock HOT 4
- utilities.py: metadata bug in make_figs() HOT 7
- IndexError when solving ConsPortfolioModel HOT 2
- PermShk's are not random enough HOT 2
- We should not use both `seed` and `RNG`. HOT 4
- ImportError: cannot import name 'generated_jit' from 'numba' HOT 4
- Module not found... numpy? HOT 6
- calc_stable_points is being run when it shouldn't be
- ConsBequestModel and related example notebooks HOT 1
- Improve contributor guide with respect to API documentation
- What is update? How many terminal solutions? HOT 8
- Inheritance... HOT 4
- Proposed constructed input framework HOT 11
- Make sure our links are updated to the new doc website
- Should pytest be a requirement? HOT 3
- IndShockConsumerType.calc_jacobian() changes cFunc_terminal_ HOT 4
- Why does PerfForesightLabeled inherit from ConsIndShock? HOT 7
- DeprFac should be DeprRte
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hark.