Skip to content

Commit

Permalink
update figures
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlujan91 committed Feb 1, 2024
1 parent 459613f commit 2a5c67a
Show file tree
Hide file tree
Showing 13 changed files with 98 additions and 21 deletions.
6 changes: 4 additions & 2 deletions code/IndShock.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"from estimark.agents import IndShkLifeCycleConsumerType\n",
"import estimark.calibration.estimation_parameters as parameters\n",
"import numpy as np\n",
"from HARK.utilities import plot_funcs"
"from HARK.utilities import plot_funcs\n",
"import matplotlib.pyplot as plt"
]
},
{
Expand Down Expand Up @@ -68,7 +69,8 @@
}
],
"source": [
"plot_funcs([sol.cFunc for sol in indshk_agent.solution[:-1:5]], 0, 20)"
"plot_funcs([sol.cFunc for sol in indshk_agent.solution[:-1:5]], 0, 20)\n",
"plt.savefig(\"../content/figures/IndShock_cFunc.png\")"
]
},
{
Expand Down
13 changes: 9 additions & 4 deletions code/Portfolio.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"from estimark.agents import PortfolioLifeCycleConsumerType\n",
"import estimark.calibration.estimation_parameters as parameters\n",
"import numpy as np\n",
"from HARK.utilities import plot_funcs"
"from HARK.utilities import plot_funcs\n",
"import matplotlib.pyplot as plt"
]
},
{
Expand All @@ -37,11 +38,13 @@
"metadata": {},
"outputs": [],
"source": [
"portfolio_agent = PortfolioLifeCycleConsumerType(**parameters.init_consumer_objects)\n",
"portfolio_agent = PortfolioLifeCycleConsumerType(\n",
" **parameters.init_consumer_objects)\n",
"\n",
"\n",
"portfolio_agent.CRRA = CRRA\n",
"\n",
"\n",
"portfolio_agent.DiscFac = [b * DiscFacAdj for b in parameters.DiscFac_timevary]"
]
},
Expand Down Expand Up @@ -71,7 +74,8 @@
}
],
"source": [
"plot_funcs([sol.cFunc for sol in portfolio_agent.solution[:-1:5]], 0, 20)"
"plot_funcs([sol.cFunc for sol in portfolio_agent.solution[:-1:5]], 0, 20)\n",
"plt.savefig(\"../content/figures/IndShockPortfolio_cFunc.png\")"
]
},
{
Expand All @@ -91,7 +95,8 @@
}
],
"source": [
"plot_funcs([sol.ShareFuncAdj for sol in portfolio_agent.solution[:-1:5]], 0, 100)"
"plot_funcs([sol.ShareFuncAdj for sol in portfolio_agent.solution[:-1:5]], 0, 100)\n",
"plt.savefig(\"../content/figures/IndShockPortfolio_ShareFunc.png\")"
]
}
],
Expand Down
26 changes: 18 additions & 8 deletions code/WarmGlow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"***NOTE: using a 'quick fix' for an attribute error. See 'Error Notes' in EstimationParameter.py for further discussion.***\n"
]
}
],
"source": [
"from estimark.agents import BequestWarmGlowLifeCycleConsumerType\n",
"import estimark.calibration.estimation_parameters as parameters\n",
"import numpy as np\n",
"from HARK.utilities import plot_funcs"
"from HARK.utilities import plot_funcs\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -25,7 +34,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -39,7 +48,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -48,7 +57,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand All @@ -63,7 +72,8 @@
}
],
"source": [
"plot_funcs([sol.cFunc for sol in portfolio_agent.solution[:-1:5]], 0, 20)"
"plot_funcs([sol.cFunc for sol in portfolio_agent.solution[:-1:5]], 0, 20)\n",
"plt.savefig(\"../content/figures/WarmGlowIndShock_cFunc.png\")"
]
}
],
Expand Down
36 changes: 33 additions & 3 deletions code/WarmGlowPortfolio.ipynb

Large diffs are not rendered by default.

38 changes: 34 additions & 4 deletions code/WealthPortfolio.ipynb

Large diffs are not rendered by default.

Binary file added 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 added 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 added 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 added 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 added 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 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.

0 comments on commit 2a5c67a

Please sign in to comment.