ConsLaborModel

Subclasses of AgentType representing consumers who make decisions about how much labor to supply, as well as a consumption-saving decision.

It currently only has one model: labor supply on the intensive margin (unit interval) with CRRA utility from a composite good (of consumption and leisure), with transitory and permanent productivity shocks. Agents choose their quantities of labor and consumption after observing both of these shocks, so the transitory shock is a state variable.

class HARK.ConsumptionSaving.ConsLaborModel.ConsumerLaborSolution(cFunc=None, LbrFunc=None, vFunc=None, vPfunc=None, bNrmMin=None)

Bases: HARK.core.HARKobject

A class for representing one period of the solution to a Consumer Labor problem.

distance_criteria = ['cFunc', 'LbrFunc']
class HARK.ConsumptionSaving.ConsLaborModel.LaborIntMargConsumerType(cycles=1, **kwds)

Bases: HARK.ConsumptionSaving.ConsIndShockModel.IndShockConsumerType

A class representing agents who make a decision each period about how much to consume vs save and how much labor to supply (as a fraction of their time). They get CRRA utility from a composite good x_t = c_t*z_t^alpha, and discount future utility flows at a constant factor.

calcBoundingValues()

Calculate human wealth plus minimum and maximum MPC in an infinite horizon model with only one period repeated indefinitely. Store results as attributes of self. Human wealth is the present discounted value of expected future income after receiving income this period, ignoring mort- ality. The maximum MPC is the limit of the MPC as m –> mNrmMin. The minimum MPC is the limit of the MPC as m –> infty.

NOT YET IMPLEMENTED FOR THIS CLASS

Parameters:None
Returns:
Return type:None
getControls()

Calculates consumption and labor supply for each consumer of this type using the consumption and labor functions in each period of the cycle.

Parameters:None
Returns:
Return type:None
getPostStates()

Calculates end-of-period assets for each consumer of this type.

Parameters:None
Returns:
Return type:None
getStates()

Calculates updated values of normalized bank balances and permanent income level for each agent. Uses pLvlNow, aNrmNow, PermShkNow. Calls the getStates method for the parent class, then erases mNrmNow, which cannot be calculated until after getControls in this model.

Parameters:None
Returns:
Return type:None
makeEulerErrorFunc(mMax=100, approx_inc_dstn=True)

Creates a “normalized Euler error” function for this instance, mapping from market resources to “consumption error per dollar of consumption.” Stores result in attribute eulerErrorFunc as an interpolated function. Has option to use approximate income distribution stored in self.IncomeDstn or to use a (temporary) very dense approximation.

NOT YET IMPLEMENTED FOR THIS CLASS

Parameters:
  • mMax (float) – Maximum normalized market resources for the Euler error function.
  • approx_inc_dstn (Boolean) – Indicator for whether to use the approximate discrete income distri- bution stored in self.IncomeDstn[0], or to use a very accurate discrete approximation instead. When True, uses approximation in IncomeDstn; when False, makes and uses a very dense approximation.
Returns:

Return type:

None

plotLbrFunc(t, bMin=None, bMax=None, ShkSet=None)

Plot the labor supply function by bank balances at a given set of transitory shocks.

Parameters:
  • t (int) – Time index of the solution for which to plot the labor supply function.
  • bMin (float or None) – Minimum value of bNrm at which to begin the plot. If None, defaults to the minimum allowable value of bNrm for each transitory shock.
  • bMax (float or None) – Maximum value of bNrm at which to end the plot. If None, defaults to bMin + 20.
  • ShkSet ([float] or None) – Array or list of transitory shocks at which to plot the labor supply function. If None, defaults to the TranShkGrid for this time period.
Returns:

Return type:

None

plotcFunc(t, bMin=None, bMax=None, ShkSet=None)

Plot the consumption function by bank balances at a given set of transitory shocks.

Parameters:
  • t (int) – Time index of the solution for which to plot the consumption function.
  • bMin (float or None) – Minimum value of bNrm at which to begin the plot. If None, defaults to the minimum allowable value of bNrm for each transitory shock.
  • bMax (float or None) – Maximum value of bNrm at which to end the plot. If None, defaults to bMin + 20.
  • ShkSet ([float] or None) – Array or list of transitory shocks at which to plot the consumption function. If None, defaults to the TranShkGrid for this time period.
Returns:

Return type:

None

time_inv_ = ['CRRA', 'Rfree', 'DiscFac', 'BoroCnstArt', 'BoroCnstArt', 'vFuncBool', 'CubicBool']
time_vary_ = ['LivPrb', 'PermGroFac', 'WageRte']
update()

Update the income process, the assets grid, and the terminal solution.

Parameters:None
Returns:
Return type:None
updateLbrCost()

Construct the age-varying cost of working LbrCost using the attribute LbrCostCoeffs. This attribute should be a 1D array of arbitrary length, representing polynomial coefficients (over t_cycle) for (log) LbrCost.

Parameters:None
Returns:
Return type:None
updateSolutionTerminal()

Updates the terminal period solution and solves for optimal consumption and labor when there is no future.

Parameters:None
Returns:
Return type:None
updateTranShkGrid()

Create a time-varying list of arrays for TranShkGrid using TranShkDstn, which is created by the method updateIncomeProcess(). Simply takes the transitory shock values and uses them as a state grid; can be improved. Creates the attribute TranShkGrid.

Parameters:None
Returns:
Return type:None
HARK.ConsumptionSaving.ConsLaborModel.solveConsLaborIntMarg(solution_next, PermShkDstn, TranShkDstn, LivPrb, DiscFac, CRRA, Rfree, PermGroFac, BoroCnstArt, aXtraGrid, TranShkGrid, vFuncBool, CubicBool, WageRte, LbrCost)

Solves one period of the consumption-saving model with endogenous labor supply on the intensive margin by using the endogenous grid method to invert the first order conditions for optimal composite consumption and between consumption and leisure, obviating any search for optimal controls.

Parameters:
  • solution_next (ConsumerLaborSolution) – The solution to the next period’s problem; must have the attributes vPfunc and bNrmMinFunc representing marginal value of bank balances and minimum (normalized) bank balances as a function of the transitory shock.
  • PermShkDstn ([np.array]) – Discrete distribution of permanent productivity shocks.
  • TranShkDstn ([np.array]) – Discrete distribution of transitory productivity shocks.
  • LivPrb (float) – Survival probability; likelihood of being alive at the beginning of the succeeding period.
  • DiscFac (float) – Intertemporal discount factor.
  • CRRA (float) – Coefficient of relative risk aversion over the composite good.
  • Rfree (float) – Risk free interest rate on assets retained at the end of the period.
  • PermGroFac (float) – Expected permanent income growth factor for next period.
  • BoroCnstArt (float or None) – Borrowing constraint for the minimum allowable assets to end the period with. Currently not handled, must be None.
  • aXtraGrid (np.array) – Array of “extra” end-of-period asset values– assets above the absolute minimum acceptable level.
  • TranShkGrid (np.array) – Grid of transitory shock values to use as a state grid for interpolation.
  • vFuncBool (boolean) – An indicator for whether the value function should be computed and included in the reported solution. Not yet handled, must be False.
  • CubicBool (boolean) – An indicator for whether the solver should use cubic or linear interpolation. Cubic interpolation is not yet handled, must be False.
  • WageRte (float) – Wage rate per unit of labor supplied.
  • LbrCost (float) – Cost parameter for supplying labor: u_t = U(x_t), x_t = c_t*z_t^LbrCost, where z_t is leisure = 1 - Lbr_t.
Returns:

solution_now – The solution to this period’s problem, including a consumption function cFunc, a labor supply function LbrFunc, and a marginal value function vPfunc; each are defined over normalized bank balances and transitory prod shock. Also includes bNrmMinNow, the minimum permissible bank balances as a function of the transitory productivity shock.

Return type:

ConsumerLaborSolution