Jorge Jesus Alonso Ortiz

Jorge Jesus Alonso Ortiz

Research, teaching, coding… and dogs

Advanced Macroeconomics

Advanced Macroeconomics · Leer en español →

ITAM · FALL 2026 · JORGE ALONSO-ORTIZ

Advanced Macroeconomics

A course on business cycles: what starts them, how they spread, and what households, firms and governments do about them. Data, econometrics and general-equilibrium models, with the tools used at central banks, consultancies and international organizations.

8

units, each with its slide deck

8

interactive labs in the browser

31

notebooks in Spanish and English, soon in Colab

0

licences: everything in Python with puremacro

Three questions organize the course

WHAT STARTS THEM?

Measure and decompose

National accounts, filters, cycle moments and wedge accounting: what needs explaining before proposing a model.

HOW DO THEY SPREAD?

Identify shocks

SVARs, narrative evidence and local projections, honest about which assumption produces each result.

WHAT DO AGENTS DO?

Model decisions

From the neoclassical model to RBC, from heterogeneous agents and HANK to sticky prices and labor-market search.

Units

Each unit opens with a claim the material defends: the slides argue it, the lab lets you explore it and the notebooks reproduce it with data. Slides are in Spanish.

BLOCK A · GROWTH AND FLUCTUATIONS WITHOUT FRICTIONS

UNIT A1 · WEEKS 1–2

Stylized facts: measuring the cycle

GDP is a revisable construct, and the filter you choose decides the cycle. Kaldor’s facts organize the long run; the labor share and TFP are the ones that are breaking.

Slides 1 (PDF)
Lab: How much of the cycle comes from the filter?
Notebooks: T01_A · T01_B · T01_C (coming soon to Colab)

UNIT A2 · WEEKS 3–4

The neoclassical growth model

Planner and market deliver the same allocation, and the parameters pin down the long run. Solving the model means choosing an approximation: local by perturbation, or global with the value function.

Slides 2 (PDF)
Lab: How fast does an economy reach its steady state?
Notebooks: T02_A (coming soon to Colab)

UNIT A3 · WEEK 5

Risk and uncertainty

Risk is modeled with states of nature, and the full risk sharing that implies is rejected by the data.

Slides 3 (PDF)
Lab: What is lost when an AR(1) becomes a Markov chain?
Notebooks: T03_A · T03_B · T03_C · T03_D · T03_E · T03_F (coming soon to Colab)

UNIT A4 · WEEKS 7–8

Real business cycles and business-cycle accounting

The cycle is summarized by second moments, and a calibrated RBC matches only some of them. Every shock can be quantified, and the wedges point to the equation of the model that fails.

Slides 4 (PDF)
Lab: Can productivity shocks alone explain the business cycle?
Notebooks: T02_B · T04_A · T04_C (coming soon to Colab)

UNIT A5 · WEEKS 9–10

Empirical identification: SVARs, narrative evidence and local projections

Identifying a shock requires an assumption, and the assumption decides the result. Narrative methods and local projections change the identifying assumption; they don’t remove it.

Slides 5 (PDF)
Lab: What does a rate hike do to output?
Notebooks: T05_A · T05_B · T05_C · T05_D · T05_E · T05_F (coming soon to Colab)

UNIT A6 · WEEK 11

Incomplete markets, heterogeneity and HANK

When the aggregate state is a distribution, the multiplier is no longer a free parameter.

Slides 6 (PDF)
Lab: What happens when no one can insure their income?
Notebooks: T06_A · T06_B · T06_C (coming soon to Colab)

BLOCK B · MODELS WITH FRICTIONS

UNIT B1 · WEEKS 13–14

Mechanisms: labor, capital and the small open economy

The macro labor-supply elasticity is produced by aggregation, not by microeconometrics. Variable utilization, adjustment costs and openness account for the part of the cycle that productivity does not.

Slides 7 (PDF)

UNIT B2 · WEEKS 15–16

Non-competitive markets: sticky prices and labor-market frictions

With sticky prices money stops being neutral and the Phillips curve gets a slope. With search frictions unemployment is an equilibrium, not a residual.

Slides 8 (PDF)
Lab: How much output does it cost to bring inflation down?
Lab: Why is there unemployment when there are vacancies?
Notebooks: T02_C · T02_D · T08_A (coming soon to Colab)

Notebooks

The course notebooks are being published over the next few days. Each will open in Google Colab with one click, install puremacro and download only the data it needs.

NotebookTopic
T00Course map and environment check
T01_ABusiness-cycle facts from the labor side: HP, Hamilton, Okun and Beveridge
T01_BNational accounts across 49 countries
T01_CHigh-frequency indicators and uncertainty
T02_ANeoclassical growth: local and global solutions
T02_BThe RBC model from a .mod file
T02_CThe three-equation New Keynesian model
T02_DThe zero lower bound with OccBin
T02_EBayesian estimation of a DSGE model
T02_FMacro-finance: Gertler–Karadi
T03_AAggregate shocks
T03_BVolatility: GARCH and DCC
T03_CGrowth at risk
T03_DUncertainty indices from text
T03_EUncertainty with local language models
T03_FCentral-bank narratives with language models
T04_AThe tax multiplier three ways
T04_CBusiness-cycle accounting: the four wedges
T05_ASVAR identification
T05_BLocal projections
T05_CStaggered difference-in-differences
T05_DLP-DiD
T05_EGeneralized impulse responses by regime
T05_FAn SVAR of post-pandemic inflation
T06_AWealth inequality: Aiyagari–Huggett
T06_BLife cycle and demographics
T06_CPortfolios and Epstein–Zin preferences
T07_AFirm dynamics: Hopenhayn
T08_ALabor flows: Shimer and Mexico’s four-state ENOE
T09_AValidation gallery
T09_BBuild your own index

Calendar

One session a week. Day, time, room and any changes are announced on Canvas, the course’s official channel.

Wk.DatesContentDue
1Aug 10–14National accounts, real-time data and revisions; Hodrick–Prescott and Hamilton filters.
2Aug 17–21Kaldor facts beyond the US; measuring capital, the labor share, TFP and intangibles; the Beveridge curve.Homework 1 out
3Aug 24–28Neoclassical model: planner, competitive equilibrium, steady state and balanced growth path.
4Aug 31–Sep 4Log-linearization, simulating .mod models, the Bellman equation and value function iteration.
5Sep 7–11Arrow–Debreu markets; Tauchen and Rouwenhorst; the endogenous grid method; stochastic volatility and growth at risk.Homework 1 due
Sep 14–18Mexican Independence week: no session on Wednesday 16.
6Sep 21–25First midterm (Wednesday 23), units A1–A3.Midterm 1
7Sep 28–Oct 2Real business cycles: Kydland–Prescott moments, the RBC model and its calibration.
8Oct 5–9Hansen’s indivisible labor; a taxonomy of shocks; Chari–Kehoe–McGrattan business-cycle accounting.Homework 2 out
9Oct 12–16VARs, Cholesky and Blanchard–Quah; the evidence on technology shocks (Galí 1999, Fisher 2006).
10Oct 19–23Narrative methods, proxy SVARs and monetary shocks (including Banxico announcements); local projections and state-dependent multipliers.Homework 2 due
11Oct 26–30Precautionary saving, Aiyagari–Huggett, the wealth distribution, marginal propensities to consume and HANK.Homework 3 and the AI audit out
12Nov 2–6Second midterm (Wednesday 4), units A4–A5.Midterm 2
13Nov 9–13Labor supply over the cycle: indivisible labor, extensive and intensive margins, home production.Homework 3 due; final project out
14Nov 16–20Variable utilization, adjustment costs and Tobin’s q; the small open economy (Aguiar–Gopinath).Homework 4 out; AI audit due (Fri 20)
15Nov 23–27Monopolistic competition and markups; price rigidity, monetary non-neutrality and the 2021–2023 inflation.
16Nov 30–Dec 2Mortensen–Pissarides, the Shimer puzzle and the Hosios condition; Mexico’s dual labor market (ENOE, F/I/U/N).Homework 4 due; project presentation
Dec 7–19In-class theory final (B1–B2) and take-home computational final (A6 and the empirical part).Finals

Grading

ComponentWeight
Four programming homeworks20%
Adversarial audit of AI-generated code10%
Final project10%
First midterm (A1–A3)15%
Second midterm (A4–A5)15%
Theory final (B1–B2)15%
Computational final (A6 and empirical part)15%

HOW WE WORK

All in Python, nothing to license

The course’s models, estimates and figures run on puremacro, a pure-Python library that also reads Dynare .mod files. It works in Colab, on a laptop and even on an iPad.

pip install puremacro

Homework includes an adversarial audit: finding the bugs in code written by an AI. Reading code with suspicion is part of the craft.