diff --git a/HARK/ConsumptionSaving/ConsIndShockModel.py b/HARK/ConsumptionSaving/ConsIndShockModel.py index 806552ce2..6c97c1819 100644 --- a/HARK/ConsumptionSaving/ConsIndShockModel.py +++ b/HARK/ConsumptionSaving/ConsIndShockModel.py @@ -977,16 +977,19 @@ def makeCubiccFunc(self, mNrm, cNrm): cFuncUnc : CubicInterp The unconstrained consumption function for this period. """ + def vpp_next(shocks, a_nrm): + return shocks[0] ** (- self.CRRA - 1.0) \ + * self.vPPfuncNext(self.Rfree / (self.PermGroFac * shocks[0]) * a_nrm + shocks[1]) + EndOfPrdvPP = ( self.DiscFacEff * self.Rfree * self.Rfree * self.PermGroFac ** (-self.CRRA - 1.0) - * np.sum( - self.PermShkVals_temp ** (-self.CRRA - 1.0) - * self.vPPfuncNext(self.mNrmNext) - * self.ShkPrbs_temp, - axis=0, + * calcExpectation( + self.IncomeDstn, + vpp_next, + self.aNrmNow ) ) dcda = EndOfPrdvPP / self.uPP(np.array(cNrm[1:]))