dcegm.toy_models.cons_ret_model_dcegm_paper.budget_constraint

Functions

budget_constraint(→ float)

Compute possible current beginning of period resources.

_calc_stochastic_income(→ float)

Computes the current level of deterministic and stochastic income.

Module Contents

dcegm.toy_models.cons_ret_model_dcegm_paper.budget_constraint.budget_constraint(period: int, lagged_choice: int, asset_end_of_previous_period: float, income_shock_previous_period: float, model_specs: Dict[str, Any], params: Dict[str, float]) float

Compute possible current beginning of period resources.

Given the savings grid of the previous period (t -1) and the current state vector in t, including the agent’s lagged discrete choice made in t-1.

Parameters:
  • state_beginning_of_period (np.ndarray) – 1d array of shape (n_state_variables,) denoting the current child state.

  • asset_end_of_previous_period (float) – One point on the exogenous savings grid carried over from the previous period.

  • income_shock_pervious_period (float) – Stochastic shock on labor income; may or may not be normally distributed. This float represents one particular realization of the income_shock_draws carried over from the previous period.

  • params (dict) – Dictionary containing model parameters.

  • model_specs (dict) – model_specs dictionary.

Returns:

The beginning of period wealth in t.

Return type:

(float)

dcegm.toy_models.cons_ret_model_dcegm_paper.budget_constraint._calc_stochastic_income(period: int, lagged_choice: int, wage_shock: float, min_age: int, constant: float, exp: float, exp_squared: float) float

Computes the current level of deterministic and stochastic income.

Note that income is paid at the end of the current period, i.e. after the (potential) labor supply choice has been made. This is equivalent to allowing income to be dependent on a lagged choice of labor supply. The agent starts working in period t = 0. Relevant for the wage equation (deterministic income) are age-dependent coefficients of work experience: labor_income = constant + alpha_1 * age + alpha_2 * age**2 They include a constant as well as two coefficients on age and age squared, respectively. Note that the last one (alpha_2) typically has a negative sign.

Parameters:
  • state (jnp.ndarray) – 1d array of shape (n_state_variables,) denoting the current child state.

  • wage_shock (float) – Stochastic shock on labor income; may or may not be normally distributed. This float represents one particular realization of the income_shock_draws carried over from the previous period.

  • params (dict) – Dictionary containing model parameters. Relevant here are the coefficients of the wage equation.

  • model_specs (dict) – model_specs dictionary.

Returns:

The potential end of period income. It consists of a

deterministic component, i.e. age-dependent labor income, and a stochastic shock.

Return type:

stochastic_income (float)