use calcExpectation for v_lvl_next.
@@ -1021,11 +1021,14 @@ class ConsIndShockSolver(ConsIndShockSolverBasic):
-------
none
"""
- VLvlNext = (
- self.PermShkVals_temp ** (1.0 - self.CRRA)
+ def v_lvl_next(shocks, a_nrm):
+ return (
+ shocks[0] ** (1.0 - self.CRRA)
* self.PermGroFac ** (1.0 - self.CRRA)
- ) * self.vFuncNext(self.mNrmNext)
- EndOfPrdv = self.DiscFacEff * np.sum(VLvlNext * self.ShkPrbs_temp, axis=0)
+ ) * self.vFuncNext(self.m_nrm_next(shocks, a_nrm))
+ EndOfPrdv = self.DiscFacEff * calcExpectation(
+ self.IncomeDstn, v_lvl_next, self.aNrmNow
+ )
EndOfPrdvNvrs = self.uinv(
EndOfPrdv
) # value transformed through inverse utility
