# New Bug in StationaryDist\_FHorz\_Iteration\_SemiExo\_noz\_raw

**URL:** https://discourse.vfitoolkit.com/t/new-bug-in-stationarydist-fhorz-iteration-semiexo-noz-raw/636
**Category:** Uncategorized
**Created:** [April 10, 2026, 11:07pm UTC](https://discourse.vfitoolkit.com/t/new-bug-in-stationarydist-fhorz-iteration-semiexo-noz-raw/636 "2026-04-10T23:07:17Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![robertdkirkby](https://discourse.vfitoolkit.com/user_avatar/discourse.vfitoolkit.com/robertdkirkby/32/287_2.png) [@robertdkirkby](https://discourse.vfitoolkit.com/u/robertdkirkby)
#### Post date: [April 11, 2026, 12:25am UTC](https://discourse.vfitoolkit.com/t/new-bug-in-stationarydist-fhorz-iteration-semiexo-noz-raw/636/3 "2026-04-11T00:25:03Z")

</div>

Would be this change

> [@Runtime improvement to FHorz agent distribution iteration with semi-exogenous state](https://discourse.vfitoolkit.com/t/runtime-improvement-to-fhorz-agent-distribution-iteration-with-semi-exogenous-state/635/3):
>
> Turns out it was easy to roll out everywhere, only took an hour or two. So now all done smiley[https://github.com/vfitoolkit/VFIToolkit-matlab/commit/819dcc4835a306e089615800a9e99e0e721e5ab8](https://github.com/vfitoolkit/VFIToolkit-matlab/commit/819dcc4835a306e089615800a9e99e0e721e5ab8) Note: for models where pi\_semiz is dense (no zeros), this new approach is fractionally slower (say 1-3% slower), but I think that is worthwhile for the large speed gains when there are lots of zeros.

But not obvious to me what the error was caused by as I tried a few examples that all worked and covered the obvious alternatives. Anyway, I’ll run your example on Monday and see if I can figure it out.

---

_[View the full topic](https://discourse.vfitoolkit.com/t/new-bug-in-stationarydist-fhorz-iteration-semiexo-noz-raw/636)._
