Interpolate dvds
@@ -1207,7 +1207,7 @@ def solveConsRiskyContrib(solution_next,ShockDstn,IncomeDstn,RiskyDstn,
# -The lowest gridpoints of both a and n are 0.
# -Consumption at m < m0 is m.
# -dvdnFxd at (m,n) for m < m0(n) is dvdnFxd(m0,n)
-
+ # -Same is true for dvdsFxd
# Create consumption interpolator
cInterps = [[LinearInterp(np.insert(mNrm_endog[:,nInd,sInd],0,0),
np.insert(cFxd[:,nInd,sInd],0,0))
@@ -1225,6 +1225,13 @@ def solveConsRiskyContrib(solution_next,ShockDstn,IncomeDstn,RiskyDstn,
for nInd in range(nNrm_N)]
dvdnFuncFxd = BilinearInterpOnInterp1D(dvdnFxdInterps, nNrmGrid, ShareGrid)
+ # Create dvdsFxd interpolator
+ dvdsFxdInterps = [[LinearInterp(np.insert(mNrm_endog[:,nInd,sInd],0,0),
+ np.insert(EndOfPrddvds[:,nInd,sInd],0,EndOfPrddvds[0,nInd,sInd]))
+ for sInd in range(Share_N)]
+ for nInd in range(nNrm_N)]
+ dvdsFuncFxd = BilinearInterpOnInterp1D(dvdsFxdInterps, nNrmGrid, ShareGrid)
+
# It's useful to have value functions on a regular-grid
# interpolator because:
# - Endogenous grids don't cover the m < n region well.
