# Uncategorized

**URL:** https://discourse.vfitoolkit.com/c/uncategorized/1.md?page=3

[Latest](https://discourse.vfitoolkit.com/latest.md) · [Categories](https://discourse.vfitoolkit.com/categories.md)

**Page:** 4

---

## [Lecture notes on Computational Methods for Macro by Anmol Bhandari](https://discourse.vfitoolkit.com/t/lecture-notes-on-computational-methods-for-macro-by-anmol-bhandari/641)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 0\
**Last updated:** [April 22, 2026, 3:58pm UTC](https://discourse.vfitoolkit.com/t/lecture-notes-on-computational-methods-for-macro-by-anmol-bhandari/641 "2026-04-22T15:58:58Z")

</div>

Impressive set of lecture notes by Anmol Bhandari on computational methods for macro. The part of automatic differentiation is very interesting.

---

## [Rust (2019) - Has dynamic programming improved decision making?](https://discourse.vfitoolkit.com/t/rust-2019-has-dynamic-programming-improved-decision-making/639)

<div class="topic-metadata">

**Author:** [@robertdkirkby](https://discourse.vfitoolkit.com/u/robertdkirkby)\
**Replies:** 0\
**Last updated:** [April 21, 2026, 1:02am UTC](https://discourse.vfitoolkit.com/t/rust-2019-has-dynamic-programming-improved-decision-making/639 "2026-04-21T01:02:53Z")

</div>

A lot of what VFI Toolkit does is dynamic programming (dynamic programming together with markov processes gives ‘markov decision problems’, a.k.a. value fn problems). This article by John Rust might interest some people…

---

## [Matlab skills for claude and codex](https://discourse.vfitoolkit.com/t/matlab-skills-for-claude-and-codex/638)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 2\
**Last updated:** [April 20, 2026, 10:48am UTC](https://discourse.vfitoolkit.com/t/matlab-skills-for-claude-and-codex/638 "2026-04-20T10:48:23Z")

</div>

Mathworks has released an official set of skills to be used with AI agents in Matlab. There is a very interesting post by Mike Croucher: https://blogs.mathworks.com/matlab/2026/04/13/introducing-the-matlab-agentic-toolk…

---

## [Transitions in growth models](https://discourse.vfitoolkit.com/t/transitions-in-growth-models/344)

<div class="topic-metadata">

**Author:** [@jake88](https://discourse.vfitoolkit.com/u/jake88)\
**Replies:** 7\
**Last updated:** [April 17, 2026, 11:34pm UTC](https://discourse.vfitoolkit.com/t/transitions-in-growth-models/344 "2026-04-17T23:34:55Z")

</div>

I am interested in computing transitional dynamics in the context of the neoclassical growth model. I know I can use Dynare for this, but I am trying to learn computations with dynamic programming, because later I would…

---

## [Possible Bug With \`gridinterplayer = 1\` and Semi-Exogenous States](https://discourse.vfitoolkit.com/t/possible-bug-with-gridinterplayer-1-and-semi-exogenous-states/637)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 2\
**Last updated:** [April 16, 2026, 9:48pm UTC](https://discourse.vfitoolkit.com/t/possible-bug-with-gridinterplayer-1-and-semi-exogenous-states/637 "2026-04-16T21:48:33Z")

</div>

I found what looks like a bug in the finite-horizon stationary-distribution code for models with semi-exogenous states when gridinterplayer = 1. Summary The model runs through with simoptions.gridinterplayer = 0. T…

---

## [New Bug in StationaryDist\_FHorz\_Iteration\_SemiExo\_noz\_raw](https://discourse.vfitoolkit.com/t/new-bug-in-stationarydist-fhorz-iteration-semiexo-noz-raw/636)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 8\
**Last updated:** [April 16, 2026, 1:47pm UTC](https://discourse.vfitoolkit.com/t/new-bug-in-stationarydist-fhorz-iteration-semiexo-noz-raw/636 "2026-04-16T13:47:12Z")

</div>

I got this error: Error using sparse Vectors must be the same length. Error in StationaryDist\_FHorz\_Iteration\_SemiExo\_noz\_raw (line 46) Gammatranspose=sparse(Policy\_aprimesemiz(:,:,jj),II2,semiztransitions,N\_a\*N\_se…

---

## [Parameters that depend on permanent types](https://discourse.vfitoolkit.com/t/parameters-that-depend-on-permanent-types/621)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 8\
**Last updated:** [April 12, 2026, 10:02pm UTC](https://discourse.vfitoolkit.com/t/parameters-that-depend-on-permanent-types/621 "2026-04-12T22:02:35Z")

</div>

Suppose I have two permanent types, \\theta\_e \\in \\{0,1\\} and \\theta\_h \\in \\{0,1\\}. Think of them as education and ‘genetic’ health, respectively, but they can be whatever you want. Furthermore, assume there is a paramete…

---

## [InfHorz + Transitions, ExpAssets questions](https://discourse.vfitoolkit.com/t/infhorz-transitions-expassets-questions/623)

<div class="topic-metadata">

**Author:** [@MichaelTiemann](https://discourse.vfitoolkit.com/u/MichaelTiemann)\
**Replies:** 18\
**Last updated:** [April 9, 2026, 4:26am UTC](https://discourse.vfitoolkit.com/t/infhorz-transitions-expassets-questions/623 "2026-04-09T04:26:30Z")

</div>

I have spent some time reading VFI in InfHorz: Howards, PFI, and relation to implicit finite differences, which gives some background to the question(s) I pose here. I’m modeling an energy provider (InfHorz) navigating …

---

## [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)

<div class="topic-metadata">

**Author:** [@robertdkirkby](https://discourse.vfitoolkit.com/u/robertdkirkby)\
**Replies:** 2\
**Last updated:** [April 9, 2026, 3:42am UTC](https://discourse.vfitoolkit.com/t/runtime-improvement-to-fhorz-agent-distribution-iteration-with-semi-exogenous-state/635 "2026-04-09T03:42:20Z")

</div>

As a user you don’t have to follow this post, just enjoy faster runtimes for creating agent distribution in FHorz models with semi-exogenous shocks. Is explaining internal details of an improvement. I have a FHorz model…

---

## [Bug in LifeCycleProfiles\_FHorz\_Case1\_PType](https://discourse.vfitoolkit.com/t/bug-in-lifecycleprofiles-fhorz-case1-ptype/622)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 10\
**Last updated:** [April 8, 2026, 11:13am UTC](https://discourse.vfitoolkit.com/t/bug-in-lifecycleprofiles-fhorz-case1-ptype/622 "2026-04-08T11:13:02Z")

</div>

The call to function LifeCycleProfiles\_FHorz\_Case1\_PType returned this error: Unrecognized function or variable 'tempStats2'. Error in LifeCycleProfiles\_FHorz\_Case1\_PType (line 1127) Age…

---

## [Bug in EvalFnOnAgentDist\_ValuesOnGrid\_FHorz\_Case1\_PType](https://discourse.vfitoolkit.com/t/bug-in-evalfnonagentdist-valuesongrid-fhorz-case1-ptype/620)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 5\
**Last updated:** [April 8, 2026, 1:08am UTC](https://discourse.vfitoolkit.com/t/bug-in-evalfnonagentdist-valuesongrid-fhorz-case1-ptype/620 "2026-04-08T01:08:49Z")

</div>

I think there is a bug in EvaluateFnOnAgentDist/FHorz/PType/EvalFnOnAgentDist\_ValuesOnGrid\_FHorz\_Case1\_PType.m when it is used in a finite-horizon PType model with: no ordinary exogenous state (n\_z = 0) a semi-ex…

---

## [Potential Bugs in CalibrateBIHAModels](https://discourse.vfitoolkit.com/t/potential-bugs-in-calibratebihamodels/632)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 4\
**Last updated:** [April 7, 2026, 10:06am UTC](https://discourse.vfitoolkit.com/t/potential-bugs-in-calibratebihamodels/632 "2026-04-07T10:06:59Z")

</div>

Potential Bugs in CalibrateBIHAModel.m I’ve been reviewing the function CalibrateBIHAModel.m from the VFI Toolkit and found several issues that look like bugs, especially in the logmoments section. I’m sharing them here…

---

## [Pseudocodes document not aligned](https://discourse.vfitoolkit.com/t/pseudocodes-document-not-aligned/631)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 1\
**Last updated:** [April 7, 2026, 3:51am UTC](https://discourse.vfitoolkit.com/t/pseudocodes-document-not-aligned/631 "2026-04-07T03:51:00Z")

</div>

The pseudocodes document in vfi toolkit repo is not aligned to the same document in kirlby repo Pseudocodes/VFI\_PseudoCodes.pdf at main · vfitoolkit/Pseudocodes · GitHub To avoid this, I suggest moving the tex and bib f…

---

## [PR to fix bugs in LifeCycleProfiles\_FHorz\_Case1\_PType and in SimPanelValues\_FHorz\_Case1\_PType](https://discourse.vfitoolkit.com/t/pr-to-fix-bugs-in-lifecycleprofiles-fhorz-case1-ptype-and-in-simpanelvalues-fhorz-case1-ptype/627)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 1\
**Last updated:** [April 7, 2026, 2:49am UTC](https://discourse.vfitoolkit.com/t/pr-to-fix-bugs-in-lifecycleprofiles-fhorz-case1-ptype-and-in-simpanelvalues-fhorz-case1-ptype/627 "2026-04-07T02:49:31Z")

</div>

I have done some PR that should fix all bugs in LifeCycleProfiles\_FHorz\_Case1\_PType and in SimPanelValues\_FHorz\_Case1\_PType. The PR is here: Finite-horizon fixes plus infinite-horizon refinement and nod updates by aledin…

---

## [Potential Issues in \`ValueFnIter/FHorz/SemiExo\`](https://discourse.vfitoolkit.com/t/potential-issues-in-valuefniter-fhorz-semiexo/633)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 1\
**Last updated:** [April 6, 2026, 11:41pm UTC](https://discourse.vfitoolkit.com/t/potential-issues-in-valuefniter-fhorz-semiexo/633 "2026-04-06T23:41:37Z")

</div>

Potential Issues in ValueFnIter/FHorz/SemiExo I have been going through the MATLAB implementation of finite-horizon VFI with semi-exogenous shocks in: ValueFnIter/FHorz/SemiExo and wanted to report a few issues (maybe …

---

## [Minor improvement to ValueFnIter\_Refine](https://discourse.vfitoolkit.com/t/minor-improvement-to-valuefniter-refine/628)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 1\
**Last updated:** [April 6, 2026, 7:45pm UTC](https://discourse.vfitoolkit.com/t/minor-improvement-to-valuefniter-refine/628 "2026-04-06T19:45:07Z")

</div>

This is more a performance issue than a bug. In ValueFnIter/InfHorz/Refinement/ValueFnIter\_Refine.m I changed Policy=zeros(2,N\_a,N\_z); to Policy=zeros(2,N\_a,N\_z,'gpuArray'); This keeps everything on the GPU instead …

---

## [Topping up experience asset...and accounting for it](https://discourse.vfitoolkit.com/t/topping-up-experience-asset-and-accounting-for-it/629)

<div class="topic-metadata">

**Author:** [@MichaelTiemann](https://discourse.vfitoolkit.com/u/MichaelTiemann)\
**Replies:** 3\
**Last updated:** [April 5, 2026, 10:09pm UTC](https://discourse.vfitoolkit.com/t/topping-up-experience-asset-and-accounting-for-it/629 "2026-04-05T22:09:37Z")

</div>

A household acquires an experience asset with monies they have at the time. It is easy to calculate the cost of the initial acquisition of the experience asset and charge that cost against the consumption function. Lat…

---

## [Replication of Boar and Midrigan (2022)](https://discourse.vfitoolkit.com/t/replication-of-boar-and-midrigan-2022/527)

<div class="topic-metadata">

**Author:** [@javier\_fernan](https://discourse.vfitoolkit.com/u/javier_fernan)\
**Replies:** 85\
**Last updated:** [April 1, 2026, 11:30pm UTC](https://discourse.vfitoolkit.com/t/replication-of-boar-and-midrigan-2022/527 "2026-04-01T23:30:23Z")

</div>

Dear Robert, I am interested in a recent paper by Boar and Midrigan (2022), Efficient Redistribution, published on the Journal of Monetary Economics. Having the replication of this paper in the toolkit would greatly he…

---

## [How visible is the VFI Toolkit to AI? Tips and Tricks](https://discourse.vfitoolkit.com/t/how-visible-is-the-vfi-toolkit-to-ai-tips-and-tricks/607)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 19\
**Last updated:** [April 1, 2026, 8:02pm UTC](https://discourse.vfitoolkit.com/t/how-visible-is-the-vfi-toolkit-to-ai-tips-and-tricks/607 "2026-04-01T20:02:20Z")

</div>

I asked this question in ChatGPT 5.4 Are the toolkit matlab files publicly accessible? Can you access them easily? What can we do to increase their visibility to AI? ChatGPT gave a fairly informative answer, with sugge…

---

## [Bug in StationaryDist\_FHorz\_Iteration\_SemiExo\_noz\_raw](https://discourse.vfitoolkit.com/t/bug-in-stationarydist-fhorz-iteration-semiexo-noz-raw/619)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 11\
**Last updated:** [March 31, 2026, 7:56pm UTC](https://discourse.vfitoolkit.com/t/bug-in-stationarydist-fhorz-iteration-semiexo-noz-raw/619 "2026-03-31T19:56:14Z")

</div>

I think there is a bug in the way this function indexes the finite-horizon semi-exogenous transition matrix. This is the function: Relevant object The input pi\_semiz\_J is a 4-dimensional array with size \[N\_semiz, N\_s…

---

## [Semi-exogenous shocks with permanent types](https://discourse.vfitoolkit.com/t/semi-exogenous-shocks-with-permanent-types/609)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 24\
**Last updated:** [March 30, 2026, 9:36pm UTC](https://discourse.vfitoolkit.com/t/semi-exogenous-shocks-with-permanent-types/609 "2026-03-30T21:36:09Z")

</div>

I might have asked already this question some time ago but I tend to forget :slight\_smile: Suppose I have a semi-exogenous shock that is age and type dependent, so the transition matrix is \\pi(semiz,semiz'| d,j,\\theta…

---

## [Economic flat earth created by ReturnFn?](https://discourse.vfitoolkit.com/t/economic-flat-earth-created-by-returnfn/618)

<div class="topic-metadata">

**Author:** [@MichaelTiemann](https://discourse.vfitoolkit.com/u/MichaelTiemann)\
**Replies:** 2\
**Last updated:** [March 30, 2026, 8:06pm UTC](https://discourse.vfitoolkit.com/t/economic-flat-earth-created-by-returnfn/618 "2026-03-30T20:06:20Z")

</div>

I’m confused by the behavior of this part of my return function: %% Allow/Disallow some trivial agent decisions if (sprime-s\>0 && aprime+hprimecost\<0 ... % Cannot buy shares with negative net worth || ag…

---

## [General Equilibria and pricing tensions](https://discourse.vfitoolkit.com/t/general-equilibria-and-pricing-tensions/593)

<div class="topic-metadata">

**Author:** [@MichaelTiemann](https://discourse.vfitoolkit.com/u/MichaelTiemann)\
**Replies:** 5\
**Last updated:** [March 26, 2026, 11:20pm UTC](https://discourse.vfitoolkit.com/t/general-equilibria-and-pricing-tensions/593 "2026-03-26T23:20:07Z")

</div>

Apologies is this is an overly naive take. It is clear from other threads about GE that there are very well-understood solutions to very specific problems. But I think I discovered something while studying OLGModel14. …

---

## [Could i set two experienceasset?](https://discourse.vfitoolkit.com/t/could-i-set-two-experienceasset/616)

<div class="topic-metadata">

**Author:** [@LeonChen](https://discourse.vfitoolkit.com/u/LeonChen)\
**Replies:** 7\
**Last updated:** [March 24, 2026, 11:24pm UTC](https://discourse.vfitoolkit.com/t/could-i-set-two-experienceasset/616 "2026-03-24T23:24:20Z")

</div>

I want to introduce single men, single women and married couple households into the model. Everyone has experience assets, so it is necessary to decide their working hours separately in the married couple households subj…

---

## [ExogShockSetup error](https://discourse.vfitoolkit.com/t/exogshocksetup-error/617)

<div class="topic-metadata">

**Author:** [@robertdkirkby](https://discourse.vfitoolkit.com/u/robertdkirkby)\
**Replies:** 0\
**Last updated:** [March 23, 2026, 9:53pm UTC](https://discourse.vfitoolkit.com/t/exogshocksetup-error/617 "2026-03-23T21:53:02Z")

</div>

I just renamed an internal command from ExogShockSetup to ExogShockSetup\_InfHorz. I think I changed all instances of this command being called but if anyone gets an error that ExogShockSetup cannot be found, please let m…

---

## [KronPolicyIndexes question](https://discourse.vfitoolkit.com/t/kronpolicyindexes-question/613)

<div class="topic-metadata">

**Author:** [@MichaelTiemann](https://discourse.vfitoolkit.com/u/MichaelTiemann)\
**Replies:** 2\
**Last updated:** [March 23, 2026, 7:45am UTC](https://discourse.vfitoolkit.com/t/kronpolicyindexes-question/613 "2026-03-23T07:45:18Z")

</div>

I have reached some new code now that my transition paths are converging to the L-infinity value. I’m looking at KronPolicyIndexes\_Case1\_e but dealing with a case where my n\_a includes an experience asset. Note that to…

---

## [intermediateEqns](https://discourse.vfitoolkit.com/t/intermediateeqns/615)

<div class="topic-metadata">

**Author:** [@robertdkirkby](https://discourse.vfitoolkit.com/u/robertdkirkby)\
**Replies:** 0\
**Last updated:** [March 23, 2026, 7:44am UTC](https://discourse.vfitoolkit.com/t/intermediateeqns/615 "2026-03-23T07:44:34Z")

</div>

heteroagentoptions.intermediateEqns are now full citizens of the toolkit and work in all the stationary general equilibrium and in the calibration commands than include stationary general equilibrium (so, e.g., they won’…

---

## [Calibrate infinite horizon model](https://discourse.vfitoolkit.com/t/calibrate-infinite-horizon-model/409)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 37\
**Last updated:** [March 23, 2026, 7:33am UTC](https://discourse.vfitoolkit.com/t/calibrate-infinite-horizon-model/409 "2026-03-23T07:33:29Z")

</div>

Working on an infinite horizon model and I realized that it would be nice to have a command to calibrate the model parameters :slight\_smile: I would like to add the calibration targets to the general equilibrium conditi…

---

## [Health papers and VFI Toolkit](https://discourse.vfitoolkit.com/t/health-papers-and-vfi-toolkit/611)

<div class="topic-metadata">

**Author:** [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)\
**Replies:** 14\
**Last updated:** [March 20, 2026, 2:56am UTC](https://discourse.vfitoolkit.com/t/health-papers-and-vfi-toolkit/611 "2026-03-20T02:56:04Z")

</div>

I’m interested in macro-health literature and would like an assessment on whther the VFI-toolkit is able to solve the quantitative models presented in these papers: A life-cycle model of unemployment and disability ins…

---

## [Parameters, AggVars, and GE Prices](https://discourse.vfitoolkit.com/t/parameters-aggvars-and-ge-prices/606)

<div class="topic-metadata">

**Author:** [@MichaelTiemann](https://discourse.vfitoolkit.com/u/MichaelTiemann)\
**Replies:** 9\
**Last updated:** [March 20, 2026, 2:19am UTC](https://discourse.vfitoolkit.com/t/parameters-aggvars-and-ge-prices/606 "2026-03-20T02:19:51Z")

</div>

The general and greatly simplified process of the HeteroAgentStationaryEqm subfns is: Update Parameters with GEPriceParameters (as proposed by. the solver) Compute V and Policy using Value Function Iteration (using gri…

[Previous page](https://discourse.vfitoolkit.com/c/uncategorized/1.md?page=2)

[Next page](https://discourse.vfitoolkit.com/c/uncategorized/1.md?page=4)
