ConsRepAgentModel#

This module contains models for solving representative agent macroeconomic models. This stands in contrast to all other model modules in HARK, which (unsurprisingly) take a heterogeneous agents approach. In RA models, all attributes are either time invariant or exist on a short cycle; models must be infinite horizon.

class HARK.ConsumptionSaving.ConsRepAgentModel.RepAgentConsumerType(solution_terminal=None, pseudo_terminal=True, tolerance=1e-06, verbose=1, quiet=False, seed=0, construct=True, **kwds)#

Bases: IndShockConsumerType

A class for representing representative agents with inelastic labor supply.

time_inv_ = ['CRRA', 'DiscFac', 'CapShare', 'DeprFac', 'aXtraGrid']#
default_ = {'params': {'AgentCount': 1, 'BoroCnstArt': 0.0, 'CRRA': 2.0, 'CapShare': 0.36, 'CubicBool': False, 'DeprFac': 0.05, 'DiscFac': 0.96, 'IncUnemp': 0.0, 'IncUnempRet': 0.0, 'LivPrb': [1.0], 'NewbornTransShk': False, 'PerfMITShk': False, 'PermGroFac': [1.01], 'PermGroFacAgg': 1.0, 'PermShkCount': 7, 'PermShkStd': [0.1], 'Rfree': 1.03, 'T_age': None, 'T_cycle': 1, 'T_retire': 0, 'TranShkCount': 7, 'TranShkStd': [0.1], 'UnempPrb': 0.0, 'UnempPrbRet': 0.005, 'aNrmInitMean': 0.0, 'aNrmInitStd': 1.0, 'aXtraCount': 48, 'aXtraExtra': None, 'aXtraMax': 20, 'aXtraMin': 0.001, 'aXtraNestFac': 3, 'constructors': {'IncShkDstn': <function construct_lognormal_income_process_unemployment>, 'PermShkDstn': <function get_PermShkDstn_from_IncShkDstn>, 'TranShkDstn': <function get_TranShkDstn_from_IncShkDstn>, 'aXtraGrid': <function make_assets_grid>, 'solution_terminal': <function make_basic_CRRA_solution_terminal>}, 'cycles': 0, 'neutral_measure': False, 'pLvlInitMean': 0.0, 'pLvlInitStd': 0.0, 'pseudo_terminal': False, 'vFuncBool': False}, 'solver': <function solve_ConsRepAgent>}#
pre_solve()#

Method that is run automatically just before solution by backward iteration. Solves the (trivial) terminal period and does a quick check on the borrowing constraint and MaxKinks attribute (only relevant in constrained, infinite horizon problems).

get_states()#

TODO: replace with call to transition

Calculates updated values of normalized market resources and permanent income level. Uses pLvlNow, aNrmNow, PermShkNow, TranShkNow.

Parameters:

None

Return type:

None

class HARK.ConsumptionSaving.ConsRepAgentModel.RepAgentMarkovConsumerType(**kwds)#

Bases: RepAgentConsumerType

A class for representing representative agents with inelastic labor supply and a discrete MarkovState

time_inv_ = ['CRRA', 'DiscFac', 'CapShare', 'DeprFac', 'aXtraGrid', 'MrkvArray']#
pre_solve()#

Method that is run automatically just before solution by backward iteration. Solves the (trivial) terminal period and does a quick check on the borrowing constraint and MaxKinks attribute (only relevant in constrained, infinite horizon problems).

initialize_sim()#

Prepares this AgentType for a new simulation. Resets the internal random number generator, makes initial states for all agents (using sim_birth), clears histories of tracked variables.

Parameters:

None

Return type:

None

reset_rng()#

Reset the RNG behavior of this type. This method is called automatically by initialize_sim(), ensuring that each simulation run uses the same sequence of random shocks; this is necessary for structural estimation to work. This method extends AgentType.reset_rng() to also reset elements of IncShkDstn.

Parameters:

None

Return type:

None

get_shocks()#

Draws a new Markov state and income shocks for the representative agent.

Parameters:

None

Return type:

None

get_controls()#

Calculates consumption for the representative agent using the consumption functions.

Parameters:

None

Return type:

None