Skip to content

Commit

Permalink
update subjective solution objective simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlujan91 committed Mar 6, 2024
1 parent e798721 commit bea107e
Show file tree
Hide file tree
Showing 9 changed files with 481 additions and 1,304 deletions.
204 changes: 204 additions & 0 deletions code/IndShock.ipynb

Large diffs are not rendered by default.

263 changes: 263 additions & 0 deletions code/Portfolio.ipynb

Large diffs are not rendered by default.

File renamed without changes.
13 changes: 13 additions & 0 deletions code/estimark/estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,17 @@ def simulate_moments(params, agent, agent_name):
# Update the agent with a new path of DiscFac based on this DiscFacAdj (and a new CRRA)
agent.DiscFac = [b * DiscFacAdj for b in options["timevary_DiscFac"]]
agent.CRRA = CRRA

if "(Stock)" in agent_name and "Portfolio" in agent_name:
agent.RiskyAvg = init_subjective_stock["RiskyAvg"]
agent.RiskyStd = init_subjective_stock["RiskyStd"]
agent.update_RiskyDstn()

if "(Labor)" in agent_name:
agent.TranShkStd = init_subjective_labor["TranShkStd"]
agent.PermShkStd = init_subjective_labor["PermShkStd"]
agent.update_income_process()

# if hasattr(agent, "BeqCRRA"):
# agent.BeqCRRA = [CRRA] * len(options["timevary_DiscFac"])
# Solve the model for these parameters, then simulate wealth data
Expand All @@ -206,6 +217,8 @@ def simulate_moments(params, agent, agent_name):
agent.RiskyAvg = agent.RiskyAvgTrue
agent.RiskyStd = agent.RiskyStdTrue
agent.update_RiskyDstn()

# TODO: use perceived for simulation too
if "(Labor)" in agent_name:
agent.TranShkStd = init_consumer_objects["TranShkStd"]
agent.PermShkStd = init_consumer_objects["PermShkStd"]
Expand Down
2 changes: 1 addition & 1 deletion code/estimark/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# Income
ss_variances = True
income_spec = CGM_income["HS"]
income_spec = CGM_income["HS"] # College?
# Replace retirement age
income_spec["age_ret"] = retirement_age
inc_calib = parse_income_spec(
Expand Down
Loading

0 comments on commit bea107e

Please sign in to comment.