0.13.0
Major Changes
- Updates the DCEGM tools to address the flaws identified in issue #1062. PR: 1100.
- Updates
IndexDstn
, introducing the option to use an existing RNG instead of creating a new one, and creating and storing all the conditional distributions at initialization. 1104 make_shock_history
andread_shocks == True
now store and use the random draws that determine newborn's initial states #1101.FrameModel
andFrameSet
classes introduced for more modular construction of framed models.FrameAgentType
dedicated to simulation. #1117- General control transitions based on decision rules in
FrameAgentType
. #1117 - Adds
distr_of_function
tool to calculate the distribution of a function of a discrete random variable. #1144 - Changes the
DiscreteDistribution
class to allow for arbitrary array-valued random variables. #1146 - Adds
IndShockRiskyAssetConsumerType
as agent which can invest savings all in safe asset, all in risky asset, a fixed share in risky asset, or optimize its portfolio. #1107 - Updates all HARK models to allow for age-varying interest rates. #1150
- Adds
DiscreteDistribution.expected
method which expects vectorized functions and is faster thanHARK.distribution.calc_expectation
. #1156 - Adds
DiscreteDistributionXRA
class which extendsDiscreteDistribution
to allow for underlying data to be stored in axarray.DataArray
object. #1156 - Adds keyword argument
labels
toexpected()
when usingDiscreteDistributionXRA
to allow for expressive functions that use labeled xarrays. #1156 - Adds a wrapper for
interpolation.py
for fast multilinear interpolation. #1151 - Adds support for the calculation of dreivatives in the
interpolation.py
wrappers. #1157 - Adds class
DecayInterp
toeconforgeinterp.py
. It implements interpolators that "decay" to some limiting function when extrapolating. #1165 - Add methods to non stochastically simulate an economy by computing transition matrices. Functions to compute transition matrices and ergodic distribution have been added #1155.
- Fixes a bug that causes
t_age
andt_cycle
to get out of sync when reading pre-computed mortality. #1181 - Adds Methods to calculate Heterogenous Agent Jacobian matrices. #1185
- Enhances
combine_indep_dstns
to work with labeled distributions (DiscreteDistributionLabeled
). #1191 - Updates the
numpy
random generator fromRandomState
toGenerator
. #1193 - Turns the income and income+return distributions into
DiscreteDistributionLabeled
objects. #1189 - Creates
UtilityFuncCRRA
which is an object oriented utility function with a coefficient of constant relative risk aversion and includes derivatives and inverses. Also createsUtilityFuncCobbDouglas
,UtilityFuncCobbDouglasCRRA
, andUtilityFuncConstElastSubs
. #1168 - Reorganizes
HARK.distribution
. All distributions now inherit all features fromscipy.stats
. NewContinuousFrozenDistribution
andDiscreteFrozenDistribution
to usescipy.stats
distributions not yet implemented in HARK. NewDistribution.discretize(N, method = "***")
replacesDistribution.approx(N)
. NewDiscreteDistribution.limit
attribute describes continuous origin and discretization method. #1197. - Creates new class of labeled models under
ConsLabeledModel
that use xarray for more expressive modeling of underlying mathematical and economics variables. #1177
Minor Changes
- Updates the lognormal-income-process constructor from
ConsIndShockModel.py
to useIndexDistribution
. #1024, #1115 - Allows for age-varying unemployment probabilities and replacement incomes with the lognormal income process constructor. #1112
- Option to have newborn IndShockConsumerType agents with a transitory income shock in the first period. Default is false, meaning they only have a permanent income shock in period 1 and permanent AND transitory in the following ones. #1126
- Adds
benchmark
utility to profile the performance ofHARK
solvers. #1131 - Fixes scaling bug in Normal equiprobable approximation method. 1139
- Removes the extra-dimension that was returned by
calc_expectations
in some instances. #1149 - Adds
HARK.distribution.expected
alias forDiscreteDistribution.expected
. #1156 - Renames attributes in
DiscreteDistribution
:X
toatoms
andpmf
topmv
. #1164, #1051, #1159. - Remove or replace automated tests that depend on brittle simulation results. #1148
- Updates asset grid constructor from
ConsIndShockModel.py
to allow for linearly-spaced grids whenaXtraNestFac == -1
. #1172 - Renames
DiscreteDistributionXRA
toDiscreteDistributionLabeled
and updates methods #1170 - Renames
HARK.numba
toHARK.numba_tools
#1183 - Adds the RNG seed as a property of
DiscreteDistributionLabeled
#1184 - Updates the
approx
method ofHARK.distributions.Uniform
to include the endpoints of the distribution with infinitesimally small (zero) probability mass. #1180 - Refactors tests to incorporate custom precision
HARK_PRECISION = 4
. #1193 - Cast
DiscreteDistribution.pmv
attribute as anp.ndarray
. #1199 - Update structure of dynamic interest rate. #1221