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 @@