def getShocks(self): ''' Finds the effective permanent and transitory shocks this period by combining the aggregate and idiosyncratic shocks of each type. Parameters ---------- None Returns ------- None ''' IndShockConsumerType.getShocks(self) # Update idiosyncratic shocks self.TranShkNow = self.TranShkNow * self.TranShkAggNow * self.wRteNow self.PermShkNow = self.PermShkNow * self.PermShkAggNow
def getShocks(self): ''' Finds the effective permanent and transitory shocks this period by combining the aggregate and idiosyncratic shocks of each type. Parameters ---------- None Returns ------- None ''' IndShockConsumerType.getShocks(self) # Update idiosyncratic shocks self.TranShkNow = self.TranShkNow*self.TranShkAggNow*self.wRteNow self.PermShkNow = self.PermShkNow*self.PermShkAggNow
def getShocks(self): ''' Gets permanent and transitory income shocks for this period as well as preference shocks. Parameters ---------- None Returns ------- None ''' IndShockConsumerType.getShocks(self) # Get permanent and transitory income shocks PrefShkNow = np.zeros(self.AgentCount) # Initialize shock array for t in range(self.T_cycle): these = t == self.t_cycle N = np.sum(these) if N > 0: PrefShkNow[these] = self.RNG.permutation(approxMeanOneLognormal(N,sigma=self.PrefShkStd[t])[1]) self.PrefShkNow = PrefShkNow