Skip to content

Commit

Permalink
update results
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlujan91 committed Feb 8, 2024
1 parent 23d7a9a commit 5c2513c
Show file tree
Hide file tree
Showing 21 changed files with 521 additions and 411 deletions.
596 changes: 262 additions & 334 deletions code/IndShock.ipynb

Large diffs are not rendered by default.

58 changes: 42 additions & 16 deletions code/Portfolio.ipynb

Large diffs are not rendered by default.

41 changes: 29 additions & 12 deletions code/WarmGlow.ipynb

Large diffs are not rendered by default.

26 changes: 22 additions & 4 deletions code/WarmGlowPortfolio.ipynb

Large diffs are not rendered by default.

127 changes: 122 additions & 5 deletions code/WealthPortfolio.ipynb

Large diffs are not rendered by default.

60 changes: 32 additions & 28 deletions code/estimark/calibration/estimation_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from HARK.Calibration.Income.IncomeTools import CGM_income, parse_income_spec
from HARK.datasets.life_tables.us_ssa.SSATools import parse_ssa_life_table
from pathlib import Path
from HARK.ConsumptionSaving.ConsIndShockModel import init_lifecycle

# ---------------------------------------------------------------------------------
# Debugging flags
Expand Down Expand Up @@ -80,7 +81,7 @@

# Get the directory containing the current file and construct the full path to the CSV file
csv_file_path = Path(__file__).resolve().parent / ".." / "data" / "Cagetti2003.csv"
DiscFac_timevary = np.genfromtxt(csv_file_path)
DiscFac_timevary = np.genfromtxt(csv_file_path) * 0.0 + 1.0

# Survival probabilities over the lifecycle
liv_prb = parse_ssa_life_table(
Expand Down Expand Up @@ -108,33 +109,36 @@

# Dictionary that can be passed to ConsumerType to instantiate
init_consumer_objects = {
"CRRA": CRRA_start,
"Rfree": Rfree,
"PermGroFac": inc_calib["PermGroFac"],
"BoroCnstArt": BoroCnstArt,
"PermShkStd": inc_calib["PermShkStd"],
"PermShkCount": PermShkCount,
"TranShkStd": inc_calib["TranShkStd"],
"TranShkCount": TranShkCount,
"T_cycle": TT,
"UnempPrb": UnempPrb,
"UnempPrbRet": UnempPrbRet,
"T_retire": retirement_t,
"T_age": TT + 1,
"IncUnemp": IncUnemp,
"IncUnempRet": IncUnempRet,
"aXtraMin": aXtraMin,
"aXtraMax": aXtraMax,
"aXtraCount": aXtraCount,
"aXtraExtra": [aXtraExtra, aXtraHuge],
"aXtraNestFac": exp_nest,
"LivPrb": liv_prb,
"DiscFac": DiscFac_timevary,
"AgentCount": num_agents,
"seed": seed,
"tax_rate": 0.0,
"vFuncBool": vFuncBool,
"CubicBool": CubicBool,
**init_lifecycle,
**{
"CRRA": CRRA_start,
"Rfree": Rfree,
"PermGroFac": inc_calib["PermGroFac"],
"BoroCnstArt": BoroCnstArt,
"PermShkStd": inc_calib["PermShkStd"],
"PermShkCount": PermShkCount,
"TranShkStd": inc_calib["TranShkStd"],
"TranShkCount": TranShkCount,
"T_cycle": TT,
"UnempPrb": UnempPrb,
"UnempPrbRet": UnempPrbRet,
"T_retire": retirement_t,
"T_age": TT,
"IncUnemp": IncUnemp,
"IncUnempRet": IncUnempRet,
"aXtraMin": aXtraMin,
"aXtraMax": aXtraMax,
"aXtraCount": aXtraCount,
"aXtraExtra": [aXtraExtra, aXtraHuge],
"aXtraNestFac": exp_nest,
"LivPrb": liv_prb,
"DiscFac": DiscFac_timevary,
"AgentCount": num_agents,
"seed": seed,
"tax_rate": 0.0,
"vFuncBool": vFuncBool,
"CubicBool": CubicBool,
},
}

if show_PermGroFacAgg_error:
Expand Down
2 changes: 1 addition & 1 deletion code/estimark/data/Cagetti2003.csv
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
0.9791338
0.9803439
0.981697
0.8287214
0.9902111
0.9902111
0.9902111
0.9902111
Expand Down
4 changes: 2 additions & 2 deletions code/tables/IndShock_estimate_results.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DiscFacAdj,CRRA
0.8689011612165243,3.796066262763537
DiscFacAdj,CRRA
0.9552205116274122,1.3759978446748666
4 changes: 2 additions & 2 deletions code/tables/Portfolio_estimate_results.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DiscFacAdj,CRRA
0.8193095309029956,4.5574205165556725
DiscFacAdj,CRRA
0.9274365858887479,1.476787246326599
4 changes: 2 additions & 2 deletions code/tables/WarmGlowPortfolio_estimate_results.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DiscFacAdj,CRRA
0.8246562094500894,4.4642643726332185
DiscFacAdj,CRRA
0.9274311481285256,1.4742643393378447
4 changes: 2 additions & 2 deletions code/tables/WarmGlow_estimate_results.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DiscFacAdj,CRRA
0.8755702129442734,3.6158511660969577
DiscFacAdj,CRRA
0.9530413708159338,1.3863342334530775
4 changes: 2 additions & 2 deletions code/tables/WealthPortfolio_estimate_results.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DiscFacAdj,CRRA
0.6326006490726698,5.943630057453893
DiscFacAdj,CRRA
0.6518428502490605,5.51193902864699
Binary file modified content/figures/IndShockPortfolio_ShareFunc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/figures/IndShockPortfolio_cFunc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/figures/IndShock_cFunc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/figures/TRPPortfolio_ShareFunc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/figures/TRPPortfolio_cFunc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/figures/WarmGlowIndShockPortfolio_ShareFunc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/figures/WarmGlowIndShockPortfolio_cFunc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/figures/WarmGlowIndShock_cFunc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: solvingmicrodsops
channels:
- conda-forge
dependencies:
- python=3.9
- python=3.10
- matplotlib
- numpy
- scipy
Expand Down

0 comments on commit 5c2513c

Please sign in to comment.