For anyone out there using a life-cycle model with two (standard) endogenous states, such as a model with ‘assets’ and ‘house’, you can now turn on both divide-and-conquer and grid interpolation layer. Both are applied to only the first of the two endogenous states (so make sure the one that needs most grid points is the first one).
You just set,
vfoptions.divideandconquer=1;
vfoptions.gridinterplayer=1;
vfoptions.ngridinterp=15;
simoptions.gridinterplayer=vfoptions.gridinterplayer;
simoptions.ngridinterp=vfoptions.ngridinterp;
and the life-cycle models will be faster, less memory, and more accurate!
You could also play with
vfoptions.level1n=7;
which controls the number of points used in the first layer when doing divide-and-conquer. Better choices can be faster, but it has a default so setting it is optional.
Makes these models much easier and faster to solve. Works with all life-cycle models with two standard endogenous shocks.
PS. Probably works with three endogenous state (applying divide-and-conquer and grid interpolation layer to the first state), but I have not tested this so mileage may vary.
For two endogenous states I did lots of testing with all shock types etc.: GitHub - robertdkirkby/vfitoolkitTests: Various tests of VFI Toolkit features
