Skip to content

Commit

Permalink
Update for Hark 0.10.6 (#116)
Browse files Browse the repository at this point in the history
* changes to support HARK 0.10.6

* more changes to prepare DemARKS for 0.10.6

* no KrusellSmith

* remove Uncertainty and the Savings Rate. see #117

* fixing ChineseGrowth w/r/t discretizing continuous distributions and internalized constructLogNormalIncomeProcess

* updating Micro-and-Macro ; Structural-Estimates, for cstwMPC removal and discretization

* remove Untitled failing notebook

* fixing DemARKs that used approxUniform
  • Loading branch information
sbenthall committed May 21, 2020
1 parent d313b6c commit 3643f4f
Show file tree
Hide file tree
Showing 28 changed files with 3,278 additions and 4,105 deletions.
5 changes: 2 additions & 3 deletions notebooks/Alternative-Combos-Of-Parameter-Values.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
"name": "stderr",
"output_type": "stream",
"text": [
"\r",
" 0%| | 0/1 [00:00<?, ?it/s]"
]
},
Expand All @@ -162,7 +161,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 1/1 [00:04<00:00, 4.33s/it]\n"
"100%|██████████| 1/1 [00:04<00:00, 4.71s/it]\n"
]
}
],
Expand Down Expand Up @@ -349,7 +348,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.6.9"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down
4 changes: 2 additions & 2 deletions notebooks/Alternative-Combos-Of-Parameter-Values.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# extension: .py
# format_name: light
# format_version: '1.4'
# jupytext_version: 1.2.3
# jupytext_version: 1.2.4
# kernelspec:
# display_name: Python 3
# language: python
Expand All @@ -22,7 +22,7 @@
# name: python
# nbconvert_exporter: python
# pygments_lexer: ipython3
# version: 3.7.6
# version: 3.6.9
# latex_envs:
# LaTeX_envs_menu_present: true
# autoclose: false
Expand Down
44 changes: 23 additions & 21 deletions notebooks/Chinese-Growth.ipynb

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions notebooks/Chinese-Growth.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@
# First, decide the discount factors to assign:

# %%
from HARK.utilities import approxUniform
from HARK.distribution import Uniform

bottomDiscFac = 0.9800
topDiscFac = 0.9934
DiscFac_list = approxUniform(N=num_consumer_types,bot=bottomDiscFac,top=topDiscFac)[1]
DiscFac_list = Uniform(bot=bottomDiscFac,top=topDiscFac).approx(N=num_consumer_types).X

# Now, assign the discount factors we want to the ChineseConsumerTypes
for j in range(num_consumer_types):
Expand All @@ -193,10 +193,10 @@

# %% {"code_folding": []}
# First create the income distribution in the low-growth state, which we will not change
from HARK.ConsumptionSaving.ConsIndShockModel import IndShockConsumerType, constructLognormalIncomeProcessUnemployment
from HARK.ConsumptionSaving.ConsIndShockModel import IndShockConsumerType

low_growth_model = IndShockConsumerType()
LowGrowthIncomeDstn = constructLognormalIncomeProcessUnemployment(low_growth_model)[0][0]
LowGrowthIncomeDstn = low_growth_model.constructLognormalIncomeProcessUnemployment()[0][0]

# Remember the standard deviation of the permanent income shock in the low-growth state for later
LowGrowth_PermShkStd = low_growth_model.PermShkStd
Expand Down Expand Up @@ -233,7 +233,7 @@ def calcNatlSavingRate(PrmShkVar_multiplier,RNG_seed = 0):
low_growth_model.PermShkStd = [LowGrowth_PermShkStd[0] * PrmShkStd_multiplier]

# Construct the appropriate income distributions
HighGrowthIncomeDstn = constructLognormalIncomeProcessUnemployment(low_growth_model)[0][0]
HighGrowthIncomeDstn = low_growth_model.constructLognormalIncomeProcessUnemployment()[0][0]

# To calculate the national saving rate, we need national income and national consumption
# To get those, we are going to start national income and consumption at 0, and then
Expand Down
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,442 changes: 721 additions & 721 deletions notebooks/Figures/Uncertainty-and-the-Saving-Rate-BvsPermShkVar.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,434 changes: 717 additions & 717 deletions notebooks/Figures/Uncertainty-and-the-Saving-Rate-BvsTranShkVar.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,358 changes: 679 additions & 679 deletions notebooks/Figures/Uncertainty-and-the-Saving-Rate-savRteVSTranShkVar.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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 3643f4f

Please sign in to comment.