So far the income shock realizes at the beginning of period and wealth to choose consumption from is the same across all discrete choices. This is not a necessary condition. It is an artifact of our development.
How to fix:
calc_cont_grids_next_period is at the moment called before the backward induction. We create the child state wealth and values of the continuous states beforehand. Later they are mapped via indexes to the child_state_choices. This assumes that wealth is constant across choices. This is not necessary, but of course a nice shortcut.
Instead we could call this joint law of motion (=calc_cont_grids_next_period) in the moment where it is needed, i.e. when we do the interpolation of value and policy(consumption) in each child state choice. Just rearanging the code would already fix this.
So far it has not been needed.
So far the income shock realizes at the beginning of period and wealth to choose consumption from is the same across all discrete choices. This is not a necessary condition. It is an artifact of our development.
How to fix:
calc_cont_grids_next_period is at the moment called before the backward induction. We create the child state wealth and values of the continuous states beforehand. Later they are mapped via indexes to the child_state_choices. This assumes that wealth is constant across choices. This is not necessary, but of course a nice shortcut.
Instead we could call this joint law of motion (=calc_cont_grids_next_period) in the moment where it is needed, i.e. when we do the interpolation of value and policy(consumption) in each child state choice. Just rearanging the code would already fix this.
So far it has not been needed.