EconBase
← Back to paper

Repeated Matching Games: An Empirical Framework

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

108,932 characters · 25 sections · 76 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

Repeated Matching Games An Empirical Framework

abstractWe introduce a model of dynamic matching with transferable utility, extending the static model of shapleyAssignmentGameCore1971. Forward-looking agents have individual states that evolve with current matches. Each period, a matching market with market-clearing prices takes place. We prove the existence of an equilibrium with time-varying distributions of agent types and show it is the solution to a social planner's problem. We also prove that a stationary equilibrium exists. We introduce econometric shocks to account for unobserved heterogeneity in match formation. We propose two algorithms to compute a stationary equilibrium. We adapt both algorithms for estimation. We estimate a model of accumulation of job-specific human capital using data on Swedish engineers.

Keywords: Matching, repeated games, stationary equilibrium, empirical estimation

Introduction

This paper introduces a tractable model of one-to-one, two-sided dynamic matching. Relationship formation is pervasive in economics, and appears in a wide range of settings, such as marriage, labor or health care. Matching models are a key class of analytical tools that predict the formation of relationships. Consequently, they have become important empirical tools alongside the availability of datasets on formed relationships. In these models, agents on both sides on the market are paired based on their observable characteristics, or types. The value generated from a match, usually referred to as the match surplus, depends critically on the interaction of these types. This interdependence makes the two sides of the market economic complements. For instance, on labor markets, where workers match with firms, the match surplus depends on the worker's level of human capital and the firm's productivity. The surplus created through matching is not equally divided but is instead competitively allocated across agents based on their desirability (how much surplus they can potentially produce) and their scarcity (the relative number of agents of a given type present on the market). In the labor market, the share of the surplus obtained by workers takes the form of wages. The scarcer the workers with high human capital, the higher their wages.

Importantly, many matching markets are dynamic in that they involve repeated interactions over time. Couples divorce and remarry, workers change jobs, and patients switch doctors -- highlighting the dynamic nature of matching processes in real-world settings. However, much of the traditional literature, such as the celebrated Becker model of marriage, models matching at a point in time, treating each period as an independent market and abstracting away from potential intertemporal linkages. This overlooks an important feature of dynamic environments: while agents' current types drive present matches, those matches, in turn, influence the future evolution of types. For example, a worker's human capital evolves as a function of their employment history, implying that past matches shape future opportunities. Workers know this and account for this future change in their match decision.

In this paper, we develop a model that explicitly incorporates this dynamic feedback into matching games with transferable utility. Agents are forward-looking and have complete information about their potential partners. They internalize how their current matching decisions affect the future trajectories of their types. The model results in a novel framework that we call repeated matching games. The solution concept in this model is a dynamic competitive equilibrium, which can be viewed as an extension of a Walrasian equilibrium to a dynamic setting with complete information. Our approach combines the stable matching problem in the tradition of beckerTheoryMarriagePart1973 and shapleyAssignmentGameCore1971 with Markov decision processes akin to rustOptimalReplacementGMC1987. Static, transferable utility matching games have productively formed the basis for many papers that structurally estimate models of relationship formation dagsvikAggregationMatchingMarkets2000,chooWhoMarriesWhom2006, chiapporiPartnerChoiceInvestment2017,dupuyPersonalityTraitsMarriage2014,foxUnobservedHeterogeneityMatching2018,galichonCupidsInvisibleHand2022. Our repeated matching game can similarly be used in structural work. After assuming that observed matches are the solution to a matching equilibrium and adding appropriate error terms, the model enables us to structurally estimate underlying preference parameters using observed data on matches, generalizing the seminal framework by chooWhoMarriesWhom2006.

Our repeated matching game operates in discrete time. Each period, there is a set of active agents. Each agent has a state variable, which is also the type of an agent in the language of static matching games. Making a match or remaining unmatched can affect the evolution of this agent state variable or agent type. Each period, there is a matching market with prices or transfers for different matches. These prices clear the market. Given these prices, each agent selects the best partner in a forward-looking manner. Agents have complete information about the state variables' distributions over time. In other words, each agent picks a partner today taking into account both current structural payoffs and transfers as well as how the relationship choice affects the agent's own state variable and hence the profitability of possibly all matches in future periods. Next period the matching market reopens, new prices are stated and new matches form. Each period should be thought of as long enough for all agents to consider exiting a current match and choosing a new partner. Frictions such as switching costs can be included if desired, for example as one explanation for sticky matches that last multiple periods.

A repeated matching game has both individual and aggregate dynamics. At the individual level, each agent is solving a single-agent dynamic programming problem, where at each period the agent's action is to choose a partner to match with. At the aggregate level, the aggregate state variable of the matching market is the active agents' current set of types or state variables. This aggregate state variable evolves with the decisions of the individual agents. We prove that a decentralized competitive equilibrium exists, meaning that there exist prices in each period so that forward-looking workers and firms make profit-maximizing yet feasible matches. We also prove that the assignment portion of the competitive equilibrium to the decentralized economy satisfies a social planner's problem, as in static, one-to-one matching games with transferable utility shapleyAssignmentGameCore1971, thereby generalizing an important characterization of the equilibrium matching in static matching games to our dynamic setting. Solving the social planner's dynamic optimization problem obtains the aggregate matching distribution.

Another important theoretical result is that a stationary equilibrium exists: there is a distribution of individual states such that, after optimal matches are chosen by forward-looking agents in a decentralized competitive equilibrium, the same distribution of states occurs next period. The existence of a stationary equilibrium holds for any admissible parameter vector satisfying the usual finiteness and discounting assumptions and lets the researcher optionally ignore aggregate dynamics by imposing that the matching game is at a stationary equilibrium.

A repeated matching game can be a useful empirical framework for structural estimation of the production function or match surplus function that is the sum of payoffs of the workers ans firms for a given match. We introduce a version of the repeated matching game with econometric errors representing unobserved heterogeneity in the preferences of agents for partner types. The repeated matching game with econometric errors can best be explained as the combination of two touchstone papers in the literature. chooWhoMarriesWhom2006 proposes an estimator for static matching games with logit errors. rustOptimalReplacementGMC1987 proposes an estimator for single agent, dynamic discrete choice models, often using logit errors. In our repeated matching game, an agent's discrete choice each period includes whom to match with and faces possibly logit errors for each type of partner. The agent's type in the matching game is also its state variable, as in dynamic discrete choice models. After computing the prices in a competitive equilibrium, our model of an individual agent's behavior coincides with the dynamic discrete choice model in rustOptimalReplacementGMC1987. If we set the discount factors to zero, a repeated version of chooWhoMarriesWhom2006 arises.

For the model with econometric errors, we prove that a decentralized competitive equilibrium with time-varying aggregate states exists and the matching in such an equilibrium can be computed by a social planner's dynamic problem. We also prove that a stationary equilibrium exists, which is important for many empirical applications in empirical micro that do not focus on aggregate dynamics.

We introduce and benchmark computational methods to compute both an equilibrium for the model with time-varying aggregate states as well as to directly compute a stationary equilibrium. For both the models with and without econometric errors, we compute the equilibrium matching for the time-varying aggregate state by solving the social planner's Bellman equation for the planner's value function. We approximate the value function using function approximation techniques, such as deep learning, inside value function iteration. Our two algorithms for computing a stationary equilibrium are more novel. One method, MPEC, solves a system of nonlinear equations using a nonlinear programming solver. The second method uses a primal-dual algorithm by chambolleFirstOrderPrimalDualAlgorithm2011. Our benchmarks show that both these methods can scale to problems with many agent types, and the primal-dual algorithm scales better.

Our Supplementary Material discusses structural estimation using data on matches and agent states from a stationary equilibrium. Both the MPEC and the primal-dual algorithms can be extended from equilibrium computation to structural estimation by adding appropriate terms to the mathematical programs to be solved. We also benchmark our two estimators and show that a similar conclusion holds: the primal-dual algorithm scales better with the number of structural parameters.

In an empirical illustration, we use panel data on Swedish engineers who work at private-sector employers to estimate match production as a function of worker and firm types. The engineers' time-varying states are overall experience as well as recent experience in, separately, technical and managerial jobs. The two job-specific measures of human capital accumulate when the worker matches to a job of the relevant type. We estimate the match production function as a function of these worker experience variables and the type of the job, technical or managerial.

To our knowledge, there is not a useful off-the-shelf model from the theory literature that generalizes static matching games such as the ones developed in galeTheoryLinearEconomic1989,koopmansAssignmentProblemsLocation1957,beckerTheoryMarriagePart1973,shapleyAssignmentGameCore1971 to a dynamic setting. Yet such a generalization is useful to study a wide array of markets. For instance, entrepreneurs might be generalists who require experience in several roles before launching their own firms lazearFirmSpecificHumanCapital2009. In supplier/assembler matching, lower-quality car part suppliers participating in Toyota's Supplier Development Program might raise the quality of future parts foxEstimatingMatchingGames2018.

We use econometric assumptions from the literature on estimating static matching games with a continuum of agents chooWhoMarriesWhom2006,chiapporiPartnerChoiceInvestment2017,foxEstimatingMatchingGames2018,galichonCupidsInvisibleHand2022. Our individual agent problems are dynamic discrete choice models millerJobMatchingOccupational1984,wolpinEstimableDynamicStochastic1984,pakesPatentsOptionsEstimates1986,rustOptimalReplacementGMC1987. More recently rosaiaDualityEstimationUndiscounted2021 links undiscounted Markov decision processes to static discrete choice models. In terms of dynamic matching, chooDynamicMarriageMatching2015 derives closed-form formulas for a model where matched agents are exogenously separated from the pool of agents who can match. By contrast in our models' equilibrium, agents endogenously separate based in part on the availability of attractive partners. erlingerAcademicWagesPyramid2015 and mccannBeckerMeetsRicardo2015 use two-period models, where in the first period an agent goes to school and in the second period the agent participates in the labor market. peskiTractableModelDynamic2021 also focuses on the evolution of individual agent state variables, in his case with a dynamic search model where each period each unmatched agent meets another and accepts or rejects the match. Separations are exogenous and hence unrelated to attractive potential partners, unlike our model. Our model with econometric errors is perhaps mathematically most closely linked to the model of trade in used cars by gillinghamEquilibriumTradeAutomobiles2022. Used cars in their model are not forward looking. By contrast, both sides of the market are forward looking in our approach. andersonDynamicMatchingEvolving2010 propose a model of dynamic matching where types are fixed, but reputations evolve according to Bayesian updating. We adopt a different focus, in that our model captures agents' anticipation in a change of their own type.

Our model is a strong departure from the large and influential literature on search models burdettWageDifferentialsEmployer1998, in which frictions arise from imperfect meeting technologies: agents encounter one another randomly rather than being instantaneously matched at no cost. In particular, shimerAssortativeMatchingSearch2000 and atakanAssortativeMatchingExplicit2006 combine matching à la Becker with search frictions. As already mentioned, a special case of our model includes switching costs by defining the agent states to include previous matches.

Section (ref) presents the baseline model of repeated matching games, theoretically showing the existence of both an equilibrium with time-varying aggregate states and a stationary equilibrium. Section (ref) describes the model with econometric shocks. Section (ref) presents our methods for equilibrium computation. Section (ref) is our empirical application to Swedish engineers switching employers. Section (ref) concludes.

The Baseline Model

Set Up

Agents match in a one-to-one, two-sided market.\footnote{We conjecture that the results in this paper could be extended to the fairly general case of trading networks, where an agent can in generality make multiple trades/matches as both a buyer and a seller simultaneously, as in hatfieldStabilityCompetitiveEquilibrium2013 and in Section 6 of {azevedoExistenceEquilibriumLarge2018}.} We refer to one side of the market as workers and to the other side as firms. Let $x \in \operatorname{\mathcal{X}}$ be the state of the worker, with the set of worker states $\operatorname{\mathcal{X}}$ being finite. We also call $x$ the type of the worker, recognizing the type can change over time. Let $y \in \operatorname{\mathcal{Y}}$ be the firm state, with $\operatorname{\mathcal{Y}}$ also finite. A worker with state $x$ can match with any $y$ firm, but the worker also has the option to remain unmatched, which we denote by $0$. The choice set of workers is therefore $\operatorname{\mathcal{Y}_0} = \operatorname{\mathcal{Y}} \cup \{0\}$ and the choice set of firms is $\operatorname{\mathcal{X}_0} = \operatorname{\mathcal{X}} \cup \{0\}$.

Our model is one of large numbers of both workers and firms, which we conjecture is required for results that rely on real numbers, such as the coming result on the existence of a stationary equilibrium. Therefore, we assume that there is a continuum of workers and a continuum of firms.

We consider an infinite-horizon model in which periods are discrete and the matching market takes place every period. Workers and firms discount the future at rate $\beta < 1$. Note that the horizon is the horizon for the entire economy, rather than the horizon for an individual worker or firm, which can be finite by placing worker or firm age in the state variables. The worker and firm states evolve according to known transition rules that are functions of the current match $(x,y)$. The conditional probability mass function for the worker's next state $x'$ if at current state $x$ and matched to state $y$ is $$ P_{x'|xy} $$ and the transition rule for firm state $y$ is $$ Q_{y'|xy}$$ Not restricting these transition rules further is a key aspect of generality relative to some prior work.

In the aggregate economy, we keep track of the masses of workers and firms of each type. Let $m^t_x$ be the mass of workers of type $x$ in period $t$, with $m^t=(m^t_x)_{x \in \operatorname{\mathcal{X}}}$ being the vector of masses for all worker states. Likewise, let $n^t_y$ be the mass of firms of type $y$, with $n^t=(n^t_y)_{y \in \operatorname{\mathcal{Y}}}$. The aggregate state of the economy in period $t$ is $(m^t,n^t)$, which contains the masses of all worker and firm types. Additional macro states, like demand shifters for the industry being studied, can be added to the aggregate state with little conceptual difficulty, although we do not pursue that extension. The total masses of workers and firms $M$ and $N$ remain constant over time, i.e. it must always be the case that the aggregate state lies in a bounded set $L$, as in $$ (m^t, n^t) \in L \equiv \left\{ (m,n) \geq 0 \, \bigg\rvert \, \sum_{x \in \operatorname{\mathcal{X}}} m_x = M,\, \sum_{y \in \operatorname{\mathcal{Y}}} n_y = N \right\} \quad \forall t. $$

In a proposed outcome to the model in period $t$, let $\mu^t_{xy}$ be the the mass of matches between workers of state $x$ and firms of state $y$. Likewise $\mu^t_{x0}$ is the mass of workers of type $x$ who are unmatched and $\mu^t_{y0}$ is the mass of vacant firms. Let $\mu^t = \left(\mu^t_{xy}\right)_{xy \in \operatorname{\mathcal{X}_0}\operatorname{\mathcal{Y}_0}}$ be the matrix of masses of matches, where $\operatorname{\mathcal{X}_0}\operatorname{\mathcal{Y}_0} = \left\{(x,y)\, |\, x \in \operatorname{\mathcal{X}_0},\, y \in \operatorname{\mathcal{Y}_0},\, (x,y) \neq (0,0) \right\}$. In our discussion of estimation in the Supplemental Material, we will have data randomly sampled from $\mu^t$.

Matched agents exchange monetary transfers in equilibrium. Let $w^t_{xy}$ be the monetary transfer paid by $y$ to $x$ when the two are matched. Agents who remain unmatched do not receive or pay any transfers. Let $w^t=(w^t_{xy})_{xy \in \operatorname{\mathcal{X}}\operatorname{\mathcal{Y}}}$ be the vector of (endogenously determined) wages in period $t$, which we also refer to as a wage menu. In estimation, we will not use data on monetary transfers, as using data on matches and types only has been the most common data scheme for transferable utility matching games since the early work of beckerTheoryMarriagePart1973 and early structural empirical work by chooWhoMarriesWhom2006.

An outcome to the model has matches $\mu(m,n)$ and transfers $w(m,n)$ for all possible aggregate states $(m,n)$. The aggregate state transitions using the matches and the individual state transition rules. We use the shorthand notation $(P\mu, Q\mu)$ for the next period's aggregate state: $$ (P\mu)_x = \sum_{x' \in \operatorname{\mathcal{X}},y' \in \operatorname{\mathcal{Y}_0}} P_{x|x'y'} \mu_{x'y'} \quad \text{and} \quad (Q\mu)_y = \sum_{x' \in \operatorname{\mathcal{X}_0},y' \in \operatorname{\mathcal{Y}}} Q_{y|x'y'} \mu_{x'y'}.$$

Aggregate transitions are deterministic, although adding stochasticity at the aggregate level is conceptually straightforward in our framework. At the individual level, transitions are stochastic according to the rules $P$ and $Q$. Individual workers may gain or lose human capital in various occupations. At the aggregate level, the total masses $M$ and $N$ and transition probabilities $P$ and $Q$ are exogenously given, while wages $w$ and matches $\mu$ are endogenously determined. At the individual level, the wage schedule $w$ is taken as exogenous and determines the matching choice. We describe these mechanisms in the next subsection.

In our empirical application to Swedish engineers, we augment the repeated matching model to include the arrival and departure of workers and jobs in each period in order to match the data.

Dynamic Competitive Equilibrium

In this section, we start by describing the matching problem solved by individual agents. We then define our solution concept for the model, which we call a dynamic competitive equilibrium.

If a worker of state $x$ matches to a firm of state $y$ in period $t$, the worker receives flow profit $$ \alpha_{xy} + w_{xy}^t, $$ where $\alpha_{xy}$ is a structural parameter measuring the worker's non-monetary utility and $w_{xy}^t$ is the equilibrium wage paid by firm $y$ to worker $x$. $\alpha_{xy}$ is the same in every period and it captures amenities perceived by the worker, while $w_{xy}^t$ can change over time. If the worker is unmatched, he or she does not receive a transfer and we also assume zero amenities, $\alpha_{x0}=0$.

The wages in period $t$ are $w^t=(w^t_{xy})_{xy}$, the tuple of wages for all $xy$ pairs. Let $w=(w^t)_t$ be the wage schedule, the infinite series of wages. The worker is forward looking and chooses a partner $y^t$ in every period $t$ to maximize his or her expected present discounted value of lifetime profit, or $$ \operatorname{\mathbb{E}} \left[ \sum_{t=0}^{\infty} \beta^t \left(\alpha_{x^ty^t}+w^t_{x^ty^t}\right) | x^0 =x\right],$$ where $x^t$ is the worker's state variable in period $t \geq 1$ and $y^t$ is the firm partner type picked that period. Wages $(w^t)_t$ are taken as given by the individual. Because the individual state transitions are stochastic, future states are random variables. The expectation is taken over the future sequence of individual states $x$. In the next section, we detail how wages are set in every period depending on the aggregate state $(m,n)$.

The problem can be analyzed recursively using the workers' Bellman equation:

equation[equation omitted — 244 chars of source]

where $w^{(s)} = (w^t)_{t\geq s}$. The function $U^t_x\left(w^{(t)}\right) $ is the continuation value for a worker with state variable $x$ choosing from a menu of wages $w^{(t)}$. The sum $\sum_{x' \in \operatorname{\mathcal{X}}} P_{x'|xy}U_{x'}\left(w^{(t+1)}\right)$ is the expected continuation value in the next period.

Symmetrically, a firm of type $y$ has flow profit $$\gamma_{xy}-w^t_{xy},$$ where $\gamma_{xy}$ is the non-transfer portion of profit accruing directly to the firm, its output. If the firm is unmatched, it pays no wages and has no output, $\gamma_{0y}=0$. The firm's Bellman equation is

equation[equation omitted — 241 chars of source]

where $V_y^t\left(w^{(t)}\right) $ is the continuation value for a firm with state variable $y$ choosing from a menu of wages $w^{(t)}$.

Given the series of wages $w^{(t)}$, the worker's and firm's problems are akin to one-sided problems. Each worker and each firm is solving a dynamic discrete choice problem, where the discrete choice is a partner type. In the next section, we specify how wages adjust to clear the market at the aggregate level and are taken as given by individual agents. Other discrete choices, like the decision to undertake an explicit investment to improve a state variable, can be added to the model without changing its basic mathematical structure.

exampleTo illustrate the model, we use the following example later in this section. Consider two types of workers and two types of firms. The total masses of workers and firms are 1 each. Worker and firm types are either high, $h$, or low $l$. We use the vector of amenities: $$ \alpha = \left[\alpha_{ll}\,\alpha_{lh}\,\alpha_{hl}\,\alpha_{hh}\,\alpha_{l0}\,\alpha_{h0} \right] = \left[1\,2\,2\,4\,0\,0\right].$$ Workers and firms are subject to transition rules $P$ and $Q$. Matching with a given type in period $t$ gives agents a high probability to transition to this type themselves in period $t+1$. Let $$ P = \begin{bmatrix} P_{l|ll} & P_{l|lh} & P_{l|hl} & P_{l|hh} & P_{l|l0} & P_{l|h0} \\ P_{h|ll} & P_{h|lh} & P_{h|hl} & P_{h|hh} & P_{h|l0} & P_{h|h0} \\ \end{bmatrix} = \begin{bmatrix} .8 & .3 & .6 & .2 & .9 & .1 \\ .2 & .7 & .4 & .8 & .1 & .9 \\ \end{bmatrix} $$ For simplicity, we set firms' outputs $\gamma$ and transitions $Q$ to be the same as workers' amenities and transitions: $$ \gamma = \alpha \text{ and } Q = P.$$ \qed

As in the static matching game literature such as shapleyAssignmentGameCore1971, the solution concept for our model is competitive equilibrium, which we refer to as dynamic competitive equilibrium.

Matching masses are $\mu = (\mu^t)_t$, where $\mu^t$ is the tuple $\left((\mu_{xy}^t)_{xy}, (\mu_{x0}^t)_x, (\mu_{0y}^t)_y\right)$ in a time period $t$. We say that matching $\mu$ is feasible for an aggregate state $(m,n)$ if it satisfies

eqnarray[eqnarray omitted — 522 chars of source]

The first two equations ensure that $\mu^0$ sums to the initial aggregate masses $m$ and $n$. The last two impose that $\mu^{t+1}$ sums to the aggregate masses in $t+1$ since

eqnarray[eqnarray omitted — 267 chars of source]

In the following Definition (ref), $(\mu,w)$ is a tuple of matches and wages.

definition$(\mu,w)$ is a dynamic competitive equilibrium (DCE) if it is feasible for all $(m,n) \in L$ and for all $\bar{x} \in \operatorname{\mathcal{X}},\, \bar{y} \in \operatorname{\mathcal{Y}}$, a positive matching mass $\mu^t_{\bar{x}\bar{y}} > 0$ in period $t$ implies the match between worker $\bar{x}$ and firm $\bar{y}$ maximizes both agents' profits as in \begin{equation} \mu^t_{\bar{x}\bar{y}} > 0 \, \Rightarrow \, \left\{ \begin{array}{ll} \bar{y} \in \operatorname*{arg\,max}_{y \in \operatorname{\mathcal{Y}_0}} & \alpha_{\bar{x}y} + w_{\bar{x}y}^t + \beta \sum_{x' \in \operatorname{\mathcal{X}}}P_{x'|\bar{x}y} U^{t+1}_{x'}\left(w^{(t+1)}\right) \\ \bar{x} \in \operatorname*{arg\,max}_{x \in \operatorname{\mathcal{X}_0}} & \gamma_{x\bar{y}} - w_{x\bar{y}}^t + \beta \sum_{y' \in \operatorname{\mathcal{Y}}}Q_{y'|x\bar{y}} V^{t+1}_{y'}\left(w^{(t+1)}\right) \end{array} \right. , \end{equation} where $U^{t+1}$ and $V^{t+1}$ are the agents' continuation values given $w$, as defined in (ref) and (ref).

In a DCE, each agent is maximizing its expected, present-discounted sum of profits.

The Social Planner Problem

Solving for the decentralized dynamic competitive equilibrium using Definition (ref) presents significant challenges, as it requires computing agents' continuation values on the entire space of possible wage menus. Instead of directly computing the decentralized equilibrium, we extend a key result from static matching games to our repeated matching game. We consider a social planner's problem, show the existence of a solution, and show that the solution is also the matching portion of a decentralized dynamic competitive equilibrium. Therefore, we prove the equivalent of the social planner's property in the static model of shapleyAssignmentGameCore1971 for our dynamic model. If we set the discount factor $\beta$ to be zero for both workers and firms, the static social planner result of shapleyAssignmentGameCore1971 would apply to each period separately.

Static matching games with transferable utility often highlight the importance of the total flow surplus or production of a match: $$ \Phi_{xy} = \alpha_{xy}+\gamma_{xy}.$$ We will also focus on the match production.

Given an initial aggregate state $(m,n)$, the social planner's problem is to maximize the present discounted value of economywide profits $W(m,n)$:

eqnarray[eqnarray omitted — 712 chars of source]

The constraints are the same as the feasibility constraints (ref).

The primal problem can be analyzed recursively using the social planner's Bellman equation

equation[equation omitted — 218 chars of source]

where $\operatorname{\mathcal{X}_0} \operatorname{\mathcal{Y}_0} = \{x \in \operatorname{\mathcal{X}_0}, y \in \operatorname{\mathcal{Y}_0} \,|\, (x,y) \neq (0,0)\}$ and $\mathcal{M}(m,n)$ is the set of matchings that satisfy the feasibility constraints

$$\mathcal{M}(m,n) = \left\{(\mu_{xy})_{xy \in \operatorname{\mathcal{X}_0} \operatorname{\mathcal{Y}_0}} \geq 0 \, \bigg\rvert \,\sum_{y \in \operatorname{\mathcal{Y}_0}} \mu_{xy} = m_x,\, \sum_{x \in \operatorname{\mathcal{X}_0}} \mu_{xy} = n_y\right\}.$$ The present discounted value of economy-wide profits $W: L \rightarrow \mathbb{R}$ is a function from the space of aggregate states $L = \left\{(m,n) \geq 0 \, \bigg\rvert \, \sum_{x \in \operatorname{\mathcal{X}}} m_x = M,\, \sum_{y \in \operatorname{\mathcal{Y}}} n_y = N \right\}$ to $\mathbb{R}$. The notation $W\left(P\mu, Q\mu\right)$ is shorthand for evaluating the next period's continuation value by applying the worker and firm transition rules, $P$ and $Q$, to the match masses in the tuple $\mu$.

Solving the Social Planner Problem

We will show that the recursive formulation lets us prove that a unique present discounted value for economywide profit for each aggregate state $(m,n)$ exists across all equilibria.

The social planner problem is a dynamic program with continuous states $(m,n)$ and continuous controls $\mu$. Therefore, the social planner problem fits into classic reference works on such single-agent dynamic programs, such as stokeyRecursiveMethodsEconomic1989.

propositionThere is a unique function $W: L \rightarrow \mathbb{R}$ that is solution to equation (ref) and it is continuous, bounded, concave, and defined on the entire set $L$.
proofsketchThe proof is in the Supplemental Material, Section (ref). It builds on similar results in stokeyRecursiveMethodsEconomic1989.

A useful corollary of Proposition (ref) is that an optimal matching policy $\mu(m,n)$ exists for any aggregate state in $L$ but is not necessarily unique.

corollaryGiven the aggregate state $(m,n)$, an optimal matching policy $\mu(m,n)$ exists.
proofExistence of an optimal policy derives from the theorems cited in the proposition's proof.

Using the Social Planner Problem to Solve for the DCE

Solving for the social planner's optimal policy yields a optimal matching policy. We now show that this optimal matching policy is also compatible with a decentralized competitive equilibrium, in two steps. First we derive the dual of the social planner's problem, which allows the calculation of optimal monetary transfers. Second, we show that the optimal matching policy and the optimal monetary transfers obtained in the social planner's primal and dual problems are together a decentralized competitive equilibrium $(\mu, w)$.

We define the social planner's cost minimization problem at aggregate state $(m,n)$

eqnarray[eqnarray omitted — 781 chars of source]
propositionThe social planner's cost minimization problem is the dual of the primal problem and strong duality holds, so that the value of the dual objective at a solution is the same as the value of the primal problem's objective at a solution to that problem, $ W(m,n)$.
proofsketchThe primal problem is a linear program with a countable number of controls in the objective function and a countable number of constraints. The paper romeijnShadowPricesInfiniteDimensional1998 provides a formulation of the dual and sufficient conditions for strong duality in such countable linear programs. The complete proof is in Appendix (ref).

Strong duality holding is critical for standard equilibrium properties such as the coming existence of a competitive equilibrium. Strong duality holds in our model in part because of time discounting. Strong duality in linear and nonlinear programs with countably infinite controls and constraints is a non-trivial extension over results for finite programs and is still an active area of research in mathematics, as many problems with countably infinite controls that we do not study actually do not satisfy strong duality. While the references in mathematics that we cite in proofs do not explicitly state what further properties hold once strong duality is established, the news is good. For example and just like in the finite controls case, it is simple to show that strong duality holding implies that the Lagrange multipliers of the primal problem constraints are the solutions to the dual problem.

Given an aggregate state $(m,n)$, the social planner's problem admits at least an optimal policy $\mu^*(m,n)$ and its associated Lagrange multipliers $\left(U^*(m,n), V^*(m,n)\right)$. The next period's aggregate state is $(m',n') = \left(P \mu^*(m,n), Q \mu^*(m,n) \right)$, for which there is once again an optimal policy $\mu^*(m',n')$ and Lagrange multipliers $\left(U^*(m',n'), V^*(m',n')\right)$. Applying the optimal policy successively, starting from $(m^0,n^0)=(m,n)$ and such that $(m^{t+1}, n^{t+1}) = \left(P \mu^*(m^t,n^t), Q \mu^*(m^t,n^t) \right)$, yields an infinite series of optimal matchings $(\mu^t)_t$ and Lagrange multipliers $\left(U^t,V^t\right)_t$. These are the solutions to the infinite horizon formulations of the social planners' primal and dual. In Theorem (ref), we show how to use these series to obtain a dynamic competitive equilibrium (DCE).

theoremLet $(\mu^t)_t$ and $(U^t,V^t)_t$ be the series of optimal matchings and Lagrange multipliers that solve the social planner problem for the series of aggregate states $(m^t,n^t)_t$. Define transfers $w = (w^t)_t$ that satisfy \begin{equation} \begin{aligned} -V_y^t+\gamma_{xy} + \beta \sum_{y' \in \operatorname{\mathcal{Y}}} Q_{y'|xy}V_{y'}^{t+1} &\leq w_{xy}^t \\ &\leq U_x^t-\alpha_{xy} - \beta \sum_{x' \in \operatorname{\mathcal{X}}} P_{x'|xy} U_{x'}^{t+1} \quad \forall x \in \operatorname{\mathcal{X}},y \in \operatorname{\mathcal{Y}} \end{aligned} \end{equation} Then the tuple $(\mu,w)$ is a dynamic competitive equilibrium. Conversely, let $(\mu, w)$ be a DCE and let $(U^t,V^t)_t$ be the associated continuation values as given in definition (ref). Then $(\mu^t)_t$ and $(U^t,V^t)_t$ solve the social planner problem.

The proof of Theorem (ref) is in appendix (ref). Note that if $\mu^t_{xy}>0$, then the upper bound of $w^t_{xy}$ coincides with the lower bound, so in this case, the value of $w$ is unambiguously defined.

The social planner's optimal matching policy $\mu$ given aggregate state $(m,n)$ is therefore part of a dynamic competitive equilibrium at time $t$ when the aggregate state is $(m^t,n^t) =(m,n)$. Note that the social planner problem gives us a practical way of finding a dynamic competitive equilibrium. Once we have solved for $W$ by value function iteration, we need only solve the primal for a given aggregate state to obtain a matching policy that is part of a dynamic competitive equilibrium. We refer to such a policy as $\mu(m,n)$.

The dynamic competitive equilibrium on the space of aggregate states $L$ depends only on the model parameters: $M,\, N,\, \alpha,\, \gamma,\, P,\, Q$ and $\beta$. Typically, the aggregate state $(m,n)$ varies from period to period. The time series $(m^t,n^t)_t$ is deterministic given a starting value $(m^0,n^0)$ for the aggregate state, with the transition rule determined by the optimal matching policy: $(m^{t+1}, n^{t+1}) = (P\mu(m^t,n^t), Q\mu(m^t,n^t))$. In the next section, we show that there exists a constant aggregate state such that ($m^{t+1}, n^{t+1}) = (m^t, n^t)$.

exampleLet us return to our earlier example. Choose $\beta=0.95$. Given the values of $\beta, \, \alpha,\, \gamma,\, P$ and $Q$ that we described previously, we can solve for the social planner's function $W$ (see Section (ref) for more details on how we solve for $W$ numerically). Once we have computed $W$, we can compute the dynamic competitive equilibrium for all aggregate states $(m,n) \in L$. To illustrate, let us choose three different aggregate states at time $t=0$: $$ (m^1, n^1) = (.05, .95, .05, .95) \quad (m^2, n^2) = (.95, .05, .95, .05) \quad (m^3, n^3) = (.5, .5, .5, .5).$$ For each of $(m^1, n^1)$, $(m^2, n^2)$ and $(m^3, n^3)$ we can solve for the optimal matching policy and wage: $(\mu^1, w^1)$, $(\mu^2, w^2)$ and $(\mu^3, w^3)$. Given these, we obtain three different next-period aggregate states, for which we can again solve for the optimal policy, and so forth for future periods. The left pane of Figure (ref) plots the evolution of the aggregate state of low-type workers $l$ over 15 periods in the model, starting from each of the three aggregate states $m^1_l$, $m^2_l$, and $m^3_l$. All three time series converge to the same constant aggregate state $(.46, .54)$. We discuss constant aggregate states in the next subsection. At the aggregate level, the aggregate state is a deterministic time series, as shown in the left pane of Figure (ref). However, at the individual level, the state variable that the agent reaches next period is stochastic, because of the transition rules $P$ and $Q$. Consider an initially low-type worker in a world where $(m^3,n^3)$ is the starting aggregate state. The right pane of Figure (ref) illustrates three paths the worker can take over time. Many more paths are possible, because the next period's state for each worker is random, as it depends on the current match and the transition rules. \begin{figure}[H] \begin{minipage}[b]{0.49\textwidth} \end{minipage} \begin{minipage}[b]{0.49\textwidth} \end{minipage} \caption{Workers' Aggregate State Evolution (left) and Individual Worker's Possible State Variable Paths (right)} \end{figure}

\qed

Constant Aggregate State

An aggregate state is constant if it remains the same next period. The matching policy associated to this aggregate state is then stationary.

definitionA constant aggregate state is an aggregate state $(m,n)$ such that there exists a matching $\mu$ solution to (ref) given $(m,n)$ that satisfies the stationarity conditions $$ \begin{aligned} m_x = \sum_{y \in \operatorname{\mathcal{Y}}_0} \mu_{xy} &= \sum_{x' \in \operatorname{\mathcal{X}}, y' \in \operatorname{\mathcal{Y}}_0} P_{x|x'y'} \mu_{x'y'} \quad \forall x \in \operatorname{\mathcal{X}} \\ n_y = \sum_{x \in \operatorname{\mathcal{X}}_0} \mu_{xy} &= \sum_{x' \in \operatorname{\mathcal{X}}_0, y' \in \operatorname{\mathcal{Y}}} Q_{y|x'y'} \mu_{x'y'} \quad \forall y \in \operatorname{\mathcal{Y}}. \end{aligned} $$

The constant aggregate state in Definition (ref) is such that there is a matching that solves the social planner problem that results in the same aggregate state next period. We refer to the matching policy and wages schedule $(\mu,w)$ at a constant aggregate state $(m,n)$ as a stationary equilibrium. Note that the dynamic competitive equilibrium is defined at every aggregate state $(m,n) \in L$ while the stationary equilibrium is only defined at a constant aggregate state.

We show the existence of a constant aggregate state in Theorem (ref).\footnote{In some cases a constant aggregate state will put all mass at the boundary of the state space. For example, if workers are infinitely lived and accumulate experience deterministically and monotonically, the constant aggregate state will involve all workers having the upper bound on experience.}

theoremA constant aggregate state exists.
proofsketchWe rely on Proposition (ref) to show that the set-valued function that yields the next-period aggregate states $(m',n')$ given $(m,n)$ satisfies the conditions of Kakutani's theorem and as such admits a fixed point. The complete proof is in Appendix (ref).

Note that it is straightforward to have individual workers and firms with finite horizons, even when the economy has a finite horizon: one can adapt the transition rules to include absorbing states that effectively end the game for workers or firms. However, introducing a finite horizon to the entire economy changes how one solves the primal problem: It can be solved by backward induction. It is unlikely that there is a constant aggregate state in the finite-horizon problem.

Model with Econometric Errors

In the previous section, we defined a dynamic competitive equilibrium in our model and showed that such a equilibrium could be computed by solving a social planner problem. Finally we demonstrated that a constant aggregate state existed. In this section, we introduce econometric shocks to our model and show that the same results hold.

Specification

The previous model often predicts that some matches never occur, meaning $\mu_{xy}=0$ for some types $x$ and $y$. This contradicts available datasets where, with enough observations, it is the case that $\mu_{xy}$ is rarely or never zero. This contradiction is solved by including random utility terms in the flow profits of both workers and firms. These random utility terms matter for match formation but are unobserved to the econometrician. They can also be called econometric errors, preference shocks, preference heterogeneity, or unobserved state variables.

Let the per period flow profit for worker $i$ of type $x$ matched with a type $y$ firm be $$ u_{xy} + \epsilon_{iy} = \alpha_{xy}+w_{xy}+\epsilon_{iy}, $$ where $\epsilon_{iy}$ is worker $i$'s preference shock for type $y$ partners. Worker $i$ is indifferent between all partners of the same observed type $y$. The flow profit from being unmatched is $\alpha_{x0}+\epsilon_{i0}$. Let the flow profit for a firm $j$ of type $y$ matched with a worker of type $x$ be $$ v_{xy} +\eta_{xj} = \gamma_{xy}-w_{xy}+\eta_{xj}, $$ where $\eta_{xj}$ is firm $j$'s preference for workers of type $x$. The flow profit to a firm for being unmatched is $\gamma_{xy}+\eta_{j0}$.

When we turn to estimation in a later section, the econometrician only knows the distribution of the econometric errors, but not their realizations. We make similar assumptions to chooWhoMarriesWhom2006 for static matching games and rustOptimalReplacementGMC1987 for single-agent dynamic discrete choice models.

assumptionThe econometric errors satisfy the following assumptions: \begin{enumerate} • The distribution of the random vector $\left(\epsilon_{iy}\right)_{y\in \operatorname{\mathcal{Y}_0}}$, where $i$ is randomly drawn within workers of type $x$, is $\mathcal{L}_{\epsilon|x}$ in every period $t$. The distribution of the random vector $\left(\eta_{jx}\right)_{x\in \operatorname{\mathcal{X}_0}}$ given individual firm $j$ drawn within firms of type $y$ is $\mathcal{L}_{\eta|y}$ in every period $t$. The vectors $\left(\epsilon_{iy}\right)_{y\in \operatorname{\mathcal{Y}_0}}$ and $\left(\eta_{jx}\right)_{x\in \operatorname{\mathcal{X}_0}}$ have finite first moments for all $y$ and $x$. • For a single worker $i$ in the two time periods $t$ and $t+1$ with measured states $x_{i}^{t}$ and $x_{i}^{t+1}$, the distribution of $\left(\epsilon_{iy}^{t+1}\right)_{y\in \operatorname{\mathcal{Y}_0}}$ satisfies the following conditional independence property: $\mathcal{L}\left(\left(\epsilon_{iy}^{t+1}\right)_{y\in \operatorname{\mathcal{Y}_0}}\left|x_{i}^{t},x_{i}^{t+1},\left(\epsilon_{iy}^{t}\right)_{y\in \operatorname{\mathcal{Y}_0}}\right.\right)=\mathcal{L}\left(\left(\epsilon_{iy}^{t+1}\right)_{y\in \operatorname{\mathcal{Y}_0}}\left|x_{i}^{t+1}\right.\right)$. A similar conditional independence assumption holds for firms. \end{enumerate}

Under our model with a large number of agents, agents have no market power and therefore it is irrelevant whether these econometric errors are public or private information to the market participants. Also, Part 2 of the assumption states that preferences are drawn anew each time period conditional on measured states $x$ or $y$, rather than being possibly correlated over time. Considering identification and estimation with unmeasured states that are persistent over time is left to future work.

To ensure the existence of economy-wide profits in the setting with econometric shocks, we also make the following assumption.

assumption$\forall x \in \operatorname{\mathcal{X}}, y \in \operatorname{\mathcal{Y}}$, the distributions $\mathcal{L}_{\epsilon|x}$ and $\mathcal{L}_{\eta|y}$ have full support and are absolutely continuous with respect to the Lebesgue measure.

Unmeasured preferences in the literature on estimating static matching games with a small number of matching markets, each with a continuum of agents, are typically preferences over measured partner types $x$ or $y$ rather than unmeasured preferences attributes chooWhoMarriesWhom2006,dupuyPersonalityTraitsMarriage2014,chiapporiPartnerChoiceInvestment2017,foxEstimatingMatchingGames2018,galichonCupidsInvisibleHand2022. This contrasts with a data scheme of many smaller markets, where agents could have preferences over unmeasured (in data) attributes of partners foxUnobservedHeterogeneityMatching2018.

To ensure that no masses in the constant aggregate state are 0, we also require that all state variables are visited from one period to the next. This assumption ensures the social planner problem with econometric shocks is well defined (see Lemma (ref) below).

assumptionFor all $x \in \operatorname{\mathcal{X}}$ there exists $(x,y)$ such that $P_{x'|xy}>0$. For all $y \in \operatorname{\mathcal{Y}}$ there exists $(x,y)$ such that $Q_{y'|xy}>0$.

The Dynamic Competitive Equilibrium with Preference Shocks

General Econometric Shocks

In the model with econometric preference shocks, the worker and firm Bellman equations are changed to make the preference shock realization part of the current period's state variable for each agent:

equation[equation omitted — 606 chars of source]

where $\epsilon_{y}$ and $\eta_{x}$ are the realized econometric shocks, and the expected values in $U_{x}^{t+1}$ and $V_{y}^{t+1}$ are taken with respect to the distributions of next period's econometric shocks $\epsilon^{t+1}$ and $\eta^{t+1}$.

With the worker and firm value functions, we can adapt the notion of a dynamic competitive equilibrium (DCE) from Section (ref) to the model with unobserved heterogeneity. It is computationally attractive to work with aggregates over the realizations of the unobserved heterogeneity terms $\epsilon_x$ and $\eta_y$. A dynamic competitive equilibrium (DCE) is defined as follows.

definitionIn the framework with econometric errors, the tuple $(\mu,w)$ is a dynamic competitive equilibrium (DCE) if $\mu^t$ corresponds to the probability that each $\tilde{x}$ is optimal for each $\tilde{y}$ and conversely, given the wage schedule $w$. That is \begin{equation} \begin{array}{ll} \frac {\mu^t_{\tilde{x}\tilde{y}}} {\sum_{y \in \operatorname{\mathcal{Y}}_0 } \mu^t_{\tilde{x}y} } = \Pr \left( \tilde{y} \in \operatorname*{arg\,max}_{y \in \operatorname{\mathcal{Y}_0}} \alpha_{\tilde{x}y} + w^t_{\tilde{x}y} + \epsilon^t_{y}\right. \\ \qquad \qquad \qquad \qquad + \left. \beta \sum_{x' \in \operatorname{\mathcal{X}}}P_{x'|\tilde{x}y} \mathbb{E}\left[ U_{x'}^{t+1} \left(w^{(t+1)}, \epsilon^{t+1}\right)\right] \right)\\ \frac {\mu^t_{\tilde{x}\tilde{y}}} {\sum_{x \in \operatorname{\mathcal{X}}_0 } \mu^t_{x\tilde{y}} } = \Pr \left( \tilde{x} \in \operatorname*{arg\,max}_{x \in \operatorname{\mathcal{X}_0}} \gamma_{x\tilde{y}} - w^t_{x\tilde{y}} + \eta^t_{x}\right. \\ \qquad \qquad \qquad \qquad + \left. \beta \sum_{y' \in \operatorname{\mathcal{Y}}}Q_{y_j'|x\tilde{y}} \mathbb{E}\left[ V_{y'}^{t+1} \left(w^{(t+1)}, \eta^{t+1}\right)\right]\right), \end{array} \end{equation} where the expected values are taken over future draws of preference shocks $\epsilon^{t+1}$ and $\eta^{t+1}$.

As in the case with no econometric shocks, we will use the social planner's problem to compute a DCE. In the case with econometric shocks the social planner problem is said to be regularized, meaning that the objective function contains an additional term that accounts for the econometric shocks. A key role is played by the so-called general entropy function that quantifies the effect of the econometric shocks. The generalized entropy is defined in the following steps. First, introduce the expected indirect payoff functions $G_x$ and $H_y$ given the distributions for the econometric shocks:

equation*[equation* omitted — 260 chars of source]

where Assumption (ref) ensure the max is well defined. Their population counterparts $G$ and $H$ are

equation*[equation* omitted — 158 chars of source]

The total expected indirect payoffs let us express the generalized entropy as: $$ \mathcal{E}(\mu ) = \sum_{x \in \operatorname{\mathcal{X}}} \sum_{y \in \operatorname{\mathcal{Y}}_0} \mu_{xy} G_x^*\left(\frac{\mu_{x.}}{\sum\nolimits_{y \in \operatorname{\mathcal{Y}}_0} \mu_{xy}}\right) + \sum_{y \in \operatorname{\mathcal{Y}}}\sum_{x \in \operatorname{\mathcal{X}}_0} \mu_{xy} H_y^*\left(\frac{\mu_{.y}}{\sum\nolimits_{x \in \operatorname{\mathcal{X}}_0} \mu_{xy}}\right), $$ where $\mu_{x.} = \left(\mu_{xy}\right)_{y \in \operatorname{\mathcal{Y}_0}}$, $\mu_{.y} = \left(\mu_{xy}\right)_{x \in \operatorname{\mathcal{X}_0}}$, and $G^*$ and $H^*$ are the Fenchel-Legendre transforms of $G$ and $H$ galichonCupidsInvisibleHand2022. Our initial requirement that all state variables are visited from one period to the next ensures that $\sum_{y \in \operatorname{\mathcal{Y}}_0} \mu^t_{xy}> 0$ and $\sum_{x \in \operatorname{\mathcal{X}}_0} \mu^t_{xy}> 0$, so that $\mathcal{E}$ is defined at every time period $t$. Introduce $\mathcal M$ as the set of $\mu \geq 0$ such that $\mu$ such that $\sum_{x y \in \operatorname{\mathcal{X}}_0 \operatorname{\mathcal{Y}}} \mu_{xy} = M$ and $\sum_{x y \in \operatorname{\mathcal{X}} \operatorname{\mathcal{Y}}_0} \mu_{xy} = N$. The set $\mathcal M$ is a closed set, whose interior is the set of vectors $\mu$ such that $\mu_{xy}>0$ for all $xy \in (\mathcal X_0 \times \mathcal Y) \cup (\mathcal X \times \mathcal Y_0)$. The transforms $G^*$ and $H^*$ are not defined outside of the interior of $\mathcal M$. When some of the $\mu_{xy}=0$, the following lemma shows that the generalized entropy is bounded on the interior of $\mathcal M$.

lemmaThe function $\mathcal E$ is defined, continuous, and bounded on the interior of $\mathcal M$.

The proof is in the Supplemental Material, Section (ref), and rests on Assumptions (ref), (ref) and (ref). As a result, the function $\mathcal E$ can be extended by continuity to the entire set $\mathcal M$, and in the sequel we will denote by the same notation $\mathcal E$ that extension.

Consider a social planner starting at the aggregate state $\left(m,n\right)$. The generalized entropy function $\mathcal E$ as defined us allows to write down the social planner's primal problem with econometric errors as the maximization of the expected, present-discounted sum of economywide production under the chosen matching policy, minus the generalized entropy penalty function $\mathcal{{E}}$:

equation[equation omitted — 215 chars of source]

subject to the same feasibility constraints and transition rules as in the model without preference shocks,

equation[equation omitted — 175 chars of source]
equation[equation omitted — 380 chars of source]

The regularized social planner's Bellman equation is

equation[equation omitted — 240 chars of source]

The solution $W(m,n)$ is unique.

propositionThere exists a unique function $W: L \rightarrow \mathbb{R}$ that satisfies (ref). It is defined on the entire set $L$, continuous, bounded and strictly concave.

The proof, which is included in the Supplemental Material, Section (ref) for completeness, uses the same reasoning as for Proposition (ref).

corollaryThe optimal matching policy $\mu$ that solves the social planner problem (ref) exists and is unique.
proofThe function $\mu \rightarrow \sum_{xy \in \operatorname{\mathcal{X}_0} \operatorname{\mathcal{Y}_0}} \mu_{xy} \Phi_{xy} - \mathcal{E}(\mu) + \beta W\left(P\mu, Q\mu\right)$ is continuous and strictly concave. We are maximizing on the compact set $\mathcal{M}(m,n)$. Therefore, there exists a unique maximum to the regularized social planner problem.

It is precisely the nonlinear entropy term $\mathcal{E}(\mu)$ that makes the social planner's problem strictly concave, ensuring that the social planner's problem has a unique solution.

The social planner's problem is a nonlinear program with countably infinite controls and constraints. Mathematical knowledge about this class of problems has recently been growing. We are able to use the recent literature to establish that strong duality holds for the relationship between the social planner's primal problem and an appropriate dual. The dual that we will derive in the proof of the following proposition is

equation[equation omitted — 497 chars of source]

where $G(u^{t+1})$ and $H(v^{t+1})$ are the stacked vectors of $(G_x(u^{t+1}))_x$ and $(H_y(v^{t+1}))_y.$

propositionThe social planner's primal problem (ref) is dual to problem (ref). Both problems have optimal solutions and strong duality holds, i.e. their value coincide.

The proof is in the Supplemental Material, Section (ref), and is the lengthiest in this paper. The key paper lucDualityExtendedInfinite2021 that the proof uses actually shows a weak notion of strong duality and some effort in the proof is spent building on that work to show a stronger notion of strong duality. Establishing strong duality means that many of the key results from nonlinear programs with a finite number of controls and constraints immediately extend to our nonlinear programs with countably infinite numbers of controls and constraints.

As in the model without econometric errors, solving the social planner problem with entropy is the same as solving for the matching that is part of a decentralized dynamic competitive equilibrium.

theoremLet $(\mu^t)_t$ and $(u^t,v^t)_t$ be the series of optimal match masses and Lagrange multipliers that solve the social planner problem for the series of aggregate states $(m^t,n^t)_t$. Define transfers $w = (w^t)_t$ that satisfy \begin{equation} \begin{aligned} w^t_{xy} &= u^t_{xy}- \alpha_{xy} - \beta \left(P^{\top} G_x(u^{t+1})\right)_{xy} \\ &= -v^t_{xy} + \gamma_{xy} + \beta \left(Q^{\top} H_y(v^{t+1})\right)_{xy}. \end{aligned} \end{equation} Then the tuple $(\mu,w)$ is a dynamic competitive equilibrium, DCE. Conversely, let $(\mu,w)$ be a DCE and let $(U^t,V^t)_t$ be the associated continuation values. Then $(\mu^t)_t$ and $(U^t,V^t)_t$ solve the social planner problems.

The proof is in the Supplemental Material, Section (ref). The proof rests on the use of the strong duality shown in Proposition (ref).

The Logit Case

In order to express the competitive matching policy in closed form, we now assume a particular, well-known distribution for the econometric errors, following the literature, and in particular chooWhoMarriesWhom2006 and rustOptimalReplacementGMC1987.

assumptionThe econometric errors $\epsilon$ and $\eta$ have the type one extreme value (also called the Gumbel) distribution.

Under Assumption (ref), the indirect payoffs have the logit form (see galichonCupidsInvisibleHand2022 for derivations): $$ G_x(u) = \log \sum_{y \in \operatorname{\mathcal{Y}_0}} \exp(u_{xy}) \quad \text{and} \quad H_y(v) = \log \sum_{x \in \operatorname{\mathcal{X}_0}} \exp(v_{xy}).$$ Also, the entropy $\mathcal{E}$ penalty term under logit errors is $$ \mathcal{E}(\mu) = \sum_{xy \in \operatorname{\mathcal{X}} \operatorname{\mathcal{Y}_0}} \mu_{xy} \log \frac{\mu_{xy}}{\sum_{y \in Y_0} \mu_{xy}} + \sum_{xy \in \operatorname{\mathcal{Y}} \operatorname{\mathcal{X}_0}} \mu_{xy} \log \frac{\mu_{xy}}{\sum_{x \in \operatorname{\mathcal{X}}_0} \mu_{xy}}.$$

Given the logit set up, we can compute certain equations that hold in equilibrium. These are not solutions to the social planner's Bellman equation (ref), but more a reformulation of Bellman's equation given the logit errors, as the terms depend on the expected, present-discounted profits $U_x$ and $V_y$, which are themselves equilibrium objects.

propositionUnder Assumption (ref), the dynamic competitive equilibrium matching $\mu^t$ in any given period $t$ where the aggregate state is $(m^t,n^t)$ satisfies for all $x \in \operatorname{\mathcal{X}}$ and $y \in \operatorname{\mathcal{Y}}$ \begin{equation*} \begin{aligned} \mu^t_{xy} &= \sqrt{m^t_x n^t_y} \exp \left(\frac{\Phi_{xy} + \beta \sum_{x' \in \operatorname{\mathcal{X}}} U^{t+1}_{x'}P_{x'|xy} + \beta \sum_{y' \in \operatorname{\mathcal{Y}}} V^{t+1}_{y'}Q_{y'|xy} - U^t_x - V^t_y }{2}\right) \\ \mu^t_{x0} &= m^t_x \exp \left(\beta \sum_{x' \in \operatorname{\mathcal{X}}} U^{t+1}_{x'} P_{x'|x0} - U^t_x\right) \\ \mu^t_{0y} &= n^t_y \exp \left(\beta \sum_{y' \in \operatorname{\mathcal{Y}}} V^{t+1}_{y'} Q_{y'|0y} - V^t_y\right) \end{aligned} \end{equation*} where $U^t, V^t$ are the Lagrange multipliers on constraints (ref), (ref).
proofThe equilibrium matches arise from calculating the first order conditions of the social planner's primal problem (ref). The calculations are omitted for space reasons.

We use Proposition (ref) in our empirical application in Section (ref) where we assume a logit set up when econometric shocks are present.

The Constant Aggregate State with Econometric Errors

We define a constant aggregate state and a stationary equilibrium as in the setting without econometric shocks (Definition (ref)). We can also show that a constant aggregate state exists in the setting with shocks. The proof uses a different fixed point theorem than the corresponding proof for the model without econometric errors.

theoremA constant aggregate state exists in the model with general econometric errors.
proofsketchWe rely on Brouwer's fixed point theorem. The complete proof is in Appendix (ref).

Methods for Equilibrium Computation

This section develops methods for computing dynamic competitive equilibria, meaning equilibria with aggregate dynamics, and stationary equilibria, meaning equilibria with a constant aggregate state. We develop algorithms for both the models without and with econometric shocks.

In the non-stationary environment, we are solving a single-agent dynamic programming problem for the social planner and rely on value function iteration, making use of the social planner Bellman equations (ref) and (ref), as detailed in Section (ref).

Computing a stationary equilibrium is less computationally intensive since we only need to compute an optimal matching policy for the constant aggregate state, which we solve for. In the Supplemental Material, Section (ref), we show that the constant aggregate state without econometric errors can be computed using quadratic optimization. Section (ref) focuses on the aggregate dynamics with econometric errors, and Section (ref) leverages two strategies to solve for the constant aggregate state with econometric errors. The first strategy uses the Mathematical Programming with Equilibrium Constraint (MPEC) formulation of our problem suConstrainedOptimizationApproaches2012. The second strategy reformulates the stationary equilibrium equations as a min-max problem and solves it using techniques from convex optimization chambolleFirstOrderPrimalDualAlgorithm2011.

Both algorithms for computing a stationary equilibrium for the model with econometric errors are easy to adapt to estimating the model's structural parameters using data on matches from a stationary equilibrium. We discuss structural estimation in the Supplemental Material, Section (ref).

Aggregate Dynamics

The social planner's Bellman equations with and without econometric errors (ref) and (ref) are Bellman equations from a single-agent dynamic programming problem. Such problems are most classically solved using value function iteration, exploiting the property that the right side of the Bellman equation is a contraction. In what follows, we explore value function iteration in the model with econometric errors, but most details around using value function iteration also apply to the model without econometric errors.

The state for the social planner's problem is $\left(m,n\right)$, the vector of the masses of each worker type and each firm type. Dynamic programming methods of all sorts suffer from a curse of dimensionality in the number of continuous state variables, which for the non-stationary case is equal to the number of worker plus the number of firm types.

Value function iteration operates on a grid $\left((m_{g},n_{g})\right)_{g\in\left\{ 1,\hdots,G\right\} }$ of nodes, where each node is an aggregate state and $G$ is the chosen number of points in the grid. The $k+1$ iteration of value function iteration is $$ W^{k+1}(m_g,n_g) = T W^k(m_g, n_g)$$ where $T W(m,n) = \max_{\mu \in \mathcal{M}(m,n)} \left\{ \sum_{xy \in \operatorname{\mathcal{X}_0} \operatorname{\mathcal{Y}_0}} \Phi_{xy} \mu_{xy} + \beta W(P\mu,Q\mu) - \mathcal{E}(\mu) \right\}$ in the model with econometric errors.

Because the map $T$ is a contraction, $\left(W^{k}\right)_{k}$ eventually converges to the fixed point of the social planner's Bellman equation (ref). Once the social planner's $W$ is known, the matches $\mu\left(m_g,n_g\right)$ can be computed as the optimal policy of the social planner given $W$ at every node $g$. Note that because $\left(P\mu,Q\mu\right)$ does not necessarily land on a point of the grid $\left((m_{g},n_{g})\right)_{g\in\left\{ 1,\hdots,G\right\} }$, some interpolation technique is needed to compute the value of $W\left(P\mu,Q\mu\right)$ at this point. Both polynomials and deep nets can be used as approximation schemes.

Each iteration of value function iteration has a computational cost that is proportional to the size $G$ of the grid $\left((m_{g},n_{g})\right)_{g\in\left\{ 1,\hdots,G\right\} }$. We can parallelize each iteration across nodes. Additionally, for each node $(m_{g},n_{g})$ and at each iteration, the continuous optimization problem over match masses $\mu_{xy}$ must be calculated. We use the NLOPT solver, which can be called from a wide array of programming languages, and find that the maximization on each point of the grid is solved quickly.\footnote{The algorithm we call through NLOPT is the sequential least-square quadratic programming algorithm (NLopt, SLSQP).}

The numerical analysis literature provides a wide array of methods to accelerate fixed-point iterations fangTwoClassesMultisecant2009,walkerAndersonAccelerationFixedPoint2011. Our implementation uses the Anderson acceleration method. Its main idea is to use not only $W^{k}$ to update to $W^{k+1}$, but also the values from the previous iterations $W^{k-1}$, $W^{k-2}$, ... up to some threshold decided by the analyst. With an aggregate state of dimension $2 \times 2$, we run a value function iteration on the $\left[.01, 1\right]^2 \times \left[.01, 1\right]^2$ grid in 32 minutes.\footnote{Ran in Julia on 4 threads, on a M2 chip Macbook Pro.}

Constant Aggregate State

We assume a logit set up, so that the optimal policy $\mu$ has a closed-form solution, as described in Proposition (ref). Let

equation*[equation* omitted — 258 chars of source]

be the function that returns the closed form expressions in Proposition (ref), where the first two arguments are the current period payoffs, and the next two are the next period payoffs.\footnote{These correspond to $(U^t,V^t)$ and $(U^{t+1},V^{t+1})$ in Proposition (ref), respectively.} We present two numerical methods to compute a constant aggregate state and its associated stationary equilibrium in the model with econometric errors.

Mathematical Programming with Equilibrium Constraints

Mathematical Programming with Equilibrium Constraints, or MPEC, has been used by suConstrainedOptimizationApproaches2012 to estimate the single-agent dynamic discrete choice model of rustOptimalReplacementGMC1987 and by dubeImprovingNumericalPerformance2012 to estimate the aggregate demand model of berryAutomobilePricesMarket1995. MPEC formulates the model as a set of constraints and solves the set using nonlinear programming.

Instead of solving for optimal matching policy $\mu$ at each iteration on $W$, as is done in value function iteration, MPEC focuses on the control variables $(m,n,U,V)$ in the search for a constant aggregate state. The primitives $(m,n,U,V)$ have to satisfy a number of constraints: the feasibility conditions and stationary transition rules outlined previously.\footnote{The optimal matching policy should also sum to the total masses on each side of the market: $\sum_{xy \in \operatorname{\mathcal{X}} \operatorname{\mathcal{Y}_0}} \mu_{xy}(U,V,m,n) = M$ and $\sum_{xy \in \operatorname{\mathcal{X}_0} \operatorname{\mathcal{Y}}} \mu_{xy}(U,V,m,n) = N$. Because the logit formulas are homogenous of degree $1/2$ in $(m,n)$, these two conditions are straightforward to satisfy by adding a constant to $U$ and $V$.} The constraints are:

equation[equation omitted — 813 chars of source]

To solve the system of equations (ref), we use a nonlinear solver to maximize a constant function (say 0) subject to the constraints (ref). The problem definition language JuMP in Julia along with the solvers IPOPT and KNITRO are well-suited to the task.\footnote{Both solvers use interior point methods.}

Primal-Dual Method

Our second method relies on the same observation as the first: that the constant aggregate state relies on a set $(U,V,m,n)$ that satisfies the feasibility conditions and the stationary transition rules.\footnote{Total mass normalization can be enforced with the primal-dual method too.} The primal-dual approach can be explained in two steps. First we show that when $\beta=1$, the three sets of conditions mentioned before are the first order conditions to a min-max optimization problem. Such an optimization problem can be solved using a primal-dual algorithm chambolleFirstOrderPrimalDualAlgorithm2011. Second, we modify the algorithm to accommodate that agents do discount the future, or that $\beta <1$. In practise, the algorithm converges to a solution to (ref). To vary $\beta$ between our two steps, we augment the set of parameters of $\mu$ by the discount factor $\beta$, and consider the following function $Z$:

equation*[equation* omitted — 302 chars of source]

where $w_{xy} = 2$ for $x \in \operatorname{\mathcal{X}}, y \in \operatorname{\mathcal{Y}}$, $w_{x0} = 1$ for $x \in \operatorname{\mathcal{X}}$ and $w_{0y} = 1$ for $y \in \operatorname{\mathcal{Y}}$.

The min-max problem we solve for $\beta=1$ is the following:

equation[equation omitted — 88 chars of source]

$Z$ is concave in $(m,n)$ and convex in $(U,V)$. Taking first order conditions for the $\max$ in (ref) yields the feasibility conditions, and doing the same to the $\min$ obtains the stationary transition rules. Problem (ref) can be solved numerically using the primal-dual algorithm. For the max-min problem (ref), the algorithm takes starting values $(U^0, V^0, m^0, n^0)$ and $(m^1,n^1)=(m^0,n^0)$. Given a small increment $\tau$ and a threshold $\delta$, it iterates on $k \geq 1$ according to the following:

equation[equation omitted — 1,051 chars of source]

where

equation*[equation* omitted — 200 chars of source]

The stopping criteria is

equation*[equation* omitted — 150 chars of source]

The main feature of the primal-dual algorithm is that it uses $(\tilde{m}^k, \tilde{n}^k)$, an average of $(m^k,n^k)$ and $(m^{k-1},n^{k-1})$, to compute the next $(U^{k+1},V^{k+1})$. This ensures stability in the algorithm. chambolleFirstOrderPrimalDualAlgorithm2011 show that the algorithm converges when $\beta=1$, meaning when the feasibility and stability conditions are the first order conditions to optimization problem (ref). In practise, we have found that the algorithm converges to $(U,V,m,n)$ that solve the three sets of conditions even when $\beta < 1$.

Methods Comparison

Table (ref) describes equilibrium computation performance measures for both MPEC and the primal-dual algorithm, depending on the size of $\operatorname{\mathcal{X}}$ and $\operatorname{\mathcal{Y}}$, meaning depending on the number of types on both sides of the market.

The MPEC method is faster than the primal-dual method on an equilibrium computation for a small number of types ($\operatorname{\mathcal{X}} \times \operatorname{\mathcal{Y}} = 2 \times 2$ and $\operatorname{\mathcal{X}} \times \operatorname{\mathcal{Y}} = 10 \times 10$), but is slower with a large number of types ($\operatorname{\mathcal{X}} \times \operatorname{\mathcal{Y}} = 30 \times 30$ and $\operatorname{\mathcal{X}} \times \operatorname{\mathcal{Y}} = 100 \times 100$). An iteration in the primal-dual method is a step in algorithm (ref), while an iteration in MPEC is a step in the gradient descent algorithm used by the solver. An iteration in MPEC involves the evaluation of the constraints in (ref) as well as the computation of their gradient. The primal-dual algorithm requires many more iterations than MPEC, but each iteration takes up less time.

table[table omitted — 983 chars of source]

A similar comparison is performed for both MPEC and the primal-dual method adapted to structural estimation in the Supplemental Material, Section (ref).

Empirical Application

To illustrate the usefulness of our model applied to labor data, we estimate returns to occupation-specific experience for elite Swedish engineers, those with five-year engineering degrees, in the 1970s and 1980s. Depending on which occupation they are employed in, workers can accumulate different types of human capital. Engineers in particular can hold both technical and managerial human capital. A engineer's productivity in a given occupation depends on the type of human capital acquired and also on his or her total experience in the labor market, meaning across all types of jobs. We estimate our model on Swedish administrative data to measure the respective contributions of occupation-specific human capital and total labor market experience to employer-employee match formation.

We use data on observed matchings between Swedish engineers and firms from 1970 to 1990 from the Swedish Employer's Federation (SAF). The dataset is a yearly panel that follows engineers through time and allows us to reconstruct their past experiences from 1970 onward. We refer the reader to foxFirmSizeWageGaps2009,foxEstimatingEmployerSwitching2010 for more background on the data, and see Section (ref) in the Supplemental Matirial for details on the data cleaning. We parameterize the match surplus as a function of the engineer's years of experience in each occupation and his or her age (to proxy for total labor market experience). We structurally estimate the surplus function parameters with the MPEC method and maximum likelihood.

There are some necessary differences in this application from the setup in the previous sections. Our administrative data on employed engineers do not contain vacant jobs or unemployed workers, so our model in this section does not allow for these possibilities. Also, we augment the model to allow workers and jobs to enter and leave the labor market, in order to match the data.

Model Parameterization

To parameterize the model, we first define workers' and jobs' state variables, or types. A job here is characterized solely by its occupation, general $G$ or technical $T$: $$ y = 1 \text{ if the job is general, $0$ otherwise}.$$

A worker's state variable is three-dimensional: potential experience $x_a$ measured as the difference between the worker's age and 26, technical experience $x_t$ measured as the number of years employed in a technical occupation in the past 5 years, and general experience $x_g$ measured as the number of years employed in a general occupation in the past 5 years: $$x = (x_e, x_t, x_g) \text{ where } x_e \in \{0, \hdots, 38\}, \, x_g \in \{0 , \hdots, 5\}, \, x_t \in \{0, \hdots, 5\}.$$

We restrict occupation-specific experience to five years because it allows us to use match data from 1975 on, as we cannot measure occupation-specific experience before the start of the panel in 1970. Note that if a worker has been employed in both technical and general jobs in the past five years, he or she holds both technical and general experience: $x_t >0$ and $x_g >0$.

Given workers' and jobs' state variables, we parameterize match surplus or production as:

equation[equation omitted — 91 chars of source]

where $\tilde{x} = \frac{x_t}{x_t+x_g}$ is the share of years employed in a technical occupation in the past five years. The share $\tilde{x}$ is a measure of specialization into the technical occupation. We rescale $x_e$ to be between 0 and 1, instead of 0 and 38, so that both $\tilde{x}$ and $x_e$ are between 0 and 1. Also, recall that $y\in \{0,1\}$.

If the coefficients $a$ and $b$ are both positive, match production is higher when a worker with a general or managerial job has lots of managerial experience and total labor market experience. foxIdentificationMatchingGames2010 discusses the nonparametric identification of static matching games; parameters like the ratio $2a/b$ are identified in a static matching game without data on unemployed workers and vacant jobs and without relying on the parametric assumption of type 1 extreme value (logit) errors. The ratio $2a/b$ is related to the importance of occupation-specific human capital versus the importance of total labor market experience.\footnote{To gain intuition, consider a static labor market without logit shocks with one managerial job $y=1$, one technical job $y=0$, and two workers with types $\left(\tilde{x}^1,x_e^1\right)$ and $\left(\tilde{x}^2,x_e^2\right)$ respectively. Using the social planner result in shapleyAssignmentGameCore1971, algebra shows that worker 1 will match to the managerial job when $$ \frac{x_e^1-x_e^2}{\tilde{x}^1-\tilde{x}^2} > \frac{2a}{b}.$$} Leaving the ratio $2a/b$ aside, the values $a$ and $b$ convert the production from matches between types $x$ and $y$ to standard logit units, as in chooWhoMarriesWhom2006 and much followup work, such as chiapporiPartnerChoiceInvestment2017.

Estimation

To estimate $\lambda = (a,b)$, we assume logit errors, a discount factor of $\beta=0.95$ for our annual data, and build on the MPEC strategy exposed in Section (ref) of the Supplemental Material, with two alterations. The first alteration adapts the strategy to the absence of unemployed workers and vacancies in the our administrative dataset.\footnote{Sweden had an incredibly low, by modern standards, unemployment rate during 1970--1990 and elite Swedish engineers were even less likely to be unemployed than typical workers. One may presume that there were unfilled vacancies, although our empirical model does not allow for unfilled vacancies due to a lack of data on them.} The second alteration accounts for an incoming or outgoing flow of workers to and from the labor market every year, which are added to the stationary transition conditions in equations (ref). The flows are introduced to account for workers entering and exiting the labor market. They are imposed during estimation, such that

equation*[equation* omitted — 226 chars of source]

where $i_x$ and $i_y$ are net changes in the number of jobs and workers of a given type from year to year.

The observed stationary matching $\hat{\mu}$ is the ratio of the number of observed matches $(x,y)$ over the total number of matches between 1975 and 1990: $$ \hat{\mu}_{xy} = \frac{\sum_{t =1975}^{1990} N^{t}_{xy}}{\sum_{t =1975}^{1990} \sum_{x,y \in \operatorname{\mathcal{X}} \operatorname{\mathcal{Y}}}N^{t}_{xy}},$$ where $N^{t}_{xy}$ is the number of observed $(x,y)$ matches in year $t$. We choose the $\{1975, \hdots, 1990\}$ interval because we use the five years between 1970 and 1974 to measure workers' past occupational experience. By construction, $\hat{\mu}$ sums to 1: $$ \sum_{x,y \in \operatorname{\mathcal{X}} \operatorname{\mathcal{Y}}} \hat{\mu}_{xy} = 1.$$ Therefore we also impose that $\mu(\lambda, U, V, m,n)$ also sums to 1.

The workers' transition matrix $P$ is deterministic: $x_t$ (resp. $x_g$) is increased by 1 if the worker was employed in a technical occupation in the previous year, with a cap at 5. Workers all gain one year of potential experience every year. Given our characterization of jobs, they do not change types: transition matrix $Q$ has entries $Q_{y'|xy} = 1$ if $y'=y$, and $0$ otherwise.

Results

Table (ref) describes observed matching between job types (occupations) and worker types (potential experience and specialization). Workers employed in technical occupations tend to have less total labor market experienced (11.6 years versus 13.5 years) and are a bit more specialized in terms of recent job-specific experience (84.3% of recent experience in technical jobs versus for those currently in technical jobs versus $100\%-16.6\%=83.4\%$ in general job experience for those currently in general jobs).

table[table omitted — 511 chars of source]

In our dynamic model, the relative strength of observed matching between workers $x$ and firms $y$ compared to another match can be driven by two factors: a relatively higher surplus $\Phi_{xy}$ and next period's workers' expectation $P_{x'|xy}$ to transition to a high return state variable $x'$. Here, specialized workers could be employed in a technical occupation either because this match has high flow surplus or because workers expect high returns from specializing further in the future. Given the estimated transition matrices, our estimation is able to disentangle the two and estimate the surplus parameters free from the bias of anticipation.

The estimation results for equation (ref) are reported in Table (ref). The ratio $2a/b$ is equal to 4.87, indicating workers' occupation-specific experience in the past five years matters roughly four times more (subtracting 1 from $4.87$ which is approximately 5) for matching into a general or managerial job over a technical job compared to overall potential experience in the labor market.

table[table omitted — 517 chars of source]

Conclusion

This paper introduces a new repeated matching games that generalizes the static, transferable-utility matching games of shapleyAssignmentGameCore1971 and related work to a repeated matching game, where each period prices and matches form, flow profits are realized by the forward-looking agents, and agent state variables evolve stochastically as a function of current matches. We prove existence of both a time-varying, dynamic competitive equilibrium as well as a stationary equilibrium. We prove the key result that the dynamic competitive equilibrium solves a social planner's problem. Our results are shown both for the baseline model without econometric errors, as in the static shapleyAssignmentGameCore1971 and related work, and a model with econometric errors, as in the static chooWhoMarriesWhom2006 and related work.

We provide computational tools for determining both a dynamic competitive equilibrium and a stationary equilibrium, for both the models with and without econometric errors. We show how to modify the models for stationary equilibrium for structural estimation of the parameters in the production to a match, using data on changing relationships over time. Our empirical illustration for elite Swedish engineers finds that recent work experience is roughly four times more important than total labor market experience in sorting into managerial instead of technical jobs.

appendix\section{Proofs} \subsection{Proofs of Results in Section (ref)} \subsubsection{Proposition (ref)} \begin{proof} We rely on romeijnShadowPricesInfiniteDimensional1998, a paper on linear programming with a countable number of terms in the objective function and a countable number of constraints. This paper reverses the term primal and dual from our usage. In other words, the maximization problem, our primal, is called the dual in romeijnShadowPricesInfiniteDimensional1998. To avoid confusion, we will use the terms from our paper in this proof. The formal dual from romeijnShadowPricesInfiniteDimensional1998 uses control variables $\tilde{U}^t_x$ and $\tilde{V}^t_y$ that are the present discounted values of future utility from the viewpoint of the initial period, so that $\tilde{U}^t_x$ = $\beta^t {U}^t_x$. Our dual program then becomes \begin{eqnarray} &&\min_{\tilde{U}^t, \tilde{V}^t} \left\{ \sum_{x \in \operatorname{\mathcal{X}}} m_x \tilde{U}^0_x + \sum_{y \in \operatorname{\mathcal{Y}}} n_y \tilde{V}^0_y \right\} \nonumber \\ &&subject to \nonumber \\ && \tilde{U}^t_x+\tilde{V}^t_y \geq \beta^t \Phi_{xy} +\sum_{x' \in \operatorname{\mathcal{X}}}P_{x'|xy}\tilde{U}^{t+1}_{x'}+ \sum_{y' \in \operatorname{\mathcal{Y}}}Q_{y'|xy}\tilde{V}^{t+1}_{y'} \quad \forall t \geq 0,\, x \in \operatorname{\mathcal{X}},\, y \in \operatorname{\mathcal{Y}} \nonumber \\ && \tilde{U}^t_x \geq \sum_{x' \in \operatorname{\mathcal{X}}}P_{x'|x0}\tilde{U}^{t+1}_{x'} \quad \forall t,\, x \in \operatorname{\mathcal{X}} \nonumber \\ && \tilde{V}^t_y \geq \sum_{y' \in \operatorname{\mathcal{Y}}}Q_{y'|0y}\tilde{V}^{t+1}_{y'} \quad \forall t,\, y \in \operatorname{\mathcal{Y}}. \nonumber \end{eqnarray} To verify that this is indeed the dual under the definition used in romeijnShadowPricesInfiniteDimensional1998, we need to show a crosswalk between our paper's notation and the notation used in romeijnShadowPricesInfiniteDimensional1998. We use bars to refer to the symbols in romeijnShadowPricesInfiniteDimensional1998 within this proof, as some of their symbols are the same as symbols we use for other purposes. The crosswalk with romeijnShadowPricesInfiniteDimensional1998 is $\bar{i}\rightarrow t+1$, $\bar{c}_1\rightarrow (m ^\top , n^\top) ^\top $, $ \bar{c}_{\bar{i}} \rightarrow 0 \: \forall \bar{i} \geq 2 $, $ \bar{x}_{\bar{i}} \rightarrow ((\tilde{U}^{\bar{i}-1}) ^\top, (\tilde{V}^{\bar{i}-1})^\top)^\top $, $\bar{A}_{\bar{i},\bar{i}-1} $ is a matrix (defined independently of $i$) of size $ (|\mathcal X | |\mathcal Y |+|\mathcal X | + |\mathcal Y |) \times (|\mathcal X | + |\mathcal Y |) $ that is such that $\bar{A}_{\bar{\imath},\bar{\imath}-1}\binom{\tilde{U}}{\tilde{V}}$ is the vector obtained by stacking $\tilde{U}_{x}+\tilde{V}_{y}$, $\tilde{U} _{x}$ and $\tilde{V}_{y}$ in the row-major order.\footnote{For example, if $\left\vert \tilde{ X}\right\vert =\left\vert \mathcal{Y}\right\vert =2$, we have $\bar{A}_{\bar{ \imath},\bar{\imath}-1}\binom{\tilde{U}}{\tilde{V}}=( \tilde{U} _{1}+\tilde{V}_{1},\tilde{U}_{1}+\tilde{V}_{2},\tilde{U}_{2}+\tilde{V}_{1}, \tilde{U}_{2}+\tilde{V}_{2},\tilde{U}_{1},\tilde{U}_{2},\tilde{V}_{1},\tilde{ V}_{2}) ^{\top }$.} Next, $\bar{A}_{\bar{i},\bar{i}} \rightarrow -(P^\top ,Q ^\top )$, $b_{\bar{i}} \rightarrow \beta^{ \bar{i} - 1} \Phi$ where $\Phi$ is the vectorized version of the match production matrix including values of 0 for being unmatched, and $\bar{y}_{\bar{i}} \rightarrow \mu^{\bar{i}-1}$ where $\mu$ is the vectorized version of the matching matrix. As we include outside options with production levels of zero, the nonnegativity constraints on the control variables in romeijnShadowPricesInfiniteDimensional1998 will be satisfied in our dual. Now, that we have derived the dual, we wish to prove strong duality, which means that the optimized objective function values of the primal and dual are equal. We refer to Corollary 3.9 in romeijnShadowPricesInfiniteDimensional1998 to prove strong duality. This corollary requires upper bounds on the control variables each period. We let $\bar{u}_{\bar{i}} = ({\beta^{\bar{i} - 1} \max {\Phi}}) \mathbf 1_{|\mathcal{X}|+|\mathcal Y|} $ be an upper bound on the discounted payoffs of agents of any type. Similarly, we let $\bar{v}_{\bar{i}} = (\max\left( M, N \right)) \mathbf 1 _{| \mathcal X | |\mathcal Y| + | \mathcal X|+| \mathcal Y| }$ be an upper bound on the mass of matches of any type. The condition in Corollary 3.9 is \[ \lim_{\bar{i} \rightarrow \infty } \bar{v}_{\bar{i} +1}^ \top | \bar{A}_{\bar{i},\bar{i}-1} | \bar{u}_{\bar{i}} = 0 \] where $| \bar{A}_{\bar{i},\bar{i}-1} |$ is the matrix obtained by taking the absolute values of all entries in $\bar{A}_{\bar{i},\bar{i}-1}$ term by term. By substituting in the definitions of the terms, one can see that the this expression is of the order of $\beta ^i$, and by Corollary 3.9, strong duality is proved. \end{proof} \subsubsection{Theorem (ref)} Proposition (ref) states that strong duality holds for the primal and dual countably infinite linear programs and the text after the theorem states that many properties familiar from the analysis of finite linear programs immediately apply to our problem, given that strong duality holds. Let's first show the forward direction, where we start with primal and dual solutions and show that a DCE can be found. At time $t$, let $\mu^t$ be the optimal policy of the social planner for the aggregate state $(m^t,n^t)$ and let $(U^t, V^t)$ be the associated Lagrange multipliers on the primal constraints. Then $(U^t, V^t)$ satisfies the dual's inequality conditions, which imply \begin{equation} -V_y^t+\gamma_{xy} + \beta \sum_{y' \in \operatorname{\mathcal{Y}}} Q_{y'|xy}V_{y'}^{t+1} \leq U_x^t-\alpha_{xy} - \beta \sum_{x' \in \operatorname{\mathcal{X}}} P_{x'|xy} U_{x'}^{t+1} \quad \forall x \in \operatorname{\mathcal{X}}, y \in \operatorname{\mathcal{Y}} \end{equation} with equality if $\mu^t_{xy} >0$. Thus $w^t$ defined in (ref) is indeed well defined, and implies that \[ U_{x}^{t} \geq \alpha_{xy}+w^t_{xy} + \beta \sum_{x' \in \operatorname{\mathcal{X}}} P_{x'|xy}U_{x'}^{t+1} . \] holds for all $x$ and $t$, with an equality if $\mu^t_{xy} > 0$, which implies that \[ U_{x}^{t} = \max_{y \in \operatorname{\mathcal{Y}}_0} \{ \alpha_{xy}+w^t_{xy} + \beta \sum_{x' \in \operatorname{\mathcal{X}}} P_{x'|xy}U_{x'}^{t+1} \} . \] A similar statement can be made for $V^t_y$, and thus equation (ref) in definition (ref) is satisfied, which shows that the tuple $(\mu,w)$ is a DCE. For the other direction of the argument, we need to show that a DCE satisfies the optimality conditions of a linear program. Let $(\mu, w)$ be a DCE and let $(U^t,V^t)_t$ be the associated continuation values, as in Definition (ref). Then every $\mu^t$ is feasible by definition, and hence satisfies the social planner's primal problem's feasibility conditions. To check the dual problem's feasibility conditions, note that by definition of the DCE: $$U_{x}^{t}\left(w^{(t)}\right) \geq \alpha_{xy}+w^t_{xy} + \beta \sum_{x' \in \operatorname{\mathcal{X}}} P_{x'|xy}U_{x'}^{t+1}\left(w^{(t+1)}\right) \quad \forall x,y \in \operatorname{\mathcal{X}}\operatorname{\mathcal{Y}}_0$$ and $$V_{y}^{t}\left(w^{(t)}\right) \geq \gamma_{xy}-w^t_{xy} + \beta \sum_{y' \in \operatorname{\mathcal{Y}}} Q_{y'|xy}V_{y'}^{t+1}\left(w^{(t+1)}\right) \quad \forall x,y \in \operatorname{\mathcal{X}}_0\operatorname{\mathcal{Y}}. $$ Adding these two inequalities for every $x,y \in \operatorname{\mathcal{X}}\operatorname{\mathcal{Y}}$ gives \begin{equation} \begin{aligned} U_{x}^{t}\left(w^{(t)}\right)+ &V_{y}^{t}\left(w^{(t)}\right) \geq \Phi_{xy} \\ &+ \beta \left(\sum_{x' \in \operatorname{\mathcal{X}}} P_{x'|xy}U_{x'}^{t+1}\left(w^{(t+1)}\right) +\sum_{y' \in \operatorname{\mathcal{Y}}} Q_{y'|xy}V_{y'}^{t+1}\left(w^{(t+1)}\right)\right), \end{aligned} \end{equation} which is the first inequality in the social planner's dual problem as shown in the main text. The next two inequalities in the dual problem are also satisfied by similar reasoning. Finally, there remain to check the complementary slackness conditions: \begin{equation*} \begin{aligned} \mu_{xy} & \Biggl( \Phi_{xy} -U^t_x\left(w^{(t)}\right) - V^t_y\left(w^{(t)}\right) \\ + &\beta \Biggl(\sum_{x' \in \operatorname{\mathcal{X}}} P_{x'|xy}U_{x'}^{t+1}\left(w^{(t+1)}\right) +\sum_{y' \in \operatorname{\mathcal{Y}}} Q_{y'|xy}V_{y'}^{t+1}\left(w^{(t+1)}\right)\Biggr) \Biggr) = 0 \quad \forall x,y \in \operatorname{\mathcal{X}}\operatorname{\mathcal{Y}} \\ \mu_{x0} &\left(-U^t_x\left(w^{(t)}\right) + \beta \sum_{x' \in \operatorname{\mathcal{X}}} P_{x'|x0}U_{x'}^{t+1}\left(w^{(t+1)}\right) \right)= 0 \quad \forall x \in \operatorname{\mathcal{X}} \\ \mu_{0y} &\left( -V^t_y\left(w^{(t)}\right) + \beta \sum_{y' \in \operatorname{\mathcal{Y}}} Q_{y'|0y}V_{y'}^{t+1}\left(w^{(t+1)}\right)\right) = 0 \quad \forall y \in \operatorname{\mathcal{Y}}. \\ \end{aligned} \end{equation*} These are obtained by the definition of a DCE: if $\mu^t_{xy} > 0$, then option $x$ is optimal for $y$ and conversely, and thus (ref) holds as an equality. $(\mu^t)_t$ and $(U^t,V^t)_t$ therefore satisfy the primal equalities, the dual inequalities, and the complementary slackness conditions. Therefore, the components of the DCE are optimal for the social planner problem. \subsubsection{Theorem (ref)} \begin{proof} Define the set-valued function $\varphi: L \rightarrow L$ by $$ \varphi: (m,n) \rightarrow \left\{ \left(P\mu, Q\mu \right) \mid \mu \: \mathrm{solution \: to \: \eqref{eq_RecSP}} \text{ given } (m,n) \right\}, $$ where we recall that $L = \left\{(m,n) | \sum_x m_x = M, \, \sum_y n_y = N \right\}$. This associates the next period's population counts to the present period ones. There can be multiple solutions $\mu$ to problem (ref), so $\varphi$ is a set-valued function. We show that $\varphi$ admits a fixed point using Kakutani's theorem. To apply the theorem we need the following: \begin{enumerate} • $L$ is non-empty, compact and convex. • $\varphi$ has closed graph, where the graph of $\varphi$ is $$\text{Gr}_{\varphi} = \left\{(m,n,m',n') \in L \times L \, |\, (m',n') \in \varphi(m,n) \right\}.$$ • The set $\varphi(m,n)$ is non-empty and convex. \end{enumerate} Consider point (1). Clearly $L$ is non-empty. Compactness arises because $L$ is closed and bounded. For convexity, consider two aggregate states $(m,n)$, $(m',n') \in L$. Then, on the worker side, $ \sum_x \theta m_x + (1-\theta)m'_x = \theta M + (1-\theta) M = M$ and the same applies on the firm side. Hence the linear combination $(\theta m+(1-\theta)m', \theta n+(1-\theta)n')$ also belongs to $L$. To show point (2), we use the closed graph theorem (recalled as Theorem 17.11 in aliprantisInfiniteDimensionalAnalysis2006) for set-valued functions, which states that if $\varphi: L \rightarrow L$ is upper hemicontinuous and $\varphi(m,n)$ is a closed set for all $(m,n) \in L$ then $\text{Gr}_{\varphi}$ is closed. We use Berge's maximum theorem (aliprantisInfiniteDimensionalAnalysis2006, Theorem 17.31) which states that if \begin{enumerate} • the correspondence $\mathcal{C}(m,n) \rightrightarrows \left\{\mu | \mu \in \mathcal{M}(m,n) \right\}$ is compact-valued and continuous and • the objective function $\mu \rightarrow \sum_{xy \in \operatorname{\mathcal{X}_0} \operatorname{\mathcal{Y}_0}} \Phi_{xy} \mu_{xy} + \beta W(P\mu, Q\mu)$ is continuous, \end{enumerate} then the set of solutions $\mu$ is upper hemicontinuous in the argument $(m,n)$, with non-empty and compact values. Because the set of solutions is compact and lies in a metric space, the set is also closed, the other condition of the closed graph theorem for set-valued functions. We now show points (a) and (b). Lemma (ref) in the Supplementary Material shows point (a). Point (b) is straightforward because $\mu$ enters the per-period payoffs linearly, we know $W$ is uniquely defined across across all solutions and continuous from Proposition (ref), sums like $P\mu$ are themselves linear (continuous) functions of $\mu$, and compositions of continuous functions like $W(P\mu, Q\mu)$ are continuous. Point (3) of Kakutani's theorem is that $\varphi(m,n)$ is non-empty and convex. We just used the maximum theorem to show that $\varphi(m,n)$ is non-empty and compact. Convexity follows from the fact that $\varphi(m,n)$ is the set of maximizers of the function $\mu \rightarrow \sum_{xy \in \operatorname{\mathcal{X}_0} \operatorname{\mathcal{Y}_0}} \Phi_{xy} \mu_{xy} + \beta W(P\mu, Q\mu)$, which is concave, and therefore, is a convex set. \end{proof} \subsection{Proofs of Results in Section (ref)} \subsubsection{Theorem (ref)} \begin{proof} As in the proof of Theorem (ref), define function $\varphi: L \rightarrow L$ by $$ \varphi: (m,n) \rightarrow \left(P\mu(m,n), Q\mu(m,n) \right) $$ where $\mu(m,n)$ is the social planner's optimal policy given aggregate state $(m,n)$, i.e. $\mu(m,n)$ solves (ref). There is a unique social planner solution to the regularized problem. We show that $\varphi$ admits a fixed point using Brouwer's theorem. To apply the theorem we need the following: \begin{enumerate} • $L$ is non-empty, compact and convex. • $\varphi$ is continuous in $(m,n)$. \end{enumerate} Point (1) was shown in the proof of Theorem (ref). To show point (2), we need the function $(m,n) \rightarrow \mu(m,n)$ to be continuous in $(m,n)$, as $P\mu$ and $Q\mu$ are linear functions of $\mu$. We show continuity of $\mu(m,n)$ using Berge's maximum theorem. We have shown in Corollary (ref) that $\mu(m,n)$ is the unique maximizer. To apply the maximum theorem we need the following: \begin{enumerate} • $\mathcal{C}: (m,n) \rightrightarrows \left\{\mu \,|\, \mu \in \mathcal{M}(m,n)\right\} $ is a compact-valued and continuous correspondence. This was shown in the proof of Theorem (ref). • $W$ is continuous. This is shown in Proposition (ref). \end{enumerate} Since we have shown (1) and (2), we obtain with Brouwer that $\varphi$ admits a fixed point. \end{proof}