Overview

Each example solves a published model end to end — build the grid and the guess, write the PDE function, solve, plot — and explains the solution economically. They are grouped by field and ordered roughly from the simplest to the most involved. The table flags what each example adds beyond the baseline workflow — nothing, for the simplest ones.

ExampleWhat's special
Neoclassical growth
Consumption–saving: two income statesborrowing constraint + Poisson switching (two unknown functions)
Consumption–saving: diffusion income2D + borrowing constraint
Consumption–saving: risky asset2D + borrowing constraint + custom boundary conditions (bc)
Wang–Wang–Yang: liquidity managementborrowing constraint + custom boundary conditions (bc)
Campbell–Cochrane: habit
Wachter: rare disasters
Bansal–Yaron: long-run risk2D
Haddad: endogenous volatility2D
Tuckman–Vila: finite horizontime-dependent (finite horizon)
Gârleanu–Panageas: heterogeneous agentsfour unknown functions
Gârleanu–Panageas: long-run risk3D + algebraic price functions (r, κC, κM, κV)
He–Krishnamurthy: intermediaries
Brunnermeier–Sannikov: macro-financetwo unknown functions + inner static root-find
Di Tella: balance-sheet risk2D + three unknown functions + algebraic equations (is_algebraic)
Gomez: wealth inequality
Leland: optimal defaultvariational inequality (lower_bound)
Bolton–Chen–Wang: financing constraintfree boundary (outer solve on bc)