diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f3411999..79d187df9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/HARK/ConsumptionSaving/ConsMarkovModel.py b/HARK/ConsumptionSaving/ConsMarkovModel.py index ec16f4066..610e999af 100644 --- a/HARK/ConsumptionSaving/ConsMarkovModel.py +++ b/HARK/ConsumptionSaving/ConsMarkovModel.py @@ -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, \ @@ -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 diff --git a/HARK/__init__.py b/HARK/__init__.py index c4f4544c7..48fdbac57 100644 --- a/HARK/__init__.py +++ b/HARK/__init__.py @@ -1,3 +1,3 @@ from .core import * -__version__ = "0.10.5" +__version__ = "0.10.6" diff --git a/README.md b/README.md index 3f46a9f6c..79fd32086 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
- +

@@ -39,7 +39,7 @@ The Econ-ARK project uses an [open governance model](./GOVERNANCE.md) and is fis
- +

@@ -82,7 +82,7 @@ Install from [PyPi](https://pypi.org/) by running: We start with almost the simplest possible consumption model: A consumer with CRRA utility
- +
has perfect foresight about everything except the (stochastic) date of death. @@ -90,7 +90,7 @@ 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:
- +

diff --git a/setup.cfg b/setup.cfg index e2fd57628..1a13dd9c9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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