# Bug in SimPanelValues\_TransPath\_InfHorz

**URL:** https://discourse.vfitoolkit.com/t/bug-in-simpanelvalues-transpath-infhorz/691
**Category:** Uncategorized
**Created:** [July 23, 2026, 4:26am UTC](https://discourse.vfitoolkit.com/t/bug-in-simpanelvalues-transpath-infhorz/691 "2026-07-23T04:26:03Z")
**Posts on this page:** 1
**Showing post:** 31

<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: [September 7, 2026, 4:57am UTC](https://discourse.vfitoolkit.com/t/bug-in-simpanelvalues-transpath-infhorz/691/31 "2026-09-07T04:57:59Z")

</div>

Moll’s codes turn out to have a typo. I was building some tests to compare Moll’s transition path codes to VFI Toolkit codes (as an illustration). I came across a minor typo that appears in  
huggett\_newton.m: lines 60,64  
huggett\_newton\_myAD.m: lines 55,59

It is very minor, Moll’s codes have:

```auto
x = x + xi*dx; % step taken is xi*dx
J = J + f * dx'/(dx'*dx); % update uses dx

```

The Broyden update should use the same size step for both, but currently uses xi\*dx for one (with xi=0.1) and x for the other. [Minor enough to impact runtimes but still work fine, hence why it has gone unnoticed.]

Also, the AutoDiff approach won’t work for VFI Toolkit. The reason is that it requires using the closed-form of an FOC from the model to be able to implement.

---

_[View the full topic](https://discourse.vfitoolkit.com/t/bug-in-simpanelvalues-transpath-infhorz/691)._
