def Euler3(w, r, e, L_guess, K_guess, B, factor, chi_b, taulump): ''' Parameters: w = wage rate (scalar) r = rental rate (scalar) e = distribution of abilities (SxJ array) L_guess = distribution of labor (SxJ array) K_guess = distribution of capital in period t (S-1 x J array) B = distribution of incidental bequests (1 x J array) factor = scaling value to make average income match data chi_b = discount factor of savings taulump = lump sum transfer from the government to the households Returns: Value of Euler error. ''' B = B.reshape(1, J) tax1 = tax.total_taxes_eul3_SS(r, K_guess[-2, :], w, e[-1, :], L_guess[-1, :], B, bin_weights, factor, taulump) cons = get_cons(r, K_guess[-2, :], w, e[-1, :], L_guess[-1, :], B, bin_weights, K_guess[-1, :], g_y, tax1) euler = MUc(cons / (1 + tau_sales)) / (1 + tau_sales) - np.exp( -sigma * g_y) * MUb(chi_b, K_guess[-1, :]) return euler
def Euler3(w, r, e, L_guess, K_guess, B, factor, chi_b, taulump): """ Parameters: w = wage rate (scalar) r = rental rate (scalar) e = distribution of abilities (SxJ array) L_guess = distribution of labor (SxJ array) K_guess = distribution of capital in period t (S-1 x J array) B = distribution of incidental bequests (1 x J array) factor = scaling value to make average income match data chi_b = discount factor of savings taulump = lump sum transfer from the government to the households Returns: Value of Euler error. """ B = B.reshape(1, J) tax1 = tax.total_taxes_eul3_SS(r, K_guess[-2, :], w, e[-1, :], L_guess[-1, :], B, bin_weights, factor, taulump) cons = get_cons(r, K_guess[-2, :], w, e[-1, :], L_guess[-1, :], B, bin_weights, K_guess[-1, :], g_y, tax1) euler = MUc(cons) - np.exp(-sigma * g_y) * MUb(chi_b, K_guess[-1, :]) return euler
def Euler3(w, r, e, n_guess, b_guess, BQ, factor, chi_b, T_H): ''' Parameters: w = wage rate (scalar) r = rental rate (scalar) e = distribution of abilities (SxJ array) n_guess = distribution of labor (SxJ array) b_guess = distribution of capital in period t (S-1 x J array) B = distribution of incidental bequests (1 x J array) factor = scaling value to make average income match data chi_b = discount factor of savings T_H = lump sum transfer from the government to the households Returns: Value of Euler error. ''' BQ = BQ.reshape(1, J) tax1 = tax.total_taxes_eul3_SS(r, b_guess[-2, :], w, e[-1, :], n_guess[-1, :], BQ, lambdas, factor, T_H) cons = get_cons(r, b_guess[-2, :], w, e[-1, :], n_guess[-1, :], BQ, lambdas, b_guess[-1, :], g_y, tax1) euler = MUc(cons) - np.exp(-sigma * g_y) * MUb( chi_b, b_guess[-1, :]) return euler