While testing GuerrieriLorenzoni2017_Example.m, MATLAB fails at the first call to SimPanelValues_TransPath_InfHorz.
Error:
Unrecognized function or variable 'transpathoptions'.
Error in SimPanelValues_TransPath_InfHorz (line 165)
... = inputsFindtplus1tminus1(..., transpathoptions);
The function signature ends with simoptions:
function SimPanelValues = SimPanelValues_TransPath_InfHorz( ...
PolicyPath, PricePath, ParamPath, T, AgentDist_initial, ...
n_d, n_a, n_z, pi_z, d_grid, a_grid, z_grid, ...
FnsToEvaluate, Parameters, simoptions)
However, transpathoptions is neither an input nor defined locally before it is used on line 165. Consequently, the function appears to fail for every ordinary call, even when none of the functions to evaluate uses _tminus1 or _tplus1 variables.
I encountered this using the standard Figure 6 call in GuerrieriLorenzoni2017_Example.m under MATLAB R2026a. A likely backwards-compatible fix would be to accept transpathoptions as an optional final argument and initialize it to an empty/default structure when omitted.
1 Like
This mistake happened also to me when I ran this example. It can be easily fixed by just commenting out the code for the figure.
After fixing that, the transition is very slow and does not converge. Is this an outdated example or is there a problem with the transition code in the toolkit? More in general, I’m using the toolkit to compute transitions in infinite horizon models and it’s a great help for me. But I noticed that somehow the transitions are always very very slow, even when they converge.
1 Like
I agree. This is partly because the updates in examples are very ‘dampened’. If you change the factor used in the updates they are much faster, but also potentially less stable.
I am working towards some much bigger improvements in transition paths, especially around using some improved alternatives to the shooting algorithm, but that won’t be seen until later this year as there is still a fair bit of work and testing left to be done.
Toolkit tends to be okay on OLG (FHorz) transitions, because transpathoptions.fastOLG=1 is powerful (as long as you don’t run out of memory), but for InfHorz transition it is definitely slow and has room for improvement.
1 Like
I was wondering if this issue is solved, thanks.
The command has been fixed, but I haven’t had a change to check GL2017 so I didn’t want to say yes just yet.
1 Like
I will test it then and report back 
The error in SimPanelValues_TransPath_InfHorz is fixed, but the transition does not converge, confirming what @javier_fernan had reported above.
This is strange: I had run this example years ago and the transition was ok
2 Likes
Thanks! Any idea why the transition does not converge? Is there another algorithm we can use? I have been stuck on computing transitions for these type of models for some time now and I would appreciate suggestions
1 Like
A related technical point is that we are not sure if the transitional path exists!
Existence of steady state has been proven in the context of Bewley models with production: see here:
https://www.sciencedirect.com/science/article/abs/pii/S0022053117301084). Regarding the Huggett economy (no production but endowment), Akira Toda has a nice paper where he proves existence of equilibrium for CARA utility: https://www.sciencedirect.com/science/article/pii/S0165188917301823. This is restrictive (typically one would use CRRA utility) but there are probably other more general results around.
Note however that for the Guerrieri and Lorenzoni economy with their parametrization there shouldn’t be any issues. It’s a published paper and was replicated by @robertdkirkby in this nice article: Quantitative Macroeconomics: Lessons Learned from Fourteen Replications | Computational Economics | Springer Nature Link.
1 Like
Was the VFI toolkit used in the replication of Guerrieri Lorenzoni? Because now the example on the toolkit website does not converge
1 Like