示例#1
0
# Make sure that lambdas vector sums to 1.0
if not np.isclose(1.0, lambdas.sum()):
    err_msg = ('ERROR: lambdas vector does not sum to one.')
    raise RuntimeError(err_msg)
J = lambdas.shape[0]
beta_annual = 0.96
beta = beta_annual ** (80 / S)
sigma = 2.5
l_tilde = 1.0
chi_n_vec = 1.0 * np.ones(S)
start_age = 21
end_age = 100
mod_age_dist = (1 / S) * np.ones(S)
dat_age_dist = ((1 / (end_age - start_age + 1)) *
                np.ones(end_age - start_age + 1))
emat = abil.get_e_interp(S, mod_age_dist, dat_age_dist, lambdas,
                         plot=False)
# Firm parameters
A = 1.0
alpha = 0.35
delta_annual = 0.05
delta = 1 - ((1 - delta_annual) ** (80 / S))
# SS parameters
SS_solve = True
SS_tol = 1e-13
SS_graphs = True
SS_EulDiff = True
# TPI parameters
T1 = int(round(3.0 * S))
T2 = int(round(3.5 * S))
TPI_solve = True
TPI_tol = 1e-13
示例#2
0
# chi_n_vec = np.hstack((np.linspace(1.2, 1.0, 10),
#                        np.linspace(1.0, 1.0, 40),
#                        np.linspace(1.0, 3.0, 30)))
# b = 0.501
# upsilon = 1.553
ellip_init = np.array([0.2, 1.0])
Frisch = 0.8
scale_param = 1.0
cfe_params = np.array([Frisch, scale_param])
b, upsilon = elp.fit_ellip_CFE(ellip_init, cfe_params, l_tilde, True)

lambdas = np.array([0.3, 0.3, 0.2, 0.1, 0.1])
J = lambdas.shape[0]
age_wgts = np.ones(S) * (1 / S)
age_wgts_80 = np.ones(80) * (1 / 80)
emat = abil.get_e_interp(S, age_wgts, age_wgts_80, lambdas, True)

# Firm parameters
A = 1.0
alpha = 0.35
delta_annual = 0.05
delta = 1 - ((1 - delta_annual)**(80 / S))
# SS parameters
SS_graph = True

K_init = 100.0
L_init = 50.0
KL_init = np.array([K_init, L_init])

ss_args = (KL_init, beta, sigma, emat, chi_n_vec, l_tilde, b, upsilon, lambdas,
           S, J, alpha, A, delta)
示例#3
0
    demog.get_pop_objs(E, S, T1, T2, curr_year)
imm_rates_mat = \
    np.vstack((np.tile(np.reshape(imm_rates, (1, S)), (T1, 1)),
               np.tile(np.reshape(imm_rates_adj, (1, S)),
                       (T2 + S - 1 - T1, 1))))

# Household utility and ability parameters
lambdas = np.array([0.25, 0.25, 0.2, 0.1, 0.1, 0.09, 0.01])
# Make sure that lambdas vector sums to 1.0
if not np.isclose(1.0, lambdas.sum()):
    err_msg = ('ERROR: lambdas vector does not sum to one.')
    raise RuntimeError(err_msg)
J = len(lambdas)
emat = abil.get_e_interp(S,
                         omega_path[0, :],
                         omega_cur_80,
                         lambdas,
                         plot=False)
zeta_mat = (np.tile(omega_SS.reshape((S, 1)),
                    (1, J)) * np.tile(lambdas.reshape((1, J)), (S, 1)))
beta_annual = 0.96
beta = beta_annual**(80 / S)
sigma = 2.5
l_tilde = 1.0
chi_b_vec = 1.0 * np.ones(J)

# Firm parameters
Z = 1.0
gamma = 0.35
delta_annual = 0.05
delta = 1 - ((1 - delta_annual)**(80 / S))