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(**kwds)#
Bases:
IndShockConsumerType
A class for representing representative agents with inelastic labor supply.
- time_inv_ = ['CRRA', 'DiscFac', 'BoroCnstArt', 'BoroCnstArt', 'vFuncBool', 'CubicBool', 'CapShare', 'DeprFac']#
- 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', 'BoroCnstArt', 'BoroCnstArt', 'vFuncBool', 'CubicBool', 'CapShare', 'DeprFac', '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
- update_solution_terminal()#
Update the terminal period solution. This method should be run when a new AgentType is created or when CRRA changes.
- 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