Econometrics, Quantitative Economics, Data Science


ECON-GA 3503.1410

‘math+econ+code’ masterclass on optimization in economics: optimal transport, demand models and matching models

NYU Courant Institute, January 14-18, 2019 (30 hours)

Instructor: A. Galichon (NYU Econ+Math)


This intensive course, part of the ‘math+econ+code’ series, is focused on models of demand, matching models, and optimal transport methods, with various applications pertaining to labor markets, economics of marriage, industrial organization, matching platforms, networks, and international trade, from the crossed perspectives of theory, empirics and computation. It will introduce tools from economic theory, mathematics, econometrics and computing, on a needs basis, without any particular prerequisite other than the equivalent of a first year graduate sequence in econ or in applied math.
Because it aims at providing a bridge between theory and practice, the teaching format is somewhat unusual: each teaching “block” will be made of 50 minutes of theory followed by 1 hour of coding, based on an empirical application related to the theory just seen. Students are expected to write their own code, and we will ensure that it is operational at the end of each block. This course is therefore closer to cooking lessons than to traditional lectures.
The course, jointly offered by NYU Econ and the Courant Institute, is open to graduate students in the fields of economics and applied mathematics, but also in other quantitative disciplines. Students need to bring a laptop with them to the lectures. The knowledge of a particular programming language is not required; students are however expected to have some experience with programming. The course can be taken for credit or as a registered auditor.
The lecturer is Alfred Galichon (professor of economics and of mathematics at NYU). James Nesbit (graduate Economics student at NYU) helped prepare the course material. The course is partly based on Galichon’s book, Optimal Transport Methods in Economics.

Support from NSF grant DMS-1716489 is acknowledged.

Course material

Available on Github here.

Practical information

• Schedule: Mon 1/14 — Fri 1/18, 2019, 9am-1pm and 2pm-4pm. Location: WWH 101 in the Courant building (251 Mercer St)
• Credits: 2, assessed through a take-home exam or a short final paper, at the student’s option.
• A syllabus is available at
• Students need to register on Albert (code ECON-GA 3503.1410). For more information please contact:


• Monday: linear programming, dynamic programming, network flows
• Tuesday: optimal transport toolbox
• Wednesday: convex analysis, nonlinear inverse problems, and multivariate quantiles
• Thursday: static and dynamic multinomial choice
• Friday: statistical estimation of models of matching with transfers


Part I: Tools
Day 1: linear programming (Monday)
Block 1. Basics of linear programming (morning 1st half)
• Theory: linear programming duality; complementary slackness; minimax formulation
• Coding: How to eat optimally? Dataset: Stigler’s original diet data (1945).
Block 2. Network flow problems (morning 2nd half)
• Theory: directed graphs and min-cost flow problem
• Coding: How to find the shortest path through a network? Dataset: Paris subway; New York City street network.
Block 3. Dynamic programming as linear programming (afternoon)
• Theory: Bellman’s equation; interpretation of duality; forward induction, backward induction
• Coding: When to repair mechanical engines? Dataset: Rust’s bus maintenance data (1994).

Day 2: optimal transport I (Tuesday)
Block 4. Discrete matching (morning 1st half)
• Theory: Shapley-Shubik duality; stability; decentralized equilibrium
• Coding: How to solve it? Dataset from Dupuy and Galichon (JPE 2014).
Block 5. Positive assortative matching (morning 2nd half)
• Theory: Becker’s model; compensating differentials; comonotonicity
• Coding: What is a CEO worth? Dataset: Gabaix-Landier’s (QJE 2008) CEO pay data.

Block 6. Hotelling’s characteristics model (afternoon)
• Theory: power diagrams, Aurenhammer’s method
• Coding: How to infer the unobservable quality of a car model? Dataset: Feenstra-Levinsohn (Restud 1994) car data.

Day 3: optimal transport II (Wednesday)
Block 7. Continuous multivariate matching (morning 1st half)
• Theory: Knott-Smith criterion; Brenier’s map; McCann’s theorem
• Applications: exercises.
Block 8. A short tutorial on convex analysis (morning 2nd half)
• Theory: convex duality; Fenchel’s inequality; subdifferentials and their inverses
• Application: exercises.
Block 9. Regularized optimal transport (afternoon)
• Theory: optimal transport with entropic regularization, and with other regularizations.
• Coding: coordinate descent and the IPFP algorithm.

Part II. Models
Day 4: models of static and dynamic multinomial choice (Thursday)
Block 10. Basics of static discrete choice (morning 1st half)
• Theory: Dary-Zachary-Williams theorem, generalized entropy of choice, the inversion theorem
• Coding: How to solve it? simulation methods; AR, SARS, and GHK. Dataset: Greene and Hensher (1997) data on choice of travel mode.
Block 11. Demand models, old and new (morning 2nd half)
• Theory: the GEV model; the random coefficient logit model and the pure characteristics models
• Coding: How to estimate demand for automobiles? Dataset: BLP.
Block 12. Dynamic discrete choice methods (afternoon)
• Theory: Rust’s model; estimation; normalization issues
• Coding: maintenance choice.

Day 5: empirical matching models, the quasilinear case (Friday)
Block 13. Separable models of matching (morning 1st half)
• Theory: matching with unobservable heterogeneity
• Coding: Did Roe vs. Wade decrease the value of marriage? Dataset: Choo and Siow (JPE 2006).
Block 14. The gravity equation (morning 2nd half)
• Theory: optimal transport and the gravity equation; generalized linear models and pseudo-Poisson maximum likelihood estimation
• Coding: How to forecast international trade flows? estimating the gravity equation based on WTO international trade data.
Block 15. High-dimensional matching models (afternoon)
• Theory: estimation of rank-constrained models
• Application: Does physical appearance have a price? matching on socioeconomic and anthropomorphic characteristics. Dataset: Chiappori, Oreffice and Quintana-Domeque’s (JPE 2012).