-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Why doesn't checkConditions() work in ConsPortfolioModel? #416
Comments
There are two AgentTypes defined in
(1) subclasses
(2) Subclasses HARK/HARK/ConsumptionSaving/ConsPortfolioModel.py Line 1422 in d1a8eb9
If you can confirm the desired behavior here (subclassing |
I'm finishing up a wholesale re-write of ConsPortfolioModel right now.
From copy-pasting bits of code, I had preserved this weird code blip until
just now, but it's not necessary. I've fixed it in my version.
…On Fri, Mar 13, 2020 at 5:00 PM Sebastian Benthall ***@***.***> wrote:
There are two AgentTypes defined in ConsPortfolioModel
1. PortfolioConsumerType
2. LogNormalPortfolioConsumerType
(1) subclasses IndShockConsumerType, but its initializer does not use
super() to get the superclass; instead it calls the initializer of
PerfForesightConsumerType. I expect that this is an error.
https://github.com/econ-ark/HARK/blob/d1a8eb90ebe34a93801ead8655b5e29ef9d1e3eb/HARK/ConsumptionSaving/ConsPortfolioModel.py#L409
(2) Subclasses PerfForesightConsumerType and then uses the
PerfForesightConsumerType initializer.
https://github.com/econ-ark/HARK/blob/d1a8eb90ebe34a93801ead8655b5e29ef9d1e3eb/HARK/ConsumptionSaving/ConsPortfolioModel.py#L1422
If you can confirm the desired behavior here (subclassing
ConsIndShockConsumerType properly at (1).... any change to (2)?) I'll
work these changes in to #568 <#568>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#416 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFKMSCU2NJZ3LRXWSJ3RHKNGTANCNFSM4JF3SSWA>
.
|
Ok. I'll reassign this issue to you, since it sounds like it will best be checked/solved in your rewrite. |
Ack, I have no idea about checkConditions, I was just responding to your
inheritance comment. I have no idea how checkConditions should work for
ConsPortfolioType.
…On Fri, Mar 13, 2020 at 5:09 PM Sebastian Benthall ***@***.***> wrote:
Assigned #416 <#416> to @mnwhite
<https://github.com/mnwhite>.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#416 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFMD34DEQ75NCWIAIVLRHKOHJANCNFSM4JF3SSWA>
.
|
I don’t think anybody has done the theory to determine what the proper
conditions are for the version with portfolio choice.
I’m pretty sure it would not be hard, but until it has been done I think we
have two options:
1. nullify the checkConditions code inherited from ConsIndShockType
2. Keep that code, but print a preliminary message from within the
Portfolio type warning that the conditions being checked are for the
version of the model where the rate of return is the riskless rate.
I’d prefer option 2, because:
1. It is likely to be useful to users to know what the properties are of
the model without the risky portfolio share;
2. It is probably easier than figuring out how to nullify the
checkConditions code
On Fri, Mar 13, 2020 at 5:20 PM Matthew N. White <[email protected]>
wrote:
… Ack, I have no idea about checkConditions, I was just responding to your
inheritance comment. I have no idea how checkConditions should work for
ConsPortfolioType.
On Fri, Mar 13, 2020 at 5:09 PM Sebastian Benthall <
***@***.***>
wrote:
> Assigned #416 <#416> to @mnwhite
> <https://github.com/mnwhite>.
>
> —
> You are receiving this because you were assigned.
> Reply to this email directly, view it on GitHub
> <#416 (comment)>, or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/ADKRAFMD34DEQ75NCWIAIVLRHKOHJANCNFSM4JF3SSWA
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#416 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKCK7ZITBD4BGRRUWSMJZTRHKPSLANCNFSM4JF3SSWA>
.
--
- Chris Carroll
|
I'ts trivial to "nullify" checkConditions. We do this for other classes.
On Fri, Mar 13, 2020 at 6:14 PM Christopher Llorracc Carroll <
[email protected]> wrote:
… I don’t think anybody has done the theory to determine what the proper
conditions are for the version with portfolio choice.
I’m pretty sure it would not be hard, but until it has been done I think we
have two options:
1. nullify the checkConditions code inherited from ConsIndShockType
2. Keep that code, but print a preliminary message from within the
Portfolio type warning that the conditions being checked are for the
version of the model where the rate of return is the riskless rate.
I’d prefer option 2, because:
1. It is likely to be useful to users to know what the properties are of
the model without the risky portfolio share;
2. It is probably easier than figuring out how to nullify the
checkConditions code
On Fri, Mar 13, 2020 at 5:20 PM Matthew N. White ***@***.***
>
wrote:
> Ack, I have no idea about checkConditions, I was just responding to your
> inheritance comment. I have no idea how checkConditions should work for
> ConsPortfolioType.
>
> On Fri, Mar 13, 2020 at 5:09 PM Sebastian Benthall <
> ***@***.***>
> wrote:
>
> > Assigned #416 <#416> to
@mnwhite
> > <https://github.com/mnwhite>.
> >
> > —
> > You are receiving this because you were assigned.
> > Reply to this email directly, view it on GitHub
> > <#416 (comment)>, or
> > unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/ADKRAFMD34DEQ75NCWIAIVLRHKOHJANCNFSM4JF3SSWA
> >
> > .
> >
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#416 (comment)>, or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAKCK7ZITBD4BGRRUWSMJZTRHKPSLANCNFSM4JF3SSWA
>
> .
>
--
- Chris Carroll
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#416 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFIR4CU3YVHHJBXKUTLRHKV5RANCNFSM4JF3SSWA>
.
|
OK. I still prefer option 2, though -- partly as a reminder that somebody
should do the theory!
On Fri, Mar 13, 2020 at 6:16 PM Matthew N. White <[email protected]>
wrote:
… I'ts trivial to "nullify" checkConditions. We do this for other classes.
On Fri, Mar 13, 2020 at 6:14 PM Christopher Llorracc Carroll <
***@***.***> wrote:
> I don’t think anybody has done the theory to determine what the proper
> conditions are for the version with portfolio choice.
>
> I’m pretty sure it would not be hard, but until it has been done I think
we
> have two options:
>
> 1. nullify the checkConditions code inherited from ConsIndShockType
> 2. Keep that code, but print a preliminary message from within the
> Portfolio type warning that the conditions being checked are for the
> version of the model where the rate of return is the riskless rate.
>
> I’d prefer option 2, because:
>
> 1. It is likely to be useful to users to know what the properties are of
> the model without the risky portfolio share;
> 2. It is probably easier than figuring out how to nullify the
> checkConditions code
>
>
> On Fri, Mar 13, 2020 at 5:20 PM Matthew N. White <
***@***.***
> >
> wrote:
>
> > Ack, I have no idea about checkConditions, I was just responding to
your
> > inheritance comment. I have no idea how checkConditions should work for
> > ConsPortfolioType.
> >
> > On Fri, Mar 13, 2020 at 5:09 PM Sebastian Benthall <
> > ***@***.***>
> > wrote:
> >
> > > Assigned #416 <#416> to
> @mnwhite
> > > <https://github.com/mnwhite>.
> > >
> > > —
> > > You are receiving this because you were assigned.
> > > Reply to this email directly, view it on GitHub
> > > <#416 (comment)>, or
> > > unsubscribe
> > > <
> >
>
https://github.com/notifications/unsubscribe-auth/ADKRAFMD34DEQ75NCWIAIVLRHKOHJANCNFSM4JF3SSWA
> > >
> > > .
> > >
> >
> > —
> > You are receiving this because you authored the thread.
> > Reply to this email directly, view it on GitHub
> > <#416 (comment)>,
or
> > unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/AAKCK7ZITBD4BGRRUWSMJZTRHKPSLANCNFSM4JF3SSWA
> >
> > .
> >
>
>
> --
> - Chris Carroll
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#416 (comment)>, or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/ADKRAFIR4CU3YVHHJBXKUTLRHKV5RANCNFSM4JF3SSWA
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#416 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKCK72QYJLKHH5GJZBQERDRHKWDBANCNFSM4JF3SSWA>
.
--
- Chris Carroll
|
The lecture notes may have the necessary math. |
The check_conditions() method has been significantly revised and improved since this issue was last touched. Unfortunately, it's not properly nulled out in child models (like ConsPortfolioModel). This still needs to be fixed, in one of two ways:
|
My understanding is that ConsPortfolioModel should just build on top of everything in ConsIndShockConsumerType, which would include the .checkConditions() method. While the method seems to be there, e.g. in the pcct instance of PortfolioConsumerType in ConsPortfolioModelDoc, it doesn't do anything. (I was looking at this because the conditions actually should be adjusted when the rate of return is risky).
@pkofod @mnwhite probably know the answer ...
The text was updated successfully, but these errors were encountered: