# Now change some of the parameters for the individual's problem to those of cjSOE Params.init_cjSOE['CRRA'] = 2 Params.init_cjSOE['Rfree'] = 1.04**0.25 Params.init_cjSOE['PermGroFac'] = [ 1.01**0.25 ] # Indiviual-specific income growth (from experience, e.g.) Params.init_cjSOE[ 'PermGroFacAgg'] = 1.04**0.25 # Aggregate productivity growth Params.init_cjSOE['LivPrb'] = [0.95**0.25] # Matches a short working life PopGroFac_cjSOE = [ 1.01**0.25 ] # Irrelevant to the individual's choice; attach later to "market" economy object # Instantiate the baseline agent type with the parameters defined above BaselineType = cstwMPC.cstwMPCagent(**Params.init_cjSOE) BaselineType.AgeDstn = np.array(1.0) # Fix the age distribution of agents # Make desired number of agent types (to capture ex-ante heterogeneity) EstimationAgentList = [] for n in range(Params.pref_type_count): EstimationAgentList.append(deepcopy(BaselineType)) EstimationAgentList[n].seed = n # Give every instance a different seed # %% {"code_folding": [0]} # Make an economy for the consumers to live in EstimationEconomy = cstwMPC.cstwMPCmarket(**Params.init_market) EstimationEconomy.print_parallel_error_once = True # Avoids a bug in the code EstimationEconomy.agents = EstimationAgentList
# Set total number of simulated agents in the population if do_param_dist: if do_agg_shocks: Population = Params.pop_sim_agg_dist else: Population = Params.pop_sim_ind_dist else: if do_agg_shocks: Population = Params.pop_sim_agg_point else: Population = Params.pop_sim_ind_point # Make AgentTypes for estimation if do_lifecycle: DropoutType = cstwMPCagent(**Params.init_dropout) DropoutType.AgeDstn = calcStationaryAgeDstn(DropoutType.LivPrb, True) HighschoolType = deepcopy(DropoutType) HighschoolType(**Params.adj_highschool) HighschoolType.AgeDstn = calcStationaryAgeDstn(HighschoolType.LivPrb, True) CollegeType = deepcopy(DropoutType) CollegeType(**Params.adj_college) CollegeType.AgeDstn = calcStationaryAgeDstn(CollegeType.LivPrb, True) DropoutType.update() HighschoolType.update() CollegeType.update() EstimationAgentList = [] for n in range(pref_type_count): EstimationAgentList.append(deepcopy(DropoutType)) EstimationAgentList.append(deepcopy(HighschoolType))