Skip to content

Commit

Permalink
use calcExpectations for EndOfPrdvPP in IndShock type. See econ-ark#625
Browse files Browse the repository at this point in the history
  • Loading branch information
sbenthall committed Jan 13, 2021
1 parent 629c1ca commit 190b8b2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions HARK/ConsumptionSaving/ConsIndShockModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:]))
Expand Down

0 comments on commit 190b8b2

Please sign in to comment.