This repository provides code and files for the paper "Solving heterogeneous-belief asset pricing models with short selling constraints and many agents" (Hatcher, 2024, Macroeconomic Dynamics); see https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4163831 and doi:10.1017/S1365100523000639.