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

a not-too-general value backwards induction algorithm built on DBlocks #1438

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions HARK/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ class Control:

Parameters
----------
args : list of str
iset : list of str
The labels of the variables that are in the information set of this control.
"""

def __init__(self, args):
pass
def __init__(self, iset, upper_bound=None):
self.iset = iset
self.upper_bound = upper_bound


def discretized_shock_dstn(shocks, disc_params):
Expand Down
2 changes: 1 addition & 1 deletion HARK/models/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"dynamics": {
"b": lambda k, R, PermGroFac: k * R / PermGroFac,
"m": lambda b, theta: b + theta,
"c": Control(["m"]),
"c": Control(["m"], upper_bound=lambda m: m),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnwhite @alanlujan91 I wonder what you think about this way of introducing upper/lower bound information on control variables.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good.

If we wanted to differentiate between a fixed (real number) upper bound, and a functional upper bound, we could use the term upper_envelope for a function/lambda.

"a": lambda m, c: m - c,
},
"reward": {"u": lambda c, CRRA: c ** (1 - CRRA) / (1 - CRRA)},
Expand Down
Loading