'math+econ+code' masterclass

on equilibrium transport

and matching models in economics

June 13-17, 2022

This intensive course, part of the 'math+econ+code' series, is focused on the computation of competitive equilibrium with substitutes, which is at the core of surge pricing engines and allocation mechanisms. It will investigate diverse applications such as surge pricing, matching platforms and network congestion. It provides a bridge between theory, empirics and computation and will introduce tools from economics, mathematical and computer science. Students will have the opportunity to write their own code (in Python), in the spirit of cooking lessons. Mathematical concepts (such as lattice programming, supermodularity, discrete convexity, Perron-Froebenius theory, etc.) will be taught on a needs basis while studying various economic models. The same is true of computational methods (such as tatonnement algorithms, asynchronous parallel computation, mathematical programming under equilibrium constraints, etc.). Hence there are no prerequisite other than the equivalent of a first-year graduate sequence in econ, applied mathematics or other quantitative disciplines. 

This course is very demanding from students, but the learning rewards are high.

Practical information

  •  Applications are not open yet. Seats will be limited. To apply, a from will be available to fill out and applicants should have a faculty advisor send a reference letter to math.econ.code@gmail.com. The deadline to apply will be May 1, 2022.

Course outline

Day 1: competitive equilibrium

with gross substitutes

Monday, 4h


Walrasian equilibrium and gross substitutes. Hedonic pricing. Jacobi algorithm.

Day 2: matching models with transferable utility 

Tuesday, 4h

Optimization and equilibrium formulation. Duality. Computation by descent methods. Sinkhorn's algorithm.

Day 3: matching models with imperfectly transferable utility

Wednesday, 4h


Distance-to-frontier function, matching function equilibrium. Matching models with taxes. Collective models with public consumption.

Day 4: matching models with non-transferable utility

Thursday, 4h

Gale and Shapley’s deferred acceptance algorithm. Adachi’s algorithm and Tarski's fixed point theorem. Aggregate stable matchings.

Day 5: equilibrium on networks

Friday, 4h


Equilibrium pricing on networks. Scheduling, dynamic programming and Bellman-Ford’s algorithm. 

+ 5 advanced lectures

July to November, 2h each

Lectures on related advanced mathematical / computational topics to complement the masterclasses and solidify the theoretical knowledge.

Advanced lectures

lecture 1 

Parallel computing

Principles of parallelization; computing on the cloud; use of the numba library.


lecture 2

Special matrices

Z-, P-  and M-matrices, diagonally dominant matrices, Stieltjes matrices, and Perron-Froebenius theory. M-maps and inverse isotonicy.


lecture 3


Lattices, submodularity and Topkis’ theorem. Veinott's order. Monotone comparative statics. Strategic complementarities.


lecture 4

Gross substitutes

Polymatroids, exchangeability.

Lovasz extensions.

Discrete convex analysis, L / L# / M / M# convexity. Unified Gross Substitutes.


lecture 5

Matching with contracts

Kelso and Crawford’s deferred acceptance algorithm. Hatfield and Milgrom’s model of matching with contracts.