-
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding model file for fisher 2-period model
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
A model file for a Fisher 2-period consumption problem. | ||
""" | ||
|
||
from HARK.distribution import Bernoulli | ||
from HARK.model import Control | ||
|
||
# This way of distributing parameters across the scope is clunky | ||
# Can be handled better if parsed from a YAML file, probably | ||
# But it would be better to have a more graceful Python version as well. | ||
CRRA = 2.0, | ||
|
||
model = { | ||
'shocks' : {}, | ||
'parameters' : { | ||
'DiscFac' : 0.96, | ||
'CRRA' : CRRA, | ||
'Rfree' : 1.03, | ||
'y' : [1.0, 1.0], | ||
'BoroCnstArt' : None, | ||
}, | ||
'dynamics' : { | ||
'm' : lambda Rfree, a, y : Rfree * a + y, | ||
'c' : Control(['m']), | ||
'a' : lambda m, c : m - c | ||
}, | ||
'reward' : { | ||
'u' : lambda c : c ** (1 - CRRA) / (1 - CRRA) | ||
} | ||
} |