I’m confused by the behavior of this part of my return function:
%% Allow/Disallow some trivial agent decisions
if (sprime-s>0 && aprime+hprimecost<0 ... % Cannot buy shares with negative net worth
|| agej*ypp>=11 && aprime<-f_coll*hprimecost ... % Collateral constraint on borrowing (for older buyers that earn real money)
|| hprime<h && aprime<0 ... % Cannot sell down a house that is collateralized
|| agej>=Jr && aprime<0) % Ban pensioners from negative assets
return
end
In particular, the -Inf return values resulting from the last clause (banning pensioners from negative assets) seems to be poisoning the mapping of what should be reasonable choices reachable within the model. To be sure, I gave pensioners a HUGE pension, which in the periods after retirement, but before my problems start, their stock/asset surface is higher than any pre-retirement age. So there’s absolutely no reason for them to try to take a bank loan, especially if it’s forbidden.
Alas, like toddlers being told they can do anything but the one thing you tell them to not do, my ReturnMatrix for pensioners, well past age Jr but well before the final age J, is just a single NaN and a the rest of the values are -Inf.
When I add a bit of logic to give the pensioners hitting this clause a negative (but not infinitely negative) return value, such as the aforementioned aprime then we get a return matrix that has an albeit flat texture for that age:
if agej>Jr && aprime<0
F=aprime; % return something to see it reflected in final result
% The result is a plane at z=-1, the minimum value of aprime
end
Another detail I should add is that I observe this behavior when I have a model with no shocks (I have a z_grid, but z’s value is 1 everywhere). When I add some shocks (both z and e types), then the problem disappears. Hence the question about the flat earth: is it a combination of a shockless world in which the decisions about optimality are so straight and narrow that an edge condition can somehow affect all the non-edges? How large of an edge does there have to be before everything falls off it? In my case, it seems that having a condition where aprime=-1 results in a universally rejected value function, even though there ought to be plenty of choices for non-rejected value functions.
What am I missing?