-
-
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
replace AgentType.sim_one_period with a generic Monte Carlo simulator that consumes equations #1295
Comments
The FrameAgentType was an attempt at this. The problem with it, noted by @mnwhite , is that the configuration of the FrameAgentType is too complex. https://github.com/econ-ark/HARK/blob/master/examples/FrameAgentType/FrameModels.ipynb Something simpler, like a dictionary of lambdas, would be easier to read and write. |
Here's the off-the-top-of-my-head draft of a format to specify the mechanics of ConsIndShock:
The simulator should be able to take a statement like this and implement it. The The The Variables named in Note what's not here: state variables. It might be that we need to name the variables that are used as "states" in the sense of "inputs to a policy function", but it might be enough to have them implicit in the The statements in The contents of There are some additional complications for things like jointly determined variables, but those don't appear in any of our models so far. |
Oh, and |
Ok, I think it's possible to move incrementally in this direction. The hardest part is the Python object for equations, I think. I've got a few aesthetic quibbles but let's start getting the functionality in. I think I can get part of the way there with #1292 and refactoring the Frame code, as discussed. |
I very much hope that @william Du ***@***.***> 's implementation of the
"shuffling" method is included in the generic Monte Carlo simulator.
…On Thu, Jun 29, 2023 at 1:07 AM Sebastian Benthall ***@***.***> wrote:
Ok, I think it's possible to move incrementally in this direction.
The hardest part is the Python object for equations, I think.
I've got a few aesthetic quibbles but let's start getting the
functionality in.
I think I can get part of the way there with #1292
<#1292> and refactoring the Frame
code, as discussed.
—
Reply to this email directly, view it on GitHub
<#1295 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKCK76WDRCLQDI4PIAIMMTXNS2K3ANCNFSM6AAAAAAZXOKJ5A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
- Chris Carroll
|
As we've discussed, one tricky part about this proposal is the syntax for these sorts of 'equations'. This commit is the most lightweight way I can think of doing this without a symbolic library: It is possible to use |
I'm not attached to anything about the notation, especially specifics. This
was more about specifying what is the *kind* of information specifies the
basic consumption saving model's mechanics, up to distributional and/or
functional assumptions (other than basic accounting arithmetic).
My general point was that it's a very "light" set of information, human
readable, and easy-ish to interpret. The programming of how that gets
passed into Python is a different question.
…On Fri, Jun 30, 2023, 3:24 PM Sebastian Benthall ***@***.***> wrote:
dynamics = [
G = gamma * psi,
Rnrm = R / G,
bNrm = Rnrm * aNrm,
mNrm = bNrm + theta,
cNrm = policy(mNrm),
aNrm = mNrm - cNrm,
die(omega),
old = j >= J,
die(old)
]
As we've discussed, one tricky part about this proposal is the syntax for
these sorts of 'equations'.
Without a symbolic library, it's hard to do this very cleanly in Python.
This commit is the most lightweight way I can think of doing this without
a symbolic library:
d09eb30
<d09eb30>
It is possible to use inspect.signature to pull out the parameter names
and bind them in simulation.
https://docs.python.org/3/library/inspect.html#inspect.signature
—
Reply to this email directly, view it on GitHub
<#1295 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFMK7SSFNHZVDHAXDUTXN4RWBANCNFSM6AAAAAAZXOKJ5A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Got it. Please see #1296 for an example implementation. |
Passed --> parsed. Ducking autocorrect.
…On Fri, Jun 30, 2023, 4:14 PM Sebastian Benthall ***@***.***> wrote:
Got it. Please see #1296 <#1296> for
an example implementation.
—
Reply to this email directly, view it on GitHub
<#1295 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFMP4ZMWCSV5AADWDK3XN4XSHANCNFSM6AAAAAAZXOKJ5A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This can more explicitly take in equations, and be removed to a
HARK.simulation.monte_carlo
modulehttps://github.com/econ-ark/HARK/blob/master/HARK/core.py#L432-L479
This will help with the whiteboard problem #889
cf. #1292
The text was updated successfully, but these errors were encountered: