Skip to content

Commit

Permalink
Update timing to match #1022
Browse files Browse the repository at this point in the history
  • Loading branch information
llorracc committed Jan 1, 2022
1 parent 7928429 commit dc628cc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions HARK/ConsumptionSaving/ConsIndShockModel_AgentTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,7 @@ def construct_lognormal_income_process_unemployment(self):
# Use Harmenberg (2021) permanent income neutral measure
if self.neutral_measure == True:
PermShkDstn_t.pmf = PermShkDstn_t.X*PermShkDstn_t.pmf
# PermShkDstn_t.pmf = PermShkDstn_t.pmf

IncShkDstn.append(
combine_indep_dstns(
Expand Down Expand Up @@ -1419,12 +1420,18 @@ def get_shocks(self): # mcrlo simulation tool
newborn = self.mcrlovars.t_age = self.t_age == 0
for t in range(self.T_cycle):
these = t == self.t_cycle

# temporary, see #1022
if self.cycles == 1:
t = t - 1


N = np.sum(these)
if N > 0:
IncShkDstn = self.IncShkDstn[
t - 1
t
] # set current income distribution
PermGroFac = self.PermGroFac[t - 1] # and permanent growth factor
PermGroFac = self.PermGroFac[t] # and permanent growth factor
# Get random draws of income shocks from the discrete distribution
IncShks = IncShkDstn.draw(N)

Expand Down

0 comments on commit dc628cc

Please sign in to comment.