Skip to content

Commit

Permalink
Merge pull request #204 from DominicWC/master
Browse files Browse the repository at this point in the history
Fixing broken links and a few empty cells
  • Loading branch information
alanlujan91 committed Jun 9, 2023
2 parents 9e0bdb9 + bc28f7e commit 222a0fe
Show file tree
Hide file tree
Showing 20 changed files with 600 additions and 1,783 deletions.
6 changes: 3 additions & 3 deletions notebooks/Alternative-Combos-Of-Parameter-Values.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"\n",
"## Introduction\n",
"\n",
"The notebook \"Micro-and-Macro-Implications-of-Very-Impatient-HHs\" is an exercise that demonstrates the consequences of changing a key parameter of the [cstwMPC](http://econ.jhu.edu/people/ccarroll/papers/cstwMPC) model, the time preference factor $\\beta$.\n",
"The notebook \"Micro-and-Macro-Implications-of-Very-Impatient-HHs\" is an exercise that demonstrates the consequences of changing a key parameter of the [cstwMPC](http://www.econ2.jhu.edu/people/ccarroll/papers/cstwMPC) model, the time preference factor $\\beta$.\n",
"\n",
"The [REMARK](https://github.com/econ-ark/REMARK) `SolvingMicroDSOPs` reproduces the last figure in the [SolvingMicroDSOPs](http://econ.jhu.edu/people/ccarroll/SolvingMicroDSOPs) lecture notes, which shows that there are classes of alternate values of $\\beta$ and $\\rho$ that fit the data almost as well as the exact 'best fit' combination.\n",
"The [REMARK](https://github.com/econ-ark/REMARK) `SolvingMicroDSOPs` reproduces the last figure in the [SolvingMicroDSOPs](http://www.econ2.jhu.edu/people/ccarroll/SolvingMicroDSOPs) lecture notes, which shows that there are classes of alternate values of $\\beta$ and $\\rho$ that fit the data almost as well as the exact 'best fit' combination.\n",
"\n",
"Inspired by this comparison, this notebook asks you to examine the consequences for:\n",
"\n",
Expand All @@ -35,7 +35,7 @@
"* The cstwMPC model solves and simulates the problems of consumers with 7 different values of $\\beta$\n",
" * You should do your exercise using the middle value of $\\beta$ from that exercise:\n",
" * `DiscFac_mean = 0.9855583`\n",
"* You are likely to run into the problem, as you experiment with parameter values, that you have asked HARK to solve a model that does not satisfy one of the impatience conditions required for the model to have a solution. Those conditions are explained intuitively in the [TractableBufferStock](http://econ.jhu.edu/people/ccarroll/public/lecturenotes/consumption/TractableBufferStock/) model. The versions of the impatience conditions that apply to the $\\texttt{IndShockConsumerType}$ model can be found in the paper [BufferStockTheory](http://econ.jhu.edu/people/ccarroll/papers/BufferStockTheory), table 2.\n",
"* You are likely to run into the problem, as you experiment with parameter values, that you have asked HARK to solve a model that does not satisfy one of the impatience conditions required for the model to have a solution. Those conditions are explained intuitively in the [TractableBufferStock](http://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/consumption/TractableBufferStock/) model. The versions of the impatience conditions that apply to the $\\texttt{IndShockConsumerType}$ model can be found in the paper [BufferStockTheory](http://www.econ2.jhu.edu/people/ccarroll/papers/BufferStockTheory), table 2.\n",
" * The conditions that need to be satisfied are:\n",
" * The Growth Impatience Condition (GIC)\n",
" * The Return Impatience Condition (RIC)\n",
Expand Down
6 changes: 3 additions & 3 deletions notebooks/Alternative-Combos-Of-Parameter-Values.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
#
# ## Introduction
#
# The notebook "Micro-and-Macro-Implications-of-Very-Impatient-HHs" is an exercise that demonstrates the consequences of changing a key parameter of the [cstwMPC](http://econ.jhu.edu/people/ccarroll/papers/cstwMPC) model, the time preference factor $\beta$.
# The notebook "Micro-and-Macro-Implications-of-Very-Impatient-HHs" is an exercise that demonstrates the consequences of changing a key parameter of the [cstwMPC](http://www.econ2.jhu.edu/people/ccarroll/papers/cstwMPC) model, the time preference factor $\beta$.
#
# The [REMARK](https://github.com/econ-ark/REMARK) `SolvingMicroDSOPs` reproduces the last figure in the [SolvingMicroDSOPs](http://econ.jhu.edu/people/ccarroll/SolvingMicroDSOPs) lecture notes, which shows that there are classes of alternate values of $\beta$ and $\rho$ that fit the data almost as well as the exact 'best fit' combination.
# The [REMARK](https://github.com/econ-ark/REMARK) `SolvingMicroDSOPs` reproduces the last figure in the [SolvingMicroDSOPs](http://www.econ2.jhu.edu/people/ccarroll/SolvingMicroDSOPs) lecture notes, which shows that there are classes of alternate values of $\beta$ and $\rho$ that fit the data almost as well as the exact 'best fit' combination.
#
# Inspired by this comparison, this notebook asks you to examine the consequences for:
#
Expand All @@ -74,7 +74,7 @@
# * The cstwMPC model solves and simulates the problems of consumers with 7 different values of $\beta$
# * You should do your exercise using the middle value of $\beta$ from that exercise:
# * `DiscFac_mean = 0.9855583`
# * You are likely to run into the problem, as you experiment with parameter values, that you have asked HARK to solve a model that does not satisfy one of the impatience conditions required for the model to have a solution. Those conditions are explained intuitively in the [TractableBufferStock](http://econ.jhu.edu/people/ccarroll/public/lecturenotes/consumption/TractableBufferStock/) model. The versions of the impatience conditions that apply to the $\texttt{IndShockConsumerType}$ model can be found in the paper [BufferStockTheory](http://econ.jhu.edu/people/ccarroll/papers/BufferStockTheory), table 2.
# * You are likely to run into the problem, as you experiment with parameter values, that you have asked HARK to solve a model that does not satisfy one of the impatience conditions required for the model to have a solution. Those conditions are explained intuitively in the [TractableBufferStock](http://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/consumption/TractableBufferStock/) model. The versions of the impatience conditions that apply to the $\texttt{IndShockConsumerType}$ model can be found in the paper [BufferStockTheory](http://www.econ2.jhu.edu/people/ccarroll/papers/BufferStockTheory), table 2.
# * The conditions that need to be satisfied are:
# * The Growth Impatience Condition (GIC)
# * The Return Impatience Condition (RIC)
Expand Down
2 changes: 1 addition & 1 deletion notebooks/ChangeLiqConstr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"\n",
"The `KinkedRconsumerType` class solves the problem of a consumer for whom the interest rate on borrowing is higher than the rate that the consumer will receive on any positive saving they do. The default calibration is meant to capture a case where the borrowing occurs at an interest rate typical of credit cards.\n",
"\n",
"(Fuller discussion of the issues here can be found in [A Theory of the Consumption Function, With or Without Liquidity Constraints](http://econ.jhu.edu/people/ccarroll/ATheoryv3JEP.pdf))"
"(Fuller discussion of the issues here can be found in [A Theory of the Consumption Function, With or Without Liquidity Constraints](http://www.econ2.jhu.edu/people/ccarroll/ATheoryv3JEP.pdf))"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion notebooks/ChangeLiqConstr.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#
# The `KinkedRconsumerType` class solves the problem of a consumer for whom the interest rate on borrowing is higher than the rate that the consumer will receive on any positive saving they do. The default calibration is meant to capture a case where the borrowing occurs at an interest rate typical of credit cards.
#
# (Fuller discussion of the issues here can be found in [A Theory of the Consumption Function, With or Without Liquidity Constraints](http://econ.jhu.edu/people/ccarroll/ATheoryv3JEP.pdf))
# (Fuller discussion of the issues here can be found in [A Theory of the Consumption Function, With or Without Liquidity Constraints](http://www.econ2.jhu.edu/people/ccarroll/ATheoryv3JEP.pdf))

# %% {"code_folding": [0]}
import matplotlib.pyplot as plt
Expand Down
2 changes: 1 addition & 1 deletion notebooks/Chinese-Growth.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"0. The capacity to provide a reasonable match to the distribution of wealth inequality in advanced economies\n",
"0. Ex-ante heterogeneity in consumers' discount factors (to capture wealth inequality)\n",
"\n",
"All of these are features of the model in the paper [\"The Distribution of Wealth and the Marginal Propensity to Consume\" by Carroll, Slacalek, Tokuoka, and White (2017)](http://econ.jhu.edu/people/ccarroll/papers/cstwMPC), for which all of the computational results were produced using the HARK toolkit. The results for that paper are available in the $\\texttt{cstwMPC}$ directory.\n",
"All of these are features of the model in the paper [\"The Distribution of Wealth and the Marginal Propensity to Consume\" by Carroll, Slacalek, Tokuoka, and White (2017)](http://www.econ2.jhu.edu/people/ccarroll/papers/cstwMPC), for which all of the computational results were produced using the HARK toolkit. The results for that paper are available in the $\\texttt{cstwMPC}$ directory.\n",
"\n",
"### But With A Different ConsumerType\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/Chinese-Growth.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
# 0. The capacity to provide a reasonable match to the distribution of wealth inequality in advanced economies
# 0. Ex-ante heterogeneity in consumers' discount factors (to capture wealth inequality)
#
# All of these are features of the model in the paper ["The Distribution of Wealth and the Marginal Propensity to Consume" by Carroll, Slacalek, Tokuoka, and White (2017)](http://econ.jhu.edu/people/ccarroll/papers/cstwMPC), for which all of the computational results were produced using the HARK toolkit. The results for that paper are available in the $\texttt{cstwMPC}$ directory.
# All of these are features of the model in the paper ["The Distribution of Wealth and the Marginal Propensity to Consume" by Carroll, Slacalek, Tokuoka, and White (2017)](http://www.econ2.jhu.edu/people/ccarroll/papers/cstwMPC), for which all of the computational results were produced using the HARK toolkit. The results for that paper are available in the $\texttt{cstwMPC}$ directory.
#
# ### But With A Different ConsumerType
#
Expand Down
232 changes: 32 additions & 200 deletions notebooks/Gentle-Intro-To-HARK-Buffer-Stock-Model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"\n",
"[![badge](https://img.shields.io/badge/Launch%20using%20-Econ--ARK-blue)](https://econ-ark.org/materials/gentle-intro-to-hark-buffer-stock-model#launch)\n",
"\n",
"This notebook explores the behavior of a consumer identical to the perfect foresight consumer described in [Gentle-Intro-To-HARK-PerfForesightCRRA](https://econ-ark.org/materials/Gentle-Intro-To-HARK-PerfForesightCRRA) except that now the model incorporates income uncertainty."
"This notebook explores the behavior of a consumer identical to the perfect foresight consumer described in [Gentle-Intro-To-HARK-PerfForesightCRRA](./Gentle-Intro-To-HARK-PerfForesightCRRA.ipynb) except that now the model incorporates income uncertainty and (artificial) borrowing constraints."
]
},
{
Expand Down Expand Up @@ -61,7 +61,7 @@
"\\end{align}\n",
"where again $\\mathbb{E}_{t}[\\theta_{t+1}] = 1$.\n",
"\n",
"As with the perfect foresight problem, this model can be rewritten in terms of _normalized_ variables, e.g. the ratio of 'market resources' $M_{t}$ (wealth plus current income) to permanent income is $m_t \\equiv M_t/P_t$. (See [here](http://econ.jhu.edu/people/ccarroll/papers/BufferStockTheory/) for the theory). In addition, lenders may set a limit on borrowing: The ratio $a_{t}$ of end-of-period assets to permanent income $A_t/P_t$ must be greater than $\\underline{a} \\leq 0$. (So, if $\\underline{a}=-0.3$, the consumer cannot borrow more than 30 percent of their permanent income).\n",
"As with the perfect foresight problem, this model can be rewritten in terms of _normalized_ variables, e.g. the ratio of 'market resources' $M_{t}$ (wealth plus current income) to permanent income is $m_t \\equiv M_t/P_t$. (See [here](http://www.econ2.jhu.edu/people/ccarroll/papers/BufferStockTheory/) for the theory). In addition, lenders may set a limit on borrowing: The ratio $a_{t}$ of end-of-period assets to permanent income $A_t/P_t$ must be greater than $\\underline{a} \\leq 0$. (So, if $\\underline{a}=-0.3$, the consumer cannot borrow more than 30 percent of their permanent income).\n",
"\n",
"The consumer's (normalized) problem turns out to be:\n",
"\\begin{eqnarray*}\n",
Expand Down Expand Up @@ -648,69 +648,15 @@
"name": "stderr",
"output_type": "stream",
"text": [
"GPFRaw = 0.984539 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"GPFNrm = 0.993777 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"GPFAggLivPrb = 0.964848 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Thorn = APF = 0.994384 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"PermGroFacAdj = 1.000611 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"uInvEpShkuInv = 0.990704 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"VAF = 0.932054 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"WRPF = 0.213705 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"DiscFacGPFNrmMax = 0.972061 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"GPFRaw = 0.984539 \n",
"GPFNrm = 0.993777 \n",
"GPFAggLivPrb = 0.964848 \n",
"Thorn = APF = 0.994384 \n",
"PermGroFacAdj = 1.000611 \n",
"uInvEpShkuInv = 0.990704 \n",
"VAF = 0.932054 \n",
"WRPF = 0.213705 \n",
"DiscFacGPFNrmMax = 0.972061 \n",
"DiscFacGPFAggLivPrbMax = 1.010600 \n"
]
},
Expand Down Expand Up @@ -833,13 +779,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Finished cycle #110 in 0.002000093460083008 seconds, solution distance = 1.679126009790366e-06\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Finished cycle #110 in 0.002000093460083008 seconds, solution distance = 1.679126009790366e-06\n",
"Finished cycle #111 in 0.0029981136322021484 seconds, solution distance = 1.3579390092388621e-06\n",
"Finished cycle #112 in 0.0020017623901367188 seconds, solution distance = 1.0727586690073565e-06\n",
"Finished cycle #113 in 0.0019991397857666016 seconds, solution distance = 8.197470693360742e-07\n"
Expand Down Expand Up @@ -913,69 +853,15 @@
"name": "stderr",
"output_type": "stream",
"text": [
"GPFRaw = 0.984539 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"GPFNrm = 1.021965 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"GPFAggLivPrb = 0.964848 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Thorn = APF = 0.994384 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"PermGroFacAdj = 0.973012 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"uInvEpShkuInv = 0.963379 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"VAF = 0.906347 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"WRPF = 0.213705 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"DiscFacGPFNrmMax = 0.919178 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"GPFRaw = 0.984539 \n",
"GPFNrm = 1.021965 \n",
"GPFAggLivPrb = 0.964848 \n",
"Thorn = APF = 0.994384 \n",
"PermGroFacAdj = 0.973012 \n",
"uInvEpShkuInv = 0.963379 \n",
"VAF = 0.906347 \n",
"WRPF = 0.213705 \n",
"DiscFacGPFNrmMax = 0.919178 \n",
"DiscFacGPFAggLivPrbMax = 1.010600 \n"
]
}
Expand Down Expand Up @@ -1027,7 +913,7 @@
"\n",
"The toolkit has built-in tests for a number of parametric conditions that can be shown to result in various characteristics in the optimal solution.\n",
"\n",
"Perhaps the most interesting such condition is the [\"Growth Impatience Condition\"](http://econ.jhu.edu/people/ccarroll/Papers/BufferStockTheory/#GIC): If this condition is satisfied, the consumer's optimal behavior is to aim to achieve a \"target\" value of $m$, to serve as a precautionary buffer against income shocks.\n",
"Perhaps the most interesting such condition is the [\"Growth Impatience Condition\"](http://www.econ2.jhu.edu/people/ccarroll/Papers/BufferStockTheory/#GIC): If this condition is satisfied, the consumer's optimal behavior is to aim to achieve a \"target\" value of $m$, to serve as a precautionary buffer against income shocks.\n",
"\n",
"The tests can be invoked using the `checkConditions()` method:"
]
Expand All @@ -1048,69 +934,15 @@
"name": "stderr",
"output_type": "stream",
"text": [
"GPFRaw = 0.984539 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"GPFNrm = 0.993777 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"GPFAggLivPrb = 0.964848 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Thorn = APF = 0.994384 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"PermGroFacAdj = 1.000611 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"uInvEpShkuInv = 0.990704 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"VAF = 0.932054 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"WRPF = 0.213705 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"DiscFacGPFNrmMax = 0.972061 \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"GPFRaw = 0.984539 \n",
"GPFNrm = 0.993777 \n",
"GPFAggLivPrb = 0.964848 \n",
"Thorn = APF = 0.994384 \n",
"PermGroFacAdj = 1.000611 \n",
"uInvEpShkuInv = 0.990704 \n",
"VAF = 0.932054 \n",
"WRPF = 0.213705 \n",
"DiscFacGPFNrmMax = 0.972061 \n",
"DiscFacGPFAggLivPrbMax = 1.010600 \n"
]
}
Expand Down Expand Up @@ -1141,7 +973,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 222a0fe

Please sign in to comment.