ConsIndShockModelFast#
Classes to solve canonical consumption-savings models with idiosyncratic shocks to income. All models here assume CRRA utility with geometric discounting, no bequest motive, and income shocks are fully transitory or fully permanent.
- It currently solves three types of models:
A very basic “perfect foresight” consumption-savings model with no uncertainty.
A consumption-savings model with risk over transitory and permanent income shocks.
The model described in (2), with an interest rate for debt that differs from the interest rate for savings. #todo
See NARK econ-ark/HARK for information on variable naming conventions. See HARK documentation for mathematical descriptions of the models being solved.
- class HARK.ConsumptionSaving.ConsIndShockModelFast.PerfForesightSolution(mNrm=array([0., 1.]), cNrm=array([0., 1.]), vFuncNvrsSlope=0.0, mNrmMin=0.0, hNrm=0.0, MPCmin=1.0, MPCmax=1.0)#
Bases:
MetricObject
A class representing the solution of a single period of a consumption-saving perfect foresight problem.
Here and elsewhere in the code, Nrm indicates that variables are normalized by permanent income.
- Parameters:
mNrm (np.array) – (Normalized) corresponding market resource points for interpolation.
cNrm (np.array) – (Normalized) consumption points for interpolation.
vFuncNvrsSlope (float) – Constant slope of inverse value vFuncNvrs
mNrmMin (float) – The minimum allowable market resources for this period; the consump- tion function (etc) are undefined for m < mNrmMin.
hNrm (float) – Human wealth after receiving income this period: PDV of all future income, ignoring mortality.
MPCmin (float) – Infimum of the marginal propensity to consume this period. MPC –> MPCmin as m –> infinity.
MPCmax (float) – Supremum of the marginal propensity to consume this period. MPC –> MPCmax as m –> mNrmMin.
- distance_criteria = ['cNrm', 'mNrm']#
- class HARK.ConsumptionSaving.ConsIndShockModelFast.IndShockSolution(mNrm=array([0., 0.02040816, 0.04081633, 0.06122449, 0.08163265, 0.10204082, 0.12244898, 0.14285714, 0.16326531, 0.18367347, 0.20408163, 0.2244898, 0.24489796, 0.26530612, 0.28571429, 0.30612245, 0.32653061, 0.34693878, 0.36734694, 0.3877551, 0.40816327, 0.42857143, 0.44897959, 0.46938776, 0.48979592, 0.51020408, 0.53061224, 0.55102041, 0.57142857, 0.59183673, 0.6122449, 0.63265306, 0.65306122, 0.67346939, 0.69387755, 0.71428571, 0.73469388, 0.75510204, 0.7755102, 0.79591837, 0.81632653, 0.83673469, 0.85714286, 0.87755102, 0.89795918, 0.91836735, 0.93877551, 0.95918367, 0.97959184, 1.]), cNrm=array([0., 0.02040816, 0.04081633, 0.06122449, 0.08163265, 0.10204082, 0.12244898, 0.14285714, 0.16326531, 0.18367347, 0.20408163, 0.2244898, 0.24489796, 0.26530612, 0.28571429, 0.30612245, 0.32653061, 0.34693878, 0.36734694, 0.3877551, 0.40816327, 0.42857143, 0.44897959, 0.46938776, 0.48979592, 0.51020408, 0.53061224, 0.55102041, 0.57142857, 0.59183673, 0.6122449, 0.63265306, 0.65306122, 0.67346939, 0.69387755, 0.71428571, 0.73469388, 0.75510204, 0.7755102, 0.79591837, 0.81632653, 0.83673469, 0.85714286, 0.87755102, 0.89795918, 0.91836735, 0.93877551, 0.95918367, 0.97959184, 1.]), cFuncLimitIntercept=None, cFuncLimitSlope=None, mNrmMin=0.0, hNrm=0.0, MPCmin=1.0, MPCmax=1.0, Ex_IncNext=0.0, MPC=None, mNrmGrid=None, vNvrs=None, vNvrsP=None, MPCminNvrs=None)#
Bases:
MetricObject
A class representing the solution of a single period of a consumption-saving idiosyncratic shocks to permanent and transitory income problem.
- Parameters:
mNrm (np.array) – (Normalized) corresponding market resource points for interpolation.
cNrm (np.array) – (Normalized) consumption points for interpolation.
vFuncNvrsSlope (float) – Constant slope of inverse value
vFuncNvrs
mNrmMin (float) – The minimum allowable market resources for this period; the consump- tion function (etc) are undefined for m < mNrmMin.
hNrm (float) – Human wealth after receiving income this period: PDV of all future income, ignoring mortality.
MPCmin (float) – Infimum of the marginal propensity to consume this period. MPC –> MPCmin as m –> infinity.
MPCmax (float) – Supremum of the marginal propensity to consume this period. MPC –> MPCmax as m –> mNrmMin.
- distance_criteria = ['cNrm', 'mNrm', 'mNrmMin']#
- class HARK.ConsumptionSaving.ConsIndShockModelFast.PerfForesightConsumerTypeFast(**kwargs)#
Bases:
PerfForesightConsumerType
A version of the perfect foresight consumer type speed up by numba.
- solution_terminal_ = <HARK.ConsumptionSaving.ConsIndShockModelFast.PerfForesightSolution object>#
- solution_terminal_class#
alias of
PerfForesightSolution
- update_solution_terminal()#
Update the terminal period solution. This method should be run when a new AgentType is created or when CRRA changes.
- post_solve()#
Method that is run automatically at the end of a call to solve. Here, it simply calls calc_stable_points() if appropriate: an infinite horizon problem with a single repeated period in its cycle.
- Parameters:
None
- Return type:
None
- class HARK.ConsumptionSaving.ConsIndShockModelFast.IndShockConsumerTypeFast(**kwargs)#
Bases:
IndShockConsumerType
,PerfForesightConsumerTypeFast
A version of the idiosyncratic shock consumer type speed up by numba.
If CubicBool and vFuncBool are both set to false it’s further optimized.
- solution_terminal_ = <HARK.ConsumptionSaving.ConsIndShockModelFast.IndShockSolution object>#
- solution_terminal_class#
alias of
IndShockSolution
- update_solution_terminal()#
Update the terminal period solution. This method should be run when a new AgentType is created or when CRRA changes.
- Parameters:
none
- Return type:
none
- post_solve()#
Method that is run automatically at the end of a call to solve. Here, it simply calls calc_stable_points() if appropriate: an infinite horizon problem with a single repeated period in its cycle.
- Parameters:
None
- Return type:
None