Skip to content

Commit

Permalink
updates to tests and default init_ parameters for econ-ark#1022
Browse files Browse the repository at this point in the history
  • Loading branch information
sbenthall committed Jun 24, 2021
1 parent dfe4d98 commit 5750e5c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions HARK/ConsumptionSaving/ConsIndShockModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1535,8 +1535,8 @@ def prepare_to_calc_EndOfPrdvP(self):
'CRRA': 2.0, # Coefficient of relative risk aversion,
'Rfree': 1.03, # Interest factor on assets
'DiscFac': 0.96, # Intertemporal discount factor
'LivPrb': [0.98], # Survival probability
'PermGroFac': [1.01], # Permanent income growth factor
'LivPrb': [1, 0.98], # Survival probability
'PermGroFac': [1, 1.01], # Permanent income growth factor
'BoroCnstArt': None, # Artificial borrowing constraint
'MaxKinks': 400, # Maximum number of grid points to allow in cFunc (should be large)
'AgentCount': 10000, # Number of agents of this type (only matters for simulation)
Expand Down Expand Up @@ -2020,9 +2020,9 @@ def check_conditions(self, verbose=None):
None
], # Some other value of "assets above minimum" to add to the grid, not used
# Income process variables
"PermShkStd": [0.1], # Standard deviation of log permanent income shocks
"PermShkStd": [0.1, 0.1], # Standard deviation of log permanent income shocks
"PermShkCount": 7, # Number of points in discrete approximation to permanent income shocks
"TranShkStd": [0.1], # Standard deviation of log transitory income shocks
"TranShkStd": [0.1, 0.1], # Standard deviation of log transitory income shocks
"TranShkCount": 7, # Number of points in discrete approximation to transitory income shocks
"UnempPrb": 0.05, # Probability of unemployment while working
"UnempPrbRet": 0.005, # Probability of "unemployment" while retired
Expand Down
8 changes: 4 additions & 4 deletions HARK/ConsumptionSaving/tests/test_ConsGenIncProcessModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"CRRA": 2.0, # Coefficient of relative risk aversion
"Rfree": 1.03, # Interest factor on assets
"DiscFac": 0.96, # Intertemporal discount factor
"LivPrb": [0.98], # Survival probability
"LivPrb": [1, 0.98], # Survival probability
"AgentCount": 10000, # Number of agents of this type (only matters for simulation)
"aNrmInitMean": 0.0, # Mean of log initial assets (only matters for simulation)
"aNrmInitStd": 1.0, # Standard deviation of log initial assets (only for simulation)
Expand All @@ -32,8 +32,8 @@
# Parameters describing the income process
"PermShkCount": 7, # Number of points in discrete approximation to permanent income shocks
"TranShkCount": 7, # Number of points in discrete approximation to transitory income shocks
"PermShkStd": [0.1], # Standard deviation of log permanent income shocks
"TranShkStd": [0.1], # Standard deviation of log transitory income shocks
"PermShkStd": [0.1, 0.1], # Standard deviation of log permanent income shocks
"TranShkStd": [0.1, 0.1], # Standard deviation of log transitory income shocks
"UnempPrb": 0.05, # Probability of unemployment while working
"UnempPrbRet": 0.005, # Probability of "unemployment" while retired
"IncUnemp": 0.3, # Unemployment benefits replacement rate
Expand All @@ -52,7 +52,7 @@
)
),
"PermGroFac": [
1.0
1.0, 1.0
], # Permanent income growth factor - long run permanent income growth doesn't work yet
}

Expand Down
8 changes: 4 additions & 4 deletions HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,12 @@ def test_infinite_horizon(self):
"CRRA": 2.0, # Coefficient of relative risk aversion
"Rfree": 1.03, # Interest factor on assets
"DiscFac": 0.96, # Intertemporal discount factor
"LivPrb": [0.99, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1],
"PermGroFac": [1.01, 1.01, 1.01, 1.02, 1.02, 1.02, 0.7, 1.0, 1.0, 1.0],
"LivPrb": [0.99, 0.99, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1],
"PermGroFac": [1.01, 1.01, 1.01, 1.01, 1.02, 1.02, 1.02, 0.7, 1.0, 1.0, 1.0],
# Parameters that specify the income distribution over the lifecycle
"PermShkStd": [0.1, 0.2, 0.1, 0.2, 0.1, 0.2, 0.1, 0, 0, 0],
"PermShkStd": [0.1, 0.1, 0.2, 0.1, 0.2, 0.1, 0.2, 0.1, 0, 0, 0],
"PermShkCount": 7, # Number of points in discrete approximation to permanent income shocks
"TranShkStd": [0.3, 0.2, 0.1, 0.3, 0.2, 0.1, 0.3, 0, 0, 0],
"TranShkStd": [0.3, 0.3, 0.2, 0.1, 0.3, 0.2, 0.1, 0.3, 0, 0, 0],
"TranShkCount": 7, # Number of points in discrete approximation to transitory income shocks
"UnempPrb": 0.05, # Probability of unemployment while working
"IncUnemp": 0.3, # Unemployment benefits replacement rate
Expand Down
2 changes: 1 addition & 1 deletion HARK/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def setUp(self):
def test_solve(self):
self.agent.time_vary = ["vary_1"]
self.agent.time_inv = ["inv_1"]
self.agent.vary_1 = [1.1, 1.2, 1.3, 1.4]
self.agent.vary_1 = [1.0, 1.1, 1.2, 1.3, 1.4]
self.agent.inv_1 = 1.05
# to test the superclass we create a dummy solve_one_period function
# for our agent, which doesn't do anything, instead of using a NullFunc
Expand Down

0 comments on commit 5750e5c

Please sign in to comment.