This repository will have files related to Alisdair's lectures (found https://alisdairmckay.com/Notes/HetAgents/index.html) on solving heterogeneous-agent models. The individual problems are solved with the endogenous grid method and collocation. The egm files will have the implementation that follows precisely the methods delineated in Alisdair's notes.
For more on using residual methods like collocation methods, see the handbook chapter by Ellen McGrattan in Computational Methods for the Study of Dynamic Economies by Marimon and Scott. For more on residual methods to solve heterogeneous-agent models, see Aiyagari and McGrattan (1998). The appendix associated with the paper has detailed explanation of the use of residual methods to solve this class of models.
Note that the files solved with collocation run much faster than the ones with EGM. Potentially, there is some improvement that can be made upon the EGM files. If anyone finds such improvements, I'd appreciate a message (sent to fons0029@umn.edu).