Skip to content

Commit

Permalink
Merge branch 'master' into i583-bl
Browse files Browse the repository at this point in the history
  • Loading branch information
sbenthall committed Apr 23, 2020
2 parents 17138dc + 8073a17 commit d54730f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ For more information on HARK, see [our Github organization](https://github.com/e

## Changes

### 0.10.6

Release Date: 17-04-2020

#### Major Changes

* Add Bellman equations for cyclical model example [#600](https://github.com/econ-ark/HARK/pull/600)

* read_shocks now reads mortality as well [#613](https://github.com/econ-ark/HARK/pull/613)

* Discrete probability distributions are now classes [#610](https://github.com/econ-ark/HARK/pull/610)

#### Minor Changes



### 0.10.5

Release Date: 24-03-2020
Expand Down
11 changes: 5 additions & 6 deletions HARK/ConsumptionSaving/ConsMarkovModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from HARK import AgentType
from HARK.ConsumptionSaving.ConsIndShockModel import ConsIndShockSolver, ValueFunc, \
MargValueFunc, ConsumerSolution, IndShockConsumerType
from HARK.distribution import DiscreteDistribution
from HARK.simulation import drawUniform
from HARK.interpolation import CubicInterp, LowerEnvelope, LinearInterp
from HARK.utilities import CRRAutility, CRRAutilityP, CRRAutilityPP, CRRAutilityP_inv, \
Expand Down Expand Up @@ -894,15 +895,13 @@ def getShocks(self):
if N > 0:
IncomeDstnNow = self.IncomeDstn[t-1][j] # set current income distribution
PermGroFacNow = self.PermGroFac[t-1][j] # and permanent growth factor
Indices = np.arange(IncomeDstnNow[0].size) # just a list of integers
Indices = np.arange(IncomeDstnNow.pmf.size) # just a list of integers
# Get random draws of income shocks from the discrete distribution
EventDraws = DiscreteDistribution(
IncomeDstnNow[0], Indices
).drawDiscrete(
EventDraws = IncomeDstnNow.draw_events(
N,
seed=self.RNG.randint(0,2**31-1))
PermShkNow[these] = IncomeDstnNow[1][EventDraws]*PermGroFacNow # permanent "shock" includes expected growth
TranShkNow[these] = IncomeDstnNow[2][EventDraws]
PermShkNow[these] = IncomeDstnNow.X[0][EventDraws]*PermGroFacNow # permanent "shock" includes expected growth
TranShkNow[these] = IncomeDstnNow.X[1][EventDraws]
newborn = self.t_age == 0
PermShkNow[newborn] = 1.0
TranShkNow[newborn] = 1.0
Expand Down
2 changes: 1 addition & 1 deletion HARK/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .core import *

__version__ = "0.10.5"
__version__ = "0.10.6"
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">
<a href="https://econ-ark.org">
<img src="doc/images/econ-ark-logo.png" align="center">
<img src="https://econ-ark.org/assets/img/econ-ark-logo.png" align="center">
</a>
<br>
<br>
Expand Down Expand Up @@ -39,7 +39,7 @@ The Econ-ARK project uses an [open governance model](./GOVERNANCE.md) and is fis

<div align="center">
<a href="https://numfocus.org/project/econ-ark">
<img height="60px" src="doc/images/numfocus-logo.png" align="center">
<img height="60px" src="https://numfocus.org/wp-content/uploads/2018/01/optNumFocus_LRG.png" align="center">
</a>
</div>
<br>
Expand Down Expand Up @@ -82,15 +82,15 @@ Install from [PyPi](https://pypi.org/) by running:
We start with almost the simplest possible consumption model: A consumer with CRRA utility

<div align="center">
<img height="30px" src="doc/images/usage-crra-utility-function.png">
<img height="30px" src="https://github.com/econ-ark/HARK/blob/master/doc/images/usage-crra-utility-function.png">
</div>

has perfect foresight about everything except the (stochastic) date of death.

The agent's problem can be written in [Bellman form](https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm) as:

<div align="center">
<img height="80px" src="doc/images/usage-agent-problem-bellman-form.png">
<img height="80px" src="https://github.com/econ-ark/HARK/blob/master/doc/images/usage-agent-problem-bellman-form.png">
</div>

<br>
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = econ-ark
version = 0.10.5
version = 0.10.6
url = https://github.com/econ-ark/HARK
project_urls =
Bug Reports = https://github.com/econ-ark/HARK/issues
Expand Down

0 comments on commit d54730f

Please sign in to comment.