Every figure below was made by code that ships with puremacro: one of its 92 example scripts, one of its showcase notebooks or one of its guides. Click a figure to enlarge it; the link under it opens the code. The figures are restyled for this site, and the scripts draw them in their own style.
Notebook 21’s precautionary-savings model, declared with dp: mean assets 6.5733 and a wealth Gini of 0.3494, both exact. A simulated panel that starts everyone at a = 0.1 overshoots to 0.4449 at t = 10 and settles at 0.3496 by t = 199. · Notebook 21Three models from the dp guide, solved by EGM: a life cycle whose mean assets peak at retirement (age 45), a work-or-not choice with taste shocks (participation 63.3%), and a Krusell–Smith economy whose forecast rule converges in 8 rounds with R² of 0.99996. · CodeSCF 2025 against an Aiyagari economy with β calibrated to the median wealth-to-income ratio (β = 0.9521, s.e. 0.0023). The model’s Gini is 0.590 against 0.824 in the data, and its top 1% holds 6.3% of net worth against 31.3%: one asset and earnings risk miss the top, as the literature expects. · Code
New in 4.8
Economies with data in each year, by one-call panel builder, rebuilt offline from the cached live pulls of 7 October 2026. Consumer prices reach back to 1913 (BIS) and 1914 (IMF, OECD); the Maddison Project goes back to 1 AD. · CodeMexico’s real GDP per capita from the World Bank, extended back to 1950 with the Penn World Table and to 1800 with the Maddison Project. Of the 16 seams for eight economies, four drift by more than 2% across their overlap and are flagged; three carry a change of units. · Code
New in 4.2
Common support overlap trimming, unbiased treatment effects for DML-IRM (10.89) and DML-IV (12.20 vs true 12.50) compared to naive OLS (13.72), and effective F of 268. · Notebook 60Dynamic factor trajectories, exact Bańbura–Modugno news decomposition by indicator release, and calibrated predictive density fan chart (PIT p = 0.96). · Notebook 59
New in 4.0
Saving and the stationary wealth density of a continuous-time household at r = 3%, and the Aiyagari equilibrium where capital supply meets demand at r* = 1.89%. · Notebook 56A demand and credit shock with a zero lower bound and a borrowing limit: both bind on impact, the rate stays at zero for three quarters, and output falls 14.6% instead of 9.4% in the linear model. · Notebook 57Double/debiased ML covers the true effect of 1.75 with its 95% interval, while a Lasso that also penalizes the treatment shrinks it to 1.58. With 30 controls and 500 observations, OLS is still valid too. · Notebook 57On the notebook’s simulated panel: a revision triangle for GDP growth, first releases against the latest snapshot, and a Mankiw–Shapiro test that rejects both news and noise. · Notebook 58With a strong instrument, Wald bands and Anderson–Rubin sets agree. With a weak one, the Wald band still looks informative while the Anderson–Rubin set covers the whole line. · Code
New in 3.3
Chebyshev interpolants ring around the kink; the finite-element solution sits on the exact policy. · Notebook 51A +5% TFP shock in an Aiyagari economy: the real rate, capital-market clearing and wealth inequality along the transition. · Notebook 52Left: how the savings policy responds to each parameter. Right: the estimator’s path on the loss surface. · Notebook 53A ten-country growth model: convergence from a capital shortage, and one slice of the learned policy. · Notebook 54
Impulse responses & identification
Narrative sign restrictions around the October 1979 Volcker episode (Antolín-Díaz & Rubio-Ramírez, 2018), on a synthetic DGP · Code
Lag-augmented vs Newey–West local projections (Plagborg-Møller & Wolf) · Code
Cholesky vs non-Gaussian SVAR impulse responses · CodeSign-restricted SVAR: standard vs Giacomini–Kitagawa robust bands · Code
Proxy SVAR on a controlled synthetic DGP, Mertens–Ravn style · Code
Replications on real data
Galí (1999): hours after a technology shock, in differences and in levels · CodeRamey & Zubairy (2018): state-dependent spending multipliers and weak-IV diagnostics · CodeGalí (1999) and Mertens & Ravn (2013) from the built-in datasets · Code
Kilian (2009): oil-market shocks and the historical decomposition of the real oil price · Code
Structural models
Sequence-space HANK: wealth distribution, MPCs, responses to a rate hike and the Jacobian · CodeA Dynare-style HANK bridge: Fake News Jacobian and a −25 bp monetary shock · CodeBayesian DSGE with NUTS: traces and posteriors · Code
An RBC model simulated from its Klein QZ policy function · Code
Posterior distributions from the NUTS sampler · Code
DICE climate-macro: temperature, emissions, damages and the social cost of carbon · Code
Time variation, regimes & volatility
TVP-VAR with stochastic volatility (KSC mixture sampler) · Code
Nowcasting GDP: latent factors, loadings and the news decomposition · CodeA hawkishness index from FOMC communication and its effect on rates and inflation · Code