1 Introduction

Many problems of interest in economics involve a major player, typically the Government or the Central Bank, choosing some aggregate policy instrument such as a tax or an interest rate in order to maximize some aggregate welfare criterion. Most of the existing models analyzing optimal policies drastically simplify the economy by assuming a “representative agent,” that is, they summarize the behavior of heterogeneous firms or households in a single individual that accounts for the mean of the distribution.Footnote 1 The few exceptions typically rely either on “ brute force” numerical methods, that is, parameterizing the time-path of the optimal policies and then running a numerical search to find the optimal nodes, or on some particular set of assumptions such that a closed-form analytical solution can be obtained.Footnote 2

In this paper we analyze problems in which a large benevolent player, controlling a set of policy variables, maximizes an aggregate welfare criterion in a continuous-time economy populated by atomistic agents subject to idiosyncratic shocks. This can be seen as a particular case of the theory of mean field games (MFGs), introduced by [32, 33] and [27].Footnote 3 The economy is described as an infinite-horizon mean field game with state constraints in which the aggregate distribution affects individual agents through the dynamics of some aggregate variables. This framework encompasses the standard notion of a dynamic competitive equilibrium in macroeconomics, in which individual agents choose their control variables to maximize their value functions given the path of some aggregate variables (typically prices) and simultaneously the value of these variables is set such that aggregate supply equals aggregate demand (i.e., markets clear).Footnote 4 In continuous time, the system is composed by a Hamilton-Jacobi-Bellman (HJB) equation, which characterizes the individual problem in terms of the value function, a Kolmogorov forward (KF) or Fokker-Planck equation, which describes the dynamics of the cross-sectional distribution, and a number of market-clearing conditions based on the aggregation of individual variables. The individual agents may also face state constraints, so that the accessible state space is restricted to a subset of \( \mathbb {R} ^{n}.\) This model is typically denoted as the “ incomplete-market model with idiosyncratic shocks,” as there is no aggregate uncertainty.

Before analyzing the optimal policies, we set as a benchmark the social optimum, defined as the allocation produced by a planner that maximizes aggregate welfare by directly determining the individual controls of each agent, under full information. The welfare criterion is summarized by a social welfare function, which aggregates the individual utility flows across time and states. We assume that the planner discounts future utility flows using the same discount factor as individual agents.Footnote 5 This problem can be seen as a particular case of the mean field control problem analyzed in [7] or the control of McKean-Vlasov dynamics studied by [11, 13] and [14]. The problem can be solved using calculus techniques in infinite-dimensional Hilbert spaces.Footnote 6 The necessary conditions can be characterized, as in the competitive equilibrium, by a forward-backward system of partial differential equations. The difference is that the individual value function is now replaced by the social value function, which describes the value that the planner assigns to each agent depending on her state. This social value function can be obtained from the planner’s HJB equation, which includes some Lagrange multipliers capturing the “ shadow price” of the market clearing conditions.

In order to analyze the optimal social policies we extend the competitive equilibrium model to include some aggregate policy variables controlled by a large benevolent agent, that we denote as ‘the leader,’ who maximizes the social welfare function. In contrast to the social optimum above, this is not a mean field control problem but a mean field game with a large (non-atomistic) player. In order to characterize this kind of games it is essential to understand whether the leader is able to make credible commitments about the future path of the policy variables. We consider two polar cases. On the one hand, we consider what economists typically define as the “ Ramsey problem,” which corresponds to the open-loop Stackelberg solution of the game.Footnote 7 In this case the leader solves at time zero, given the initial state distribution, a maximization problem in which it takes into account the impact of its decisions on the individual agents’ value and control functions. The necessary conditions for optimality include a social value function similar to the one in the social optimum and a distribution of costates that keep track of the value of breaking the “ promises” made at time zero about the future path of aggregate policies. As originally discussed by [31] this problem is time-inconsistent. On the other hand, we analyze the feedback (Markov) Stackelberg solution, in which the leader cannot make credible commitments.Footnote 8 This problem is time-consistent and can be seen as a setting in which the leader has only instantaneous advantage. The solution in this case is similar to the solution under commitment with the Lagrange multiplier associated to the individual HJB equation equal to zero. The intuition for this result is that in the feedback Stackelberg solution no credible promises can be made by the leader and thus the value of breaking them is zero.

Related Literature Since the original contribution of [34] a growing literature has emerged analyzing mean field control problems. In addition to the papers commented above, we should mention recent contributions by [29, 44,45,46, 49] and [25], among others. In economics, the problem has been analyzed in [17] in discrete time and in [37] and [42] in continuous time. The present paper reproduces the results in [42] analyzing the optimal allocation in a mean field game with state constraints in which the aggregate distribution affects individual agents only through some aggregate variables.

The literature analyzing mean field games with a non-atomistic (‘major’) player is less extensive. [28] and [39] introduced a linear-quadratic model with a major player whose influence does not fade away as the number of players tends to infinity. [41] generalized the model to the nonlinear case. In these early contributions the major player does not directly affect the dynamics of the atomistic players, only their cost functionals, and hence they are of little interest in most economic applications. [40] consider the more general case in which the major player directly affects the individual dynamics, but only in the context of linear-quadratic models. [8] analyze the general nonlinear case assuming a closed-loop Stackelberg game strategy in which the major player chooses her own control to minimize its expected cost taking into account the impact of this decision on the controls selected by the minor players. The solution is characterized by a set of stochastic partial differential equations. Carmona and Zhu [16] and Carmona and Wang [15], instead, consider a Nash game strategy using the probabilistic approach developed by [12]. Carmona and Wang [15], in particular, characterize the solution under open-loop, closed-loop and feedback controls. Our paper contributes to this literature in three main aspects. First, up to our knowledge this is the first paper to analyze both the open-loop and the feedback Stackelberg solutions in a model without aggregate uncertainty, characterizing these solutions as forward-backward systems of partial differential equations.Footnote 9 Second, we consider a case in which the major player (‘the leader’) maximizes the aggregate welfare of the atomistic agents—instead of its own individual welfare—in a model with state constraints and aggregate variables. This provides a useful tool for the future analysis of optimal policies in economic problems. Third, by presenting together the results under competitive equilibrium, social optimum and optimal social policies under commitment and discretion this paper aims at providing a unified framework to compare the properties of the resulting forward-backward systems.

The structure of the paper is as follows. Section 2 introduces the competitive equilibrium in a MFG form. Section 3 analyzes the social optimum, following [42]. Section 4 builds on [43] to analyze the optimal policies under commitment and discretion, including necessary conditions for the open-loop and feedback Stackelberg solutions. Finally, Sect. 5 concludes. All the proofs are presented in the Appendix.

It is important to remark that the proofs in this paper should be considered as “ informal” or as “ sketches of a proof” at best, and that many important issues have been overlooked. We hope that this paper will open new avenues for future research in mean field game theory with important applications in economics.

2 Competitive Equilibrium

First we provide a general model of a “ competitive equilibrium,” as it is typically understood in economics. We consider a continuous-time infinite-horizon economy. Let \(\left( \Sigma ,\mathcal {F} ,\left\{ \mathcal {F}_{t}\right\} ,\mathbb {P}\right) \) be a filtered probability space. There is a continuum of unit mass of ex-ante identical agents indexed by \(i\in [0,1].\)

2.1 Individual Problem

State First we analyze the problem of an individual agent. Let \( W^{i}\left( t\right) \) be a n-dimensional \(\mathcal {F} _{t}\)-adapted Brownian motion and \(X^{i}\left( t\right) \in \mathbb {R} ^{n}\) denote the state of the agent i at time \(t\in [0,\infty ).\) The individual state evolves according to a multidimensional Itô process of the form

$$\begin{aligned} dX^{i}\left( t\right)= & {} b\left( X^{i}\left( t\right) ,u^{i}(t),Z\left( t\right) \right) dt+\sigma \left( X^{i}\left( t\right) \right) dW^{i}\left( t\right) , \\ X^{i}\left( 0\right)= & {} x_{0}^{i}, \nonumber \end{aligned}$$
(1)

where \(u\in U\subset \mathbb {R} ^{m}\) is a m-dimensional vector of control variables and \(Z\left( t\right) \in \mathbb {R} ^{p}\) is a deterministic p-dimensional vector of aggregate variables. The functional coefficients are defined as follows

$$\begin{aligned}&b : \mathbb {R} ^{n}\times U\times \mathbb {R} ^{p}\rightarrow \mathbb {R} ^{n}, \\&\sigma : \mathbb {R} ^{n}\rightarrow \mathbb {R} ^{n}, \\&Z :[0,\infty )\rightarrow \mathbb {R} ^{p}, \\&u :[0,\infty )\times \mathbb {R} ^{n}\rightarrow U. \end{aligned}$$

The measurable functions b and \(\sigma \) satisfy a uniform Lipschitz condition in U :  \(\exists K\ge 0,\) such that \(\forall x,x^{\prime }\in \mathbb {R} ^{n},\) \(\forall u,u^{\prime }\in U,\) \(\forall Z,Z^{\prime }\in \mathbb {R} ^{p}\)

$$\begin{aligned} \left| b\left( x,u,Z\right) -b\left( x^{\prime },u^{\prime },Z^{\prime }\right) \right|\le & {} K\left( \left| x-x^{\prime }\right| +\left| u-u^{\prime }\right| +\left| Z-Z^{\prime }\right| \right) , \\ \left| \sigma \left( x\right) -\sigma \left( x^{\prime }\right) \right|\le & {} K\left| x-x^{\prime }\right| . \end{aligned}$$

We assume that U is a closed subset of \( \mathbb {R} ^{m}.\) Let \(\mathcal {U}\) be the set of measurable controls taking values in U. We allow for state constraints in which the state \(X\left( t\right) \) cannot leave the compact region \(\Omega \subset \mathbb {R} ^{n}\), that is, control \(u\left( \cdot \right) \) at a point \(X\left( t\right) =x\) is an admissible control if \(u\left( \cdot \right) \in \mathcal {U}\left( t,x\right) ,\) whereFootnote 10

$$\begin{aligned} \mathcal {U}\left( t,x\right) :=\left\{ u\left( \cdot \right) \in \mathcal {U} \text { such that }X\left( s\right) \in \Omega ,\text { }\forall s\ge t\text { with }X\left( t\right) =x\right\} . \end{aligned}$$

We also assume that \(\sigma _{n}\left( x\right) =0\) if \(x\in \partial \Omega _{n}\) that is, that the volatility in the nth dimension is zero if the \( n- \)th dimensional boundary is reached. From now on, we drop the superindex i as there is no possibility of confusion.

Utility Functional Each agent maximizes her utility functional

$$\begin{aligned} J\left( t,x,u\left( \cdot \right) \right) =\mathbb {E}\left[ \int _{t}^{\infty }e^{-\rho \left( s-t\right) }f(X\left( s\right) ,u\left( s\right) )ds\text { } |\text { }X\left( t\right) =x\right] , \end{aligned}$$

where the discount factor \(\rho \) is a positive constant. The instantaneous utility function

$$\begin{aligned} f: \mathbb {R} ^{n}\times \mathbb {R} ^{m}\rightarrow \mathbb {R} , \end{aligned}$$

satisfies a polynomial growth condition: \(\exists K,c>0,\) such that \(\forall x\in \mathbb {R} ^{n},\) \(\forall u\in U,\)

$$\begin{aligned} \left| f\left( x,u\right) \right| \le K\left( 1+\left| x\right| ^{c}+\left| u\right| ^{c}\right) . \end{aligned}$$

The optimal value function V(tx) is defined as

$$\begin{aligned} V(t,x)=\max _{u\left( \cdot \right) \in \mathcal {U}\left( t,x\right) }J\left( t,x,u\left( \cdot \right) \right) , \end{aligned}$$
(2)

subject to (1). The transversality condition is

$$\begin{aligned} \lim _{t\rightarrow \infty }e^{-\rho t}V(t,x)=0. \end{aligned}$$
(3)

Hamilton–Jacobi–Bellman (HJB) Equation The solution to this problem is given by a value function V(tx) and a control strategy u(tx) that satisfy the HJB equation

$$\begin{aligned} \rho V\left( t,x\right) =\frac{\partial V}{\partial t}+\max _{u\in U_{t,x}}\left\{ f(x,u)+\mathcal {A}_{u,Z}V\right\} , \end{aligned}$$
(4)

where \(\mathcal {A}_{u,Z}\) is given by:

$$\begin{aligned} \mathcal {A}_{u,Z}V=\sum _{i=1}^{n}b_{i}\left( x,u,Z\right) \frac{\partial V}{ \partial x_{i}}+\sum _{i=1}^{n}\sum _{k=1}^{n}\frac{\left( \sigma (x)\sigma (x)^{\top }\right) _{i,k}}{2}\frac{\partial ^{2}V}{\partial x_{i}\partial x_{k}}. \end{aligned}$$
(5)

and \(U_{t,x}\) is the subset of controls such that the corresponding vector field \(b\left( \cdot \right) \) points inside the constraint, i.e.

$$\begin{aligned} U_{t,x}=\left\{ \begin{array}{ll} U, &{} \text {if }x\in \text {int}\left( \Omega \right) , \\ \left\{ u\in \mathcal {U}:b\left( x,u,Z\left( t\right) \right) \cdot \nu \left( x\right) <0\right\} &{} \text {if }x\in \partial \Omega , \end{array} \right. \end{aligned}$$

with \(\nu \left( x\right) \) being the outward normal vector at \(x\in \partial \Omega .\) Footnote 11

2.2 Aggregate Distribution and Aggregate Variables

Kolmogorov Forward (KF) Equation Assume that the transition measure of \(X\left( t\right) \) with initial value \(x_{0}\) has a density \(\mu (t,x;0,x_{0}),\) such that \(\forall F\in L^{2}( \mathbb {R} ^{n}):\)

$$\begin{aligned} \mathbb {E}_{0}\left[ F(X\left( t\right) )|X\left( 0\right) =x_{0}\right] =\int F(x)\mu (t,x;0,x_{0})dx. \end{aligned}$$

The initial distribution of X at time \(t=0\) is \(\mu (0,x)=\mu _{0}(x).\) The dynamics of the distribution of agents

$$\begin{aligned} \mu (t,x)=\int \mu (t,x;0,x_{0})\mu _{0}(x_{0})dx_{0} \end{aligned}$$

are given by the Kolmogorov Forward (KF) or Fokker-Planck equation

$$\begin{aligned} \frac{\partial \mu }{\partial t}= & {} \mathcal {A}_{u,Z}^{*}\mu , \end{aligned}$$
(6)
$$\begin{aligned} \int \mu (t,x)dx= & {} 1, \end{aligned}$$
(7)

where \(\mathcal {A}_{u,Z}^{*}\) is the adjoint operator of \( \mathcal {A}_{u,Z}:\)

$$\begin{aligned} \mathcal {A}_{u,Z}^{*}\mu&=-\sum _{i=1}^{n}\frac{\partial }{\partial x_{i}} \left[ b_{i}\left( x,u,Z\right) \mu \left( t,x\right) \right] \nonumber \\&\quad +\frac{1}{2} \sum _{i=1}^{n}\sum _{k=1}^{n}\frac{\partial ^{2}}{\partial x_{i}\partial x_{k} }\left[ \left( \sigma (x)\sigma (x)^{\top }\right) _{i,k}\mu \left( t,x\right) \right] . \end{aligned}$$

Market Clearing Conditions The vector of aggregate variables is determined by a system of p equations:

$$\begin{aligned} Z_{k}(t)=\int g_{k}(x,u\left( t,x\right) )\mu (t,x)dx, \quad k=1,\ldots ,p, \end{aligned}$$
(8)

where

$$\begin{aligned} g_{k}: \mathbb {R} ^{n}\times U\rightarrow \mathbb {R} . \end{aligned}$$

These equations are typically the market clearing conditions of the economy.

We may define the competitive equilibrium of this economy.

Definition 1

(Competitive equilibrium) The competitive equilibrium is composed by the vector of aggregate variables \(Z\left( t\right) \), the value function V(tx), the control u(tx) and the distribution \(\mu (t,x)\) such that

  1. 1.

    Given \(Z\left( t\right) \) and \(\mu (t,x)\), V(tx) is the solution of the HJB equation (4) and the optimal control is u(tx).

  2. 2.

    Given u(tx) and \(Z\left( t\right) \), \(\mu (t,x)\) is the solution of the KF equation (6, 7).

  3. 3.

    Given u(tx) and \(\mu (t,x),\) the aggregate variables \(Z\left( t\right) \) satisfy the market clearing conditions (8).

Remark 1

It should be clear from this definition that a competitive equilibrium is just a particular instance of mean field game theory in which the aggregate distribution affects each individual agent only through the dynamics of the aggregate variables \(Z\left( t\right) .\)

3 The Social Optimum

Social Welfare Functional We study as a benchmark the allocation produced by a benevolent social planner who maximizes an aggregate welfare criterion, that is, instead of a decentralized problem with multiple decision makers we consider the case of a single decision-maker who controls each individual agent. This is a mean field control problem instead of a mean field game. The planner chooses the vector of control variables u(tx) to be applied to every agent. The social welfare functional is

$$\begin{aligned} J^{opt}\left( \mu \left( 0,\cdot \right) ,u(\cdot )\right) =\int _{0}^{\infty }e^{-\rho t}\left[ \int \omega (t,x)f(x,u)\mu (t,x)dx\right] dt, \end{aligned}$$
(9)

where \(\omega (t,x)\) are state-dependent Pareto weights. If \(\omega (t,x)=1,\) for all t and x,  then we have a purely utilitarian social welfare function which gives the same weight to every agent.

The planner’s optimal value functional is

$$\begin{aligned} V^{opt}\left( \mu \left( 0,\cdot \right) \right) =\max _{u\left( \cdot \right) \in \mathcal {U}\left( t,x\right) }J^{opt}\left( \mu \left( 0,\cdot \right) ,u(\cdot )\right) , \end{aligned}$$
(10)

subject to the law of motion of the distribution (6, 7) and to the market clearing conditions (8).

Remark 2

Notice that the state variable at time t in this case is the infinite-dimensional density \(\mu \left( t\right) .\)

Remark 3

In the utilitarian case, the planner’s social welfare functional under a given control \(\tilde{u}\left( t,x\right) \in \mathcal {U}\left( t,x\right) \) is equivalent to aggregating the individual value function under the same control across all agents at time zero:

$$\begin{aligned} \int V^{\tilde{u}}(0,x)\mu (0,x)dx= & {} \int \mathbb {E}\left[ \int _{0}^{\infty }e^{-\rho t}f(X\left( t\right) ,\tilde{u}\left( t\right) )dt|X\left( 0\right) =x\right] \mu (0,x)dx \\= & {} \int \left[ \int \int _{0}^{\infty }e^{-\rho t}f(\tilde{x},\tilde{u})\mu (t,\tilde{x};0,x)d\tilde{x}dt\right] \mu (0,x)dx \\= & {} \int _{0}^{\infty }e^{-\rho t}\int f(\tilde{x},\tilde{u})\left[ \int \mu (t,\tilde{x};0,x)\mu (0,x)dx\right] d\tilde{x}ds \\= & {} \int _{0}^{\infty }e^{-\rho t}\int f(\tilde{x},\tilde{u})\mu (t,\tilde{x})d \tilde{x}ds=J^{opt}\left( \mu \left( 0,\cdot \right) ,\tilde{u}(\cdot )\right) , \end{aligned}$$

where \(V^{\tilde{u}}(t,x)\ \)is the individual value function under control \( \tilde{u}\), characterized by the HJB

$$\begin{aligned} \rho V^{\tilde{u}}\left( t,x\right) =\frac{\partial V^{\tilde{u}}}{\partial t }+\left\{ f(x,\tilde{u})+\mathcal {A}_{\tilde{u},Z}V^{\tilde{u}}\right\} , \text { } \end{aligned}$$

and \(\mu (t,\tilde{x};0,x)\) is the transition probability from \(X\left( 0\right) =x\) to \(X\left( t\right) =\tilde{x}\) and

$$\begin{aligned} \int \mu (t,\tilde{x};0,x)\mu (0,x)dx=\mu (t,\tilde{x}), \end{aligned}$$

is the Chapman–Kolmogorov equation.

We provide necessary conditions to the problem (10).

Proposition 1

(Necessary conditions - social optimum) If a solution to problem (10) exists with \( e^{-\rho t}u\), \(e^{-\rho t}\mu \in L^{2}\left( [0,\infty )\times \mathbb {R} ^{n}\right) \) and \(e^{-\rho t}Z\in L^{2}[0,\infty )\), then the optimal value functional \(V^{opt}\left( \mu \left( 0,\cdot \right) \right) \) can be expressed as

$$\begin{aligned} V^{opt}\left( \mu \left( 0,\cdot \right) \right) =\int \phi (0,x)\mu (0,x)dx, \end{aligned}$$
(11)

where \(\phi \left( t,x\right) \) is the marginal social value function, which represents the social value of an agent at time t and state x. The social value function satisfies the planner’s HJB

$$\begin{aligned}&\displaystyle \rho \phi (t,x) =\frac{\partial \phi }{\partial t}+\max _{u\in U_{t,x}}\left\{ \omega (t,x)f(x,u)+\sum _{k=1}^{p}\lambda _{k}(t)\left[ g_{k}(x,u)-Z_{k}\left( t\right) \right] +\mathcal {A}_{u,Z}\phi \right\} \! ,\nonumber \\ \end{aligned}$$
(12)
$$\begin{aligned}&\displaystyle \lim _{T\rightarrow \infty }e^{-\rho T}\phi (T,x) =0 \end{aligned}$$
(13)

where the Lagrange multipliers \(\lambda (t):=\left[ \lambda _{1}(t),\ldots ,\lambda _{k}(t),\ldots ,\lambda _{p}(t)\right] ^{\top },\) are given by

$$\begin{aligned} \lambda _{k}(t)=\int \sum _{i=1}^{n}\frac{\partial \phi }{\partial x_{i}} \frac{\partial b_{i}}{\partial Z_{k}}\mu (t,x)dx. \end{aligned}$$
(14)

The social optimum of this economy is defined in a similar fashion as in the case of a competitive equilibrium above.

Remark 4

The social optimum is composed by the vector of aggregate variables \(Z\left( t\right) \), the social value function \(\phi (t,x)\), the control u(tx),  the Lagrange multipliers \(\lambda (t)\) and the distribution \(\mu (t,x)\) such that

  1. 1.

    Given \(Z\left( t\right) ,\) \(\lambda (t)\) and \(\mu (t,x)\), \(\phi (t,x)\) is the solution of the planner’s HJB equation (12) and the optimal control is u(tx).

  2. 2.

    Given u(tx) and \(Z\left( t\right) \), \(\mu (t,x)\) is the solution of the KF equation (6, 7).

  3. 3.

    Given u(tx) and \(\mu (t,x),\) the aggregate variables \(Z\left( t\right) \) satisfy the market clearing conditions (8).

  4. 4.

    Given u(tx), \(Z\left( t\right) \) and \(\mu (t,x),\) the Lagrange multipliers \(\lambda (t)\) satisfy (14).

Remark 5

The Lagrange multipliers \(\lambda (t)\) reflect the ‘shadow prices’ of the market clearing condition (8). They price, in utility terms, the deviation of an agent from the value of the aggregate variable: \( g_{k}(x,u)-Z_{k}.\)

Corollary 1

If the competitive equilibrium allocation satisfies

$$\begin{aligned} \int \sum _{i=1}^{n}\frac{\partial V}{\partial x_{i}}\frac{\partial b_{i}}{ \partial Z_{k}}\mu (t,x)dx=0, \end{aligned}$$
(15)

then the competitive equilibrium and the utilitarian optimal allocation \( \left( \omega =1\right) \) coincide:

$$\begin{aligned} \lambda _{k}(t)=0, \quad k=1,\ldots ,p \end{aligned}$$

and

$$\begin{aligned} \phi (t,x)=V(t,x). \end{aligned}$$

4 Optimal Social Policies

4.1 General Setting

Aggregate Policy Variables Consider again the decentralized competitive equilibrium and assume that the state of each individual agent is now given by

$$\begin{aligned} dX\left( t\right) =b\left( X\left( t\right) ,u(t),Z\left( t\right) ,Y\left( t\right) \right) dt+\sigma \left( X\left( t\right) \right) dW\left( t\right) , \end{aligned}$$
(16)

where \(Y\left( t\right) \in \mathbb {R} ^{q}\) is a q-dimensional vector of aggregate policy variables:

$$\begin{aligned} Y:[0,\infty )\rightarrow \mathbb {R} ^{q}, \end{aligned}$$

and b satisfy a uniform Lipschitz condition.Footnote 12 These policy variables are chosen by a large agent, which we denote as ‘the leader.’ The leader maximizes a social welfare function

$$\begin{aligned} J^{lead}\left( t,\mu (t,\cdot ),Y\left( \cdot \right) \right) =\int _{t}^{\infty }e^{-\rho \left( s-t\right) }\left[ \int \omega (s,x)f(x,u)\mu (s,x)dx\right] ds, \end{aligned}$$
(17)

similar to the one in the previous section.

Remark 6

The difference between this problem and the social optimum is that, instead of a mean field control case, here we are analyzing a mean field game including a large non-atomistic agent (the leader).

Equilibrium Concepts We consider two alternative equilibrium concepts, which depend on the ability of the leader to make credible commitments about future policies.

  1. 1.

    Commitment In the first case, we assume that at time zero the leader is able to credibly commit to the complete future path of policies \(\left\{ Y\left( t\right) \right\} _{t=0}^{\infty }.\) This corresponds to the open-loop Stackelberg equilibrium of the game, with

    $$\begin{aligned} Y\left( t\right) =\Upsilon ^{C}\left( t,\text { }\mu (0,\cdot )\right) , \end{aligned}$$

    where \(\Upsilon ^{C}\) is a deterministic measurable function of calendar time and the initial distribution. This is equivalent to say that, given the initial distribution \(\mu \left( 0,\cdot \right) ,\) the leader announces at time \(t=0\) the complete future evolution of the aggregate policy variables \( \left\{ Y\left( t\right) \right\} _{t=0}^{\infty }\) and commits not to reevaluate this initial plan. When formulating the optimal plan, the leader takes into account the impact of its aggregate policies on each atomistic agent’s optimal controls. Given the leader’s policy path, individual agents maximize their individual value functions (2). The result is a vector optimal individual controls \(u\left( t,x;\left\{ Y\left( s\right) \right\} _{s=0}^{\infty }\right) \) which depends on the complete path of the leader policy variables.

  2. 2.

    Discretion In the second case, no commitment device is available. This corresponds to the feedback Stackelberg equilibrium of the game, with

    $$\begin{aligned} Y\left( t\right) =\Upsilon ^{D}\left( t,\text { }\mu (t,\cdot )\right) , \end{aligned}$$

    where \(\Upsilon ^{D}\) is a deterministic progressively measurable function of the current state distribution. In this case the aggregate policies are time-consistent. This problem can be seen as the limit as \(\Delta \rightarrow 0\) of a sequence of open-loop Stackelberg problems of length \( \Delta \) in which the initial state at each stage n is given by the distribution at the beginning of the stage \(\mu (t_{n},\cdot ).\)

4.2 Commitment

First we consider the solution under commitment, which in economics is typically denoted as the ‘Ramsey problem’ and which corresponds to the open-loop Stackelberg solution of this game.

Definition 2

(Commitment) The problem of the leader under commitment is to choose the complete path of policies \(\left\{ Y\left( t\right) \right\} _{t=0}^{\infty }\) at time zero in order to maximize the aggregate welfare (17) when the aggregate distribution \(\mu (t,x),\) aggregate variables \(Z\left( t\right) \) and individual value function \(V(t,x)\ \)and controls u(tx) constitute a competitive equilibrium given \(\left\{ Y\left( t\right) \right\} _{t=0}^{\infty }\). Formally, this amounts to

$$\begin{aligned} \max _{\left\{ Y\left( t\right) \right\} _{t\in [0,\infty )}}J^{lead}\left( 0,\mu \left( 0,\cdot \right) ,Y\left( \cdot \right) \right) , \end{aligned}$$
(18)

subject to law of motion of the distribution (6, 7), to the market clearing conditions (8) and to the individual HJB equation (4).

The solution is given by the following proposition.

Proposition 2

(Necessary conditions—Commitment) If a solution to problem (18) exists with \(e^{-\rho t}u\), \( e^{-\rho t}\mu ,\) \(e^{-\rho t}V\in L^{2}\left( [0,\infty )\times \mathbb {R} ^{n}\right) \) and \(e^{-\rho t}Z,e^{-\rho t}Y\in L^{2}[0,\infty )\), it should satisfy the system of equations

$$\begin{aligned}&\int \left\{ \theta (t,x)\sum _{i=1}^{n}\frac{\partial b_{i}}{\partial Y_{r}} \frac{\partial V}{\partial x_{i}}+\sum _{j=1}^{m}\sum _{i=1}^{n}\eta _{j}(t,x) \frac{\partial ^{2}b_{i}}{\partial Y_{r}\partial u_{j}}\frac{\partial V}{ \partial x_{i}}+\mu (t,x)\sum _{i=1}^{n}\frac{\partial b_{i}}{\partial Y_{r}} \frac{\partial \phi }{\partial x_{i}}\right\} dx=0,\nonumber \\&\quad \text { }r=1,\ldots ,q, \end{aligned}$$
(19)

where \(\phi (t,x)\) is the marginal social value function, given by

$$\begin{aligned}&\displaystyle \rho \phi (t,x) =\frac{\partial \phi }{\partial t}+\omega (t,x)f(x,u)+\sum _{k=1}^{p}\lambda _{k}(t)\left( g_{k}(x,u)-Z_{k}\left( t\right) \right) +\mathcal {A}_{u,Z,Y}\phi , \nonumber \\\end{aligned}$$
(20)
$$\begin{aligned}&\displaystyle \lim _{T\rightarrow \infty }e^{-\rho T}\phi (T,x) =0. \end{aligned}$$
(21)

The Lagrange multipliers associated to the market clearing condition (8)

$$\begin{aligned} \lambda (t):=\left[ \lambda _{1}(t),\ldots ,\lambda _{k}(t),\ldots ,\lambda _{p}(t) \right] ^{\top } \end{aligned}$$

satisfy, \(k=1,\ldots ,p:\)

$$\begin{aligned} \lambda _{k}(t)= & {} \int \left\{ \theta (t,x)\sum _{i=1}^{n}\frac{\partial b_{i}}{ \partial Z_{k}}\frac{\partial V}{\partial x_{i}}+\sum _{j=1}^{m} \sum _{i=1}^{n}\eta _{j}(t,x)\frac{\partial ^{2}b_{i}}{\partial Z_{k}\partial u_{j}}\frac{\partial V}{\partial x_{i}}\right. \nonumber \\&\quad \quad \quad \quad +\left. \mu (t,x)\sum _{i=1}^{n}\frac{ \partial b_{i}}{\partial Z_{k}}\frac{\partial \phi }{\partial x_{i}}\right\} dx. \end{aligned}$$
(22)

The distribution of Lagrange multipliers \(\theta \left( t,x\right) \) associated to the individual HJB equation follows

$$\begin{aligned}&\displaystyle \frac{\partial \theta }{\partial t} =\mathcal {A}_{u,Z,Y}^{*}\theta -\sum _{i=1}^{n}\sum _{j=1}^{m}\frac{\partial }{\partial x_{i}}\left( \eta _{j}(t,x)\frac{\partial b_{i}}{\partial u_{j}}\right) ,\nonumber \\&\displaystyle \theta \left( 0,\cdot \right) =0, \end{aligned}$$
(23)

and the Lagrange multipliers associated to the individual first-order conditions

$$\begin{aligned} \eta \left( t,x\right) :=\left[ \eta _{1}\left( t,x\right) ,\ldots ,\eta _{k}\left( t,x\right) ,\ldots ,\eta _{m}\left( t,x\right) \right] ^{\top } \end{aligned}$$

satisfy, \(j=1,\ldots ,m:\)

$$\begin{aligned}&\left( \omega (t,x)\frac{\partial f}{\partial u_{j}}+\sum _{i=1}^{n}\frac{ \partial b_{i}}{\partial u_{j}}\frac{\partial \phi }{\partial x_{i}} +\sum _{k=1}^{p}\lambda _{k}\frac{\partial g_{k}}{\partial u_{j}}\right) \mu \left( t,x\right) \nonumber \\&\quad +\sum _{k=1}^{m}\eta _{k}\left( t,x\right) \left( \frac{ \partial ^{2}f}{\partial u_{j}\partial u_{k}}+\sum _{i=1}^{n}\frac{\partial ^{2}b_{i}}{\partial u_{j}\partial u_{k}}\frac{\partial V}{\partial x_{i}} \right) =0. \end{aligned}$$
(24)

Remark 7

The equilibrium under commitment is composed by the competitive equilibrium equations described in Definition 1 plus the necessary conditions of the leader (19)–(24).

Remark 8

Notice that the problem in the case with \(m=1,\) \(\omega \left( \cdot \right) =1,\ f\) strictly concave and \(\frac{\partial ^{2}b_{i}}{\partial u_{j}\partial u_{k}}=0\) for \(j=1,\ldots ,m,\) \(k=1,\ldots ,p,\ \)if the solution is such that \(\lambda _{k}\left( \cdot \right) =0,\) \(k=1,\ldots ,p,\) then the other Lagrange multipliers are zero: \(\theta \left( \cdot \right) =\eta \left( \cdot \right) =0\) and the social value function coincides with the individual one, \(\phi (t,x)=V(t,x).\) The optimal aggregate policy \(Y\left( t\right) \) is such that

$$\begin{aligned} \int \sum _{i=1}^{n}\mu (t,x)\frac{\partial b_{i}}{\partial Y_{r}}\frac{ \partial \phi }{\partial x_{i}}dx=0,\text { }r=1,\ldots ,q. \end{aligned}$$

4.3 Discretion

Next we consider the case without commitment or feedback Stackelberg equilibrium of the game. We first define a finite-horizon commitment problem, in the same lines as Definition 2.

Definition 3

(Commitment - finite horizon) Given an initial density \(\mu (t,x),\) the problem of the leader under commitment in an interval \([t,t+\Delta ]\) with a terminal value functional \( W\left( \cdot \right) ,\) is to choose the complete path of policies \( \left\{ Y^{\Delta }\left( s\right) \right\} _{s\in [t,t+\Delta ]}\) at time t in order to maximize the aggregate welfare (17) when the aggregate distribution \(\mu (s,x),\) aggregate variables \(Z\left( s\right) \) and individual value function \(V(s,x)\ \)and controls u(sx) constitute a competitive equilibrium given \(\left\{ Y^{\Delta }\left( s\right) \right\} _{s\in [t,t+\Delta ]}\). Formally, this amounts to

$$\begin{aligned} \max _{\left\{ Y^{\Delta }\left( s\right) \right\} _{s\in [t,t+\Delta ]}}\int _{t}^{t+\Delta }e^{-\rho \left( s-t\right) }\left[ \int \omega (s,x)f(x,u)\mu (s,x)dx\right] ds+e^{-\rho \Delta }W\left( \mu \left( t+\Delta ,\cdot \right) \right) \end{aligned}$$
(25)

subject to law of motion of the distribution (6, 7), to the market clearing conditions (8) and to the individual HJB equation (4).The terminal indvidual value function \( v\left( t+\Delta ,\cdot \right) \) is also taken as given.

Given \(T>0,\) we assume that the interval [0, T] is divided in N intervals of length \(\Delta :=T/N.\)

Definition 4

(Discretion) An equilibrium under discretion in a finite interval [0, T] with a terminal value functional \(W^{T}\left( \cdot \right) \) is defined as the limit as \(N\rightarrow \infty ,\) or equivalently \(\Delta \rightarrow 0,\) of a sequence of functions\(\ Y^{\Delta }\left( t\right) \) given by the finite-horizon commitment problem introduced in Definition 3 over the intervals \([t,t+\Delta ]\) where \(t=n\Delta ,\) \(n=0,\ldots ,N-1\) and the terminal value of an interval n is defined as the value functional of the next interval:

$$\begin{aligned}&W^{n}\left( \mu \left( n\Delta ,\cdot \right) \right) \nonumber \\&\quad =\max _{\left\{ Y^{\Delta }\left( s\right) \right\} _{s\in [n\Delta ,(n+1)\Delta ]}}\int _{n\Delta }^{\left( n+1\right) \Delta }e^{-\rho \left( s-t\right) } \left[ \int \omega (s,x)f(x,u)\mu (s,x)dx\right] ds \quad \quad \quad \end{aligned}$$
(26)
$$\begin{aligned}&\qquad +\,e^{-\rho \Delta }W^{n+1}\left( \mu \left( (n+1)\Delta ,\cdot \right) \right) , \end{aligned}$$
(27)

with \(W^{N}\left( \cdot \right) =W^{T}\left( \cdot \right) .\) The infinite-horizon case is defined as the limit as \(T\rightarrow \infty \) with a transversality condition

$$\begin{aligned} \lim _{T\rightarrow \infty }e^{-\rho T}W^{T}\left( \cdot \right) =0. \end{aligned}$$

The solution is given by the following proposition.

Proposition 3

(Necessary conditions—Discretion) If a solution to problem under discretion exists, it should satisfy the system of equations

$$\begin{aligned} \int \left\{ \sum _{j=1}^{m}\sum _{i=1}^{n}\eta _{j}(t,x)\frac{\partial ^{2}b_{i}}{\partial Y_{r}\partial u_{j}}\frac{\partial V}{\partial x_{i}} +\sum _{i=1}^{n}\frac{\partial \phi }{\partial x_{i}}\frac{\partial b_{i}}{ \partial Y_{r}}\mu (t,x)\right\} dx=0, \end{aligned}$$
(28)

\(r=1,\ldots ,q,\) where \(\phi (t,x)\) is the marginal social value function, given by

$$\begin{aligned}&\displaystyle \rho \phi (t,x) =\frac{\partial \phi }{\partial t}+\omega (t,x)f(x,u)+\sum _{k=1}^{p}\lambda _{k}(t)\left( g_{k}(x,u)-Z_{k}\left( t\right) \right) +\mathcal {A}_{u,Z,Y}\phi , \quad \quad \quad \! \end{aligned}$$
(29)
$$\begin{aligned}&\displaystyle \lim _{T\rightarrow \infty }e^{-\rho T}\phi (T,x) =0, \end{aligned}$$
(30)

the Lagrange multipliers associated to the market clearing condition (8), \(\lambda _{k}(t),\) \(k=1,\ldots ,p,\) satisfy

$$\begin{aligned} \lambda _{k}(t)=\int \left\{ \sum _{j=1}^{m}\sum _{i=1}^{n}\eta _{j}(t,x)\frac{ \partial ^{2}b_{i}}{\partial Z_{k}\partial u_{j}}\frac{\partial V}{\partial x_{i}}+\sum _{i=1}^{n}\frac{\partial \phi }{\partial x_{i}}\frac{\partial b_{i}}{\partial Z_{k}}\mu (t,x)\right\} dx, \end{aligned}$$
(31)

and the Lagrange multipliers associated to the individual first-order conditions

$$\begin{aligned} \eta \left( t,x\right) :=\left[ \eta _{1}\left( t,x\right) ,\ldots ,\eta _{k}\left( t,x\right) ,\ldots ,\eta _{m}\left( t,x\right) \right] ^{\top } \end{aligned}$$

satisfy, \(j=1,\ldots ,m:\)

$$\begin{aligned}&\left( \omega (t,x)\frac{\partial f}{\partial u_{j}}+\sum _{i=1}^{n}\frac{ \partial b_{i}}{\partial u_{j}}\frac{\partial \phi }{\partial x_{i}} +\sum _{k=1}^{p}\lambda _{k}\frac{\partial g_{k}}{\partial u_{j}}\right) \mu \left( t,x\right) \nonumber \\&\quad \quad +\sum _{k=1}^{m}\eta _{k}\left( t,x\right) \left( \frac{ \partial ^{2}f}{\partial u_{j}\partial u_{k}}+\sum _{i=1}^{n}\frac{\partial ^{2}b_{i}}{\partial u_{j}\partial u_{k}}\frac{\partial V}{\partial x_{i}} \right) =0. \end{aligned}$$
(32)

Remark 9

The equilibrium under discretion is composed by the competitive equilibrium equations described in Definition 1 plus the necessary conditions of the leader (28)–(32).

Remark 10

Equations (28)–(32) coincide with the equivalent equations in the case of commitment with the Lagrange multipliers \(\theta \left( \cdot \right) =0.\) Lagrange multipliers \(\theta \) can be interpreted as the value to the leader of breaking the “promises” that the leader is making to individual agents. Under discretion, no promises can be made and thus these multipliers are zero.

5 Conclusions

This paper has analyzed the design of optimal social policies in an economy composed by a continuum of atomistic players subject to idiosyncratic shocks. The optimality of the policies is defined according to a social welfare function that aggregates, given some state-dependent Pareto weights, the individual utilities across agents. First, we consider two alternative benchmarks without social policies. On the one hand, the decentralized competitive equilibrium is defined as mean field game with aggregate variables and state constraints. On the other hand, the social optimum is a mean field control problem in which a planner chooses the individual policies in order to maximize aggregate welfare. Next we assume that a (non-atomistic) leader controls a vector of aggregate policies. This is a mean field game with a large player. We analyze two different equilibrium concepts. In the open-loop Stackelberg solution of the game the large player is able to make a credible commitment about the future path of the aggregate policy variables. In the feedback Stackelberg solution no such a commitment is possible and the policies are time-consistent. We characterize the necessary conditions, but we do not analyze important issues such as the existence or uniqueness of the solutions, which we leave for future research.

The main analytical tool employed in this paper is the Lagrange multiplier method in infinite-dimensional Hilbert spaces. An interesting question would be to analyze to what extent these results can also be obtained by means of the Pontryagin principle.

Finally, neither have we discussed the numerical implementation of the solution in the cases in which no analytical results are available. Nuño and Moll [42] and Nuño and Thomas [43] provide some insights on this respect extending previous work by [1, 2] and [3]. Due to the relevance of the potential applications, we are sure that this will be a fruitful field of research in the coming years.