adding back in lifecycle and cyclical parameters
@@ -34,7 +34,8 @@ __all__ = ['ConsumerSolution', 'ValueFunc', 'MargValueFunc', 'MargMargValueFunc'
'ConsPerfForesightSolver', 'ConsIndShockSetup', 'ConsIndShockSolverBasic',
'ConsIndShockSolver', 'ConsKinkedRsolver', 'PerfForesightConsumerType',
'IndShockConsumerType', 'KinkedRconsumerType',
-'init_perfect_foresight','init_idiosyncratic_shocks','init_kinked_R']
+ 'init_perfect_foresight','init_idiosyncratic_shocks','init_kinked_R',
+ 'init_lifecycle','init_cyclical']
utility = CRRAutility
utilityP = CRRAutilityP
@@ -2892,3 +2893,23 @@ def constructAssetsGrid(parameters):
aXtraGrid = np.insert(aXtraGrid, j, a)
return aXtraGrid
+
+
+# Make a dictionary to specify a lifecycle consumer with a finite horizon
+init_lifecycle = copy(init_idiosyncratic_shocks)
+init_lifecycle['PermGroFac'] = [1.01,1.01,1.01,1.01,1.01,1.02,1.02,1.02,1.02,1.02]
+init_lifecycle['PermShkStd'] = [0.1,0.2,0.1,0.2,0.1,0.2,0.1,0,0,0]
+init_lifecycle['TranShkStd'] = [0.3,0.2,0.1,0.3,0.2,0.1,0.3,0,0,0]
+init_lifecycle['LivPrb'] = [0.99,0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1]
+init_lifecycle['T_cycle'] = 10
+init_lifecycle['T_retire'] = 7
+init_lifecycle['T_age'] = 11 # Make sure that old people die at terminal age and don't turn into newborns!
+
+# Make a dictionary to specify an infinite consumer with a four period cycle
+init_cyclical = copy(init_idiosyncratic_shocks)
+init_cyclical['PermGroFac'] = [1.082251, 2.8, 0.3, 1.1]
+init_cyclical['PermShkStd'] = [0.1,0.1,0.1,0.1]
+init_cyclical['TranShkStd'] = [0.1,0.1,0.1,0.1]
+init_cyclical['LivPrb'] = 4*[0.98]
+init_cyclical['T_cycle'] = 4
+
