This paper presents the theoretical structure of MAPMOD, a new IMF model designed to study vulnerabilities associated with excessive credit expansions, and to support macroprudential policy analysis. In MAPMOD, bank loans create purchasing power that facilitates adjustments in the real economy. But excessively large and risky loans can impair balance sheets and sow the seeds of a financial crisis. Banks respond to losses through higher spreads and rapid credit cutbacks, with adverse effects for the real economy. These features allow the model to capture the basic facts of financial cycles. A companion paper studies the simulation properties of MAPMOD.