I observed strange behavior in my modified LifeCycleModel21 after adding an Experience Asset.
I observed that the Value Function was as I expected: -Inf when ageJ>=Jr and the agent tried to carry or take on debt. My asset grid has a zero value at index 21, so I can easily spot negative assets in the first 20 rows. After computing the Stationary Distribution, I observed
K>> squeeze(StationaryDist_med_only(:,1,1:10,1,1,81))
ans =
83×10 gpuArray single matrix
1.0e-07 *
0.0809 0.0872 0.0981 0.0798 0.0411 0.0167 0.0060 0.0021 0.0007 0.0002
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0.0939 0.0000 0.0002 0.0030 0.0125 0 0 0 0 0
0.2088 0.0213 0.0017 0.0006 0 0 0 0 0 0
0.2792 0.0029 0.0654 0.3099 0 0 0 0 0 0
0.1300 0.2895 0.7453 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Note the non-zero entries on row 1 (which are incorrect…that’s the maximum debt level) and rows 21-24, which are rows with asset values at or greater than zero.
In my case, StationaryDist_FHorz_Case1 dispatches down to StationaryDist_FHorz_ExpAssetz which gives correct information as far as locating the aprime value of the experience asset on the grid (using grid probabilities). But what this function cannot do is to ascertain whether or not the aprime in question is valid from the perspective of the overall return function. As a result, the values it returns sprinkle possibilities that exist in the Experience Asset’s aprime state space into the overali state space where they are forbidden.
Here’s how I have corrected it, ex post facto in my own code:
StationaryDist_med_only=StationaryDist_FHorz_Case1(jequaloneDist_med_only,AgeWeightsParamNames,Policy_med_only,n_d,n_a,n_z,N_j,pi_z_med_only_J,Params,simoptions_med_only);
StationaryDist_med_only(isinf(V_med_only))=0; % If the ReturnFn forbids it, it is forbidden
I think it would be cleaner of the Stationary Distribution returned a correct value in the first place, not one that needs to be corrected. One possible solution is to forbid Experience Assets from being able to move a policy state from 1 to another value. I.e., in order for the Experience Asset to contribute to the action, it must be in a non-1 state. I leave it to the author to make the call as to what’s the right fix.