Fix AdjustPrb for discrete portfolio choice.
@@ -226,8 +226,6 @@ def _calcwFunc(AdjustPrb, AdjustCount, ShareNowCount, vFunc_adj, CRRA):
integrand : function (lambda)
Can be used to evaluate the integrand and the sent to a quadrature procedure.
'''
- if AdjustPrb < 1:
- raise Exception('The code allowing probabilities of adjustment less than 1 is not working yet; release notes will indicate when we have a release where it work')
# AdjustCount could in principle just be inferred from AdjustPrb instead of
# cartying it arround FIXME / TODO
@@ -244,9 +242,6 @@ def _calcwFunc(AdjustPrb, AdjustCount, ShareNowCount, vFunc_adj, CRRA):
evVals = AdjustPrb*vFunc_adj[0][ShareIndex](evalgrid) + (1-AdjustPrb)*vFunc_adj[1][ShareIndex](evalgrid)
with np.errstate(divide='ignore', over='ignore', under='ignore', invalid='ignore'):
evValsNvrs = utility_inv(evVals,gam=CRRA)
- evVals = np.insert(evVals, 0, 0.0)
- evValsNvrs = np.insert(evVals, 0, 0.0)
-
wFunc.append(ValueFunc(LinearInterp(evVals, evValsNvrs), CRRA))
return wFunc
