def update(self): ''' Update the income process, the assets grid, and the terminal solution. Parameters ---------- none Returns ------- none ''' orig_flow = self.time_flow if self.cycles == 0: # hacky fix for labor supply l_bar self.updateIncomeProcessAlt() else: self.updateIncomeProcess() self.updateAssetsGrid() self.updateSolutionTerminal() self.timeFwd() self.resetRNG() if self.cycles > 0: self.IncomeDstn = Model.applyFlatIncomeTax(self.IncomeDstn, tax_rate=self.tax_rate, T_retire=self.T_retire, unemployed_indices=range(0,(self.TranShkCount+1)* self.PermShkCount,self.TranShkCount+1)) self.makeIncShkHist() if not orig_flow: self.timeRev()
def update(self): ''' Update the income process and the assets grid. ''' orig_flow = self.time_flow self.updateIncomeProcess() self.updateAssetsGrid() if self.cycles > 0: self.income_distrib = Model.applyFlatIncomeTax( self.income_distrib, tax_rate=self.tax_rate, T_retire=self.T_retire, unemployed_indices=range(0, (self.xi_N + 1) * self.psi_N, self.xi_N + 1)) scriptR_shocks, xi_shocks = Model.generateIncomeShockHistoryLognormalUnemployment( self) self.addIncomeShockPaths(scriptR_shocks, xi_shocks) else: self.timeRev() scriptR_shocks, xi_shocks = Model.generateIncomeShockHistoryInfiniteSimple( self) self.addIncomeShockPaths(scriptR_shocks, xi_shocks) if orig_flow: self.timeFwd()
def update(self): ''' Update the income process and the assets grid. ''' orig_flow = self.time_flow if self.cycles == 0: # hacky fix for labor supply l_bar self.updateIncomeProcessAlt() else: self.updateIncomeProcess() self.updateAssetsGrid() self.updateSolutionTerminal() self.timeFwd() if self.cycles > 0: self.income_distrib = Model.applyFlatIncomeTax(self.income_distrib, tax_rate=self.tax_rate, T_retire=self.T_retire, unemployed_indices=range(0,(self.xi_N+1)*self.psi_N,self.xi_N+1)) scriptR_shocks, xi_shocks = Model.generateIncomeShockHistoryLognormalUnemployment(self) self.addIncomeShockPaths(scriptR_shocks,xi_shocks) else: scriptR_shocks, xi_shocks = Model.generateIncomeShockHistoryInfiniteSimple(self) self.addIncomeShockPaths(scriptR_shocks,xi_shocks) if not orig_flow: self.timeRev()