Skip to content

Commit

Permalink
compute expected income in ConsIndShockModel with calcExpectations, see
Browse files Browse the repository at this point in the history
  • Loading branch information
sbenthall committed Dec 26, 2020
1 parent 435937c commit 1c9129a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion HARK/ConsumptionSaving/ConsIndShockModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from HARK.distribution import (
DiscreteDistribution,
addDiscreteOutcomeConstantMean,
calcExpectation,
combineIndepDstns,
)
from HARK.utilities import (
Expand Down Expand Up @@ -2824,7 +2825,10 @@ def calcBoundingValues(self):
PermShkValsNext = self.IncomeDstn[0][1]
TranShkValsNext = self.IncomeDstn[0][2]
ShkPrbsNext = self.IncomeDstn[0][0]
ExIncNext = np.dot(ShkPrbsNext, PermShkValsNext * TranShkValsNext)
ExIncNext = calcExpectation(
IncomeDstn,
lambda trans, perm : trans * perm
)
PermShkMinNext = np.min(PermShkValsNext)
TranShkMinNext = np.min(TranShkValsNext)
WorstIncNext = PermShkMinNext * TranShkMinNext
Expand Down

0 comments on commit 1c9129a

Please sign in to comment.