1 Introduction

Oligopoly models of markets with a small number of competitive players go back to the classical works of Cournot [7] and Bertrand [3] in the 1800s. These have typically been static (or one-period) models, where the existence and construction of a Nash equilibrium have been extensively studied. We refer to Vives [21] for a survey. In the context of nonzero-sum dynamic games between \(N\) players, each with their own resources, the computation of a solution is a challenging problem, typically involving coupled systems of \(N\) nonlinear partial differential equations (PDEs), with one value function per player. This is further complicated when the players’ resources are exhaustible and the market structure changes over time as players deplete their capacities and drop out of competition. See, for instance, [10] in a Cournot framework, and [16] in a Bertrand model.

On the other hand, mean field games (MFGs) proposed by Lasry and Lions [15] and independently by Huang et al. [12, 13] allow one to handle certain types of competition in the continuum limit of an infinity of small players by solving a coupled system of two PDEs. The interaction here is such that each player only sees and reacts to the statistical distribution of the states of other players. Optimization against the distribution of other players leads to a backward (in time) Hamilton–Jacobi–Bellman (HJB) equation; and in turn their actions determine the evolution of the state distribution, encoded by a forward Kolmogorov equation. We refer to the survey article [9] and the recent monograph [1] for further background.

Our goal here is to understand the relationship between oligopoly games in the traditional Nash equilibrium sense and their appropriately-defined mean field counterpart, especially the approximation of one by the other. We look at oligopoly models for markets with differentiated but substitutable goods, and in continuous time with potentially random fluctuations in demands. The firms have different production capacities representing their different sizes, and the fraction of firms remaining decreases over time as smaller firms exhaust their capacities and disappear from the market.

In Cournot competition where firms choose quantities of production, an example might be oil, coal and natural gas in the energy market, while in a Bertrand model, where firms set prices, an example might be competition between food producers where consumers have preference for one type of food, but reduce their demand for it depending on the average price of substitutes. We shall see that, in the continuum mean field versions of these games, where there is an infinite number of firms, the Cournot and Bertrand models are equivalent, in the sense that they result in the same equilibrium prices and quantities. However, for concreteness, we will focus our exposition on Bertrand competition, and, throughout, we work with linear demand systems.

In dynamic oligopoly problems with a finite number of players, the HJB system of PDEs does not admit an explicit solution, except possibly in the monopoly case, and one needs numerical means for computing the value functions as well as the equilibrium strategies, which of course quickly becomes infeasible as the number of players goes beyond three. Moreover, even in the two-player case, these equations are hard to handle when the competition is strong. To overcome this problem, we study the market dynamics when the number of firms tends to infinity and the resulting interactions are modeled as a MFG.

Related works Guéant et al. [8, 9] have considered a mean field version of a Cournot game with a quadratic cost function. Lucas and Moll [19] study knowledge growth in an economy with many agents of different productivity levels. In similar spirit, Lachapelle and Wolfram [14] apply the mean field approach to model congestion and aversion in pedestrian crowds. Here the forward/backward structure comes from that a “smart” pedestrian anticipates the future behavior of the population and reacts accordingly; while their collective behavior determines the evolution of the crowds. Carmona and Delarue [4] provide a probabilistic analysis of a class of stochastic differential games for which interaction between players is of mean field type and show that solutions of the MFG do indeed provide approximate Nash equilibria for games with a large number of players. In a subsequent paper, Carmona et al. [5] discuss the similarities and the difference between the MFG approach and control of McKean–Vlasov dynamics via analysis of forward-backward stochastic differential equations. A MFG model for analyzing systemic risk is presented in [6]. For a comprehensive study of the uniqueness and existence of equilibrium strategies of a general class of MFGs in the linear-quadratic framework, we refer to Bensoussan et al. [2].

Organization and Results

  • In Sect. 2, we present the model for Bertrand competition with differentiated goods and discuss the finite player and continuum limit MFG for the one-period problem. We see that the MFG equilibrium is formally the limit of finite player Nash equilibrium.

  • In Sect. 3, we introduce the dynamic Bertrand MFG problem with exhaustible capacities and set up the resulting forward/backward PDE system. We give explicit calculations for the monopoly problem.

  • In Sect. 4, we obtain an asymptotic expansion in powers of a parameter that represents the extent of competition between the firms in a deterministic game. This captures the principle effects and quantifies the effect of product substitutability.

  • In Sect. 5, we present the numerical solution of the forward/backward system of PDEs that allows us to characterize the price strategies and resulting demands of firms in the stochastic game.

  • This allows us to compare and contrast the pricing strategies in the MFG approximation to the \(N\)-player game in Sect. 6. Here we use the Dirac delta functions to mimic the finite player case, and by considering the tail distribution function instead of the density itself, numerical solutions become very tractable, especially in the deterministic setting.

We conclude in Sect. 7.

2 Linear Demand, Continuum Limit and Static MFG

To motivate the form of demand functions we are going to use in the continuum MFG, we first study a finite market with \(N\) firms who produce substitutable goods which compete for market share in a one-period game. Associated to each firm \(i \in \{ 1, \dots , N \}\) are variables \(p_i\in \mathbb {R}, q_i \in \mathbb {R}_+\) representing the price and quantity at which firm \(i\) offers its good for sale to the market. We denote by \(p\) the vector of prices whose \(i\)th element is \(p_i\), similarly the \(i\)th element of the vector \(q\) is \(q_i\). In the Cournot model, players choose quantities as a strategic variable in non-cooperative competition with the other firms, and the market determines the price of each good. In a Bertrand competition, which we will use as our main focus, firms set prices, and the market determines its demand for each type of good.

2.1 Linear Demand System

The market model is specified by linear inverse demand functions, which give prices as a function of quantity produced, and are the basis of Cournot competition. Our firms are suppliers, and so quantities are nonnegative. For \(q\in \mathbb {R}^N_+\), the price received by player \(i\) is \(p_i=P_i(q)\) where

$$\begin{aligned} P_i(q) = 1 - \left( q_i + \epsilon \bar{q}_i \right) , \quad \text{ where }\quad \bar{q}_i = \frac{1}{N-1} \sum _{j \ne i} q_j, \,\,i=1,\cdots ,N,\nonumber \\ \quad \text{ and }\quad 0\le \epsilon <N-1. \end{aligned}$$
(1)

The inverse demand functions are decreasing in all of the quantities. In the linear model (1), some of the prices \(p_i=P_i(q)\) may be negative, meaning player \(i\) produces so much that he has to pay to have his goods taken away, but we will see negative prices do not arise in competitive equilibrium.

The parameter \(\epsilon \) measures the degree of interaction or product substitutability, in the sense that the price received by an individual firm decreases as the other firms increase production of their goods. In particular, the case \(\epsilon = 0\) corresponds to independent goods. In this paper, we will consider the two cases of fixed and finite \(N\) as well as the continuum limit where \(N=\infty \), and study how varying the interaction parameter \(\epsilon \) affects the competitive equilibrium.

The dependence of the price player \(i\) receives depends on the quantities produced by his competitors through their mean \(\bar{q}_i\). That is, the interaction is of mean field type. In particular, the inverse demand (1) takes the form \(\mathbf {1}-\mathbf {p}=A \mathbf {q}\), where \(A\) can be written as a rank-one update to the identity matrix

$$\begin{aligned} A = \left( 1-\frac{\epsilon }{N-1}\right) I+\frac{\epsilon }{N-1}\mathbf {1}\mathbf {1}^T,\quad \text{ where }\quad \mathbf {1}=(1, \cdots , 1)^T. \end{aligned}$$

As a consequence, the demand function \(\mathbf {q}=A^{-1}(1-\mathbf {p})\) can be computed explicitly using the Sherman–Morrison formula [20]. However, the demands must be nonnegative and so the inversion process is as follows. First order the price vector \(p\in \mathbb {R}^N\) such that \(p_1\le \cdots \le p_N\), so that resulting demands will be decreasing in the player number. We need to find the largest \(n\le N\) such that player \(n\) receives nonnegative demand, while the players above him setting higher prices will have their demands set to zero.

More specifically, for given \(n\) we invert the first \(n\) equations in (1) to give

$$\begin{aligned} D_i^{(n)}(p) = a_n - b_n p_i + c_n \bar{p}^n_i, \qquad \bar{p}^n_i = \frac{1}{n-1} \sum _{ j\ne i}^n p_j, \end{aligned}$$
(2)

where the positive coefficients \((a_n,b_n,c_n)\) are given by

$$\begin{aligned}&a_n = \frac{1}{ \left( 1 + \epsilon \frac{n-1}{N-1} \right) }, \quad b_n = \frac{1 + \epsilon \frac{n-2}{N-1}}{ \left( 1 + \epsilon \frac{n-1}{N-1} \right) \left( 1 - \frac{\epsilon }{N-1} \right) },\nonumber \\&c_n = \frac{\epsilon \frac{n-1}{N-1}}{ \left( 1 + \epsilon \frac{n-1}{N-1} \right) \left( 1 - \frac{\epsilon }{N-1} \right) }. \end{aligned}$$
(3)

Note that our assumption \(\epsilon <N-1\) in (1) implies the system is invertible and that \(b_n>c_n>0\), and we also observe that \(a_n+c_n = b_n\).

Then we find the largest \(n\) such that \(D_n^{(n)}(p)\ge 0\), and the actual demands are given by

$$\begin{aligned} q_i=D_i(p) = \left\{ \begin{array}{ll} a_n - b_n p_i + c_n \bar{p}^n_i, &{} i=1,2,\cdots ,n\\ 0 &{} i=n+1,\cdots ,N.\end{array}\right. \end{aligned}$$
(4)

These demand functions are the basis of Bertrand competition. The demand for player \(i\)’s good, \(q_i=D_i(p)\), is decreasing in his own price and increasing in the prices of his competitors, again through their mean \(\bar{p}^n_i\).

Remark 1

Such a linear demand system can be derived from a quadratic utility function of the form

$$\begin{aligned} U(q) = \sum _{i=1}^N q_i - \frac{1}{2} \left( \sum _{i=1}^N q_i^2 + \frac{\epsilon }{N-1} \sum _{ j\ne i} q_i q_j \right) , \end{aligned}$$

and solving the utility maximization problem \(\max _{q\in \mathbb {R}_+^N}U(q)-q\cdot p\) for a representative consumer; the first-order condition gives Eq. (1). We refer to Vives [21, Chapt. 6] for more details.

Continuum Analog In the continuum limit \(N \rightarrow \infty ,\) the continuous variable corresponding to \(n/N\) in the finite player game is denoted by \(\eta \in [0,1]\), which is the proportion of players who receive positive demand. The demand received by a representative producer decreases with his own price \(p\) and increases with the average price \(\bar{p}\) charged by the other producers. We define the demand function, by analogy with (2) and (3), to be

$$\begin{aligned} D^{(\eta )}(p,\bar{p}) = a(\eta ) - b(\eta ) p + c(\eta ) \bar{p},\quad \eta >0, \end{aligned}$$
(5)

where the continuum limits of (3) are

$$\begin{aligned} a(\eta ) = \frac{1}{ \left( 1 + \epsilon \eta \right) }, \qquad b(\eta ) = 1, \qquad c(\eta ) = \frac{\epsilon \eta }{ \left( 1 + \epsilon \eta \right) }, \end{aligned}$$
(6)

and the average price \(\bar{p}\) will be defined for the static game in the next section, and for the dynamic game in Sect. 3. We note also that \(c(\eta )<b(\eta )=1\), and \(a(\eta )+c(\eta )=b(\eta )=1\).

Remark 2

In the traditional Cournot literature (see, for example, [21]), the inverse demand functions, \(P_i\) in (1), are written as depending on the other players’ total quantity instead of the average \(\bar{q}_i\), which amounts to taking \(\epsilon =N-1\). In this case, the goods are termed homogeneous in the sense that the prices are the same for each players’ goods and the one price is \(P_i(q)\equiv P(q) = 1-\sum ^Nq_j\). This is the case considered in the static and dynamic games in [10]. For a Bertrand game, when \(\epsilon =N-1\), the system (1) is not invertible, and this corresponds to the classical Bertrand “winner takes all” model in which all demand goes to the player offering the lowest price. This type of competition typically results in a Nash equilibrium in which players set prices equal to cost and so make zero profit. This “tough” competitive effect is not usually seen in markets, and a differentiated (or substitutable) goods Bertrand model is more reasonable. This is the basis of the static and dynamic games in [16]. For a discussion and comparison between the four static games (Cournot and Bertrand with homogeneous or differentiated goods), we refer to [18].

Remark 3

In this section, we are going to associate each player with a constant marginal cost of production, even though there is no explicit production cost in the dynamic MFG. But as we will see in Sect. 3, the exhaustibility of production capacity induces a shadow cost that will play the role of marginal cost in this section.

2.2 Static Bertrand Games

Here we consider the static Bertrand game of \(N\) players and the continuum MFG version of it, and show that the limit of the former’s Nash equilibrium price vector as \(N\rightarrow \infty \) gives the solution of the latter.

2.2.1 \(N\)-Player Games

There are \(N\) players who have constant marginal costs of production \(0\le s_1\le \cdots \le s_N\), which are “small enough” (made precise in (11) below) such that all the players are active, in the sense of receiving positive demand in the Nash equilibrium computed below. In other words, when using the demand functions (4), we only have to consider \(n=N\). (The case where some costs are higher and so some firms are “blockaded” from competition and receive zero demand in equilibrium is considered in detail in [18]).

The optimization problem faced by each firm \(i\) is

$$\begin{aligned} \max _{p_i} \left( a_N - b_N p_i + c_N \bar{p}_i \right) (p_i - s_i),\qquad \bar{p}_i = \frac{1}{N-1} \sum _{j\ne i} p_j. \end{aligned}$$
(7)

The first order condition for each player gives

$$\begin{aligned} p_i^* = \frac{1}{2 b_N} \left( a_N + b_N s_i + c_N \bar{p}_i \right) , \quad i=1,\cdots ,N. \end{aligned}$$
(8)

This is the best response of player \(i\) if the other players play prices with average \(\bar{p}_i\). We say \((p_1^*, \cdots , p_N^*)\) is a Nash equilibrium when the best response equations (8) intersect, that is

$$\begin{aligned} \bar{p}_i= \frac{1}{N-1} \sum _{j\ne i} p_j^* \qquad \text{ for } \text{ all } i=1,\cdots , N. \end{aligned}$$

Throughout, we will not attach a \(*\) to \(\bar{p}\).

The system of equations (8) is scalarized by averaging over the players. Summing over \(i\) and dividing by \(N\), we find that the average price \(\bar{p}= \frac{1}{N} \sum _{i=1}^N p^*_i\) is given by

$$\begin{aligned} \bar{p} = \frac{1}{2 b_N - c_N} \left( a_N + b_N \bar{s}^{(N)} \right) , \qquad \text{ where } \quad \bar{s}^{(N)} = \frac{1}{N} \sum _{i=1}^N s_i. \end{aligned}$$
(9)

Note that \(\bar{p}\) is well-defined as \(b_N>c_N\). In particular it depends on the costs only through their average \(\bar{s}^{(N)}\).

The individual Nash equilibrium prices \(p_i^*\) are given by (8), where \(\bar{p}_i\), the average without player \(i\), can be written in terms of the full average \(\bar{p}\) as

$$\begin{aligned} \bar{p}_i = \frac{N}{N-1}\bar{p} - \frac{1}{N-1}p_i^*, \end{aligned}$$

the difference \(|\bar{p}_i - \bar{p}|\) being small as \(N\rightarrow \infty \). Substituting back in to (8), we obtain

$$\begin{aligned} p_i^* = \frac{1}{2b_N + \frac{c_N}{N-1}} \left( b_N s_i + a_N + \frac{Nc_N}{N-1}\,\bar{p} \right) . \end{aligned}$$
(10)

The resulting demands or quantities sold are given by \(q_i^* =\left( a_N - b_N p_i^* + c_N \bar{p}_i\right) \). A sufficient and necessary condition that all players receive positive demand, that is \(q_i^*>0\), is that the highest cost \(s_N\) is small enough. In [18, Theorem 4.1], this is shown to be equivalent to

$$\begin{aligned} s_N < s_N^{\max }:=\frac{\theta _N+\epsilon \bar{s}^{(N-1)}}{\theta _N + \epsilon }, \quad \text{ where } \quad \theta _N = \left( 1-\frac{\epsilon }{N-1}\right) \left( \frac{2+\left( \frac{2N-3}{N-1}\right) \epsilon }{1+\left( \frac{N-2}{N-1}\right) \epsilon }\right) ,\nonumber \\ \end{aligned}$$
(11)

which restricts how far the highest cost \(s_N\) can be from the average \(\bar{s}^{(N-1)}= \frac{1}{N-1}\sum _{j=1}^{N-1} s_j\) of the lower cost players. See [18] for further details, as well as the Nash equilibrium in other cases where (11) does not hold.

If we assume that as more players are added the limit \(\bar{s}=\lim _{N\rightarrow \infty }\bar{s}^{(N-1)}\) is finite, then we have

$$\begin{aligned} s_N^{\max }\rightarrow \frac{2+\epsilon \bar{s}}{2+\epsilon } \quad \text{ as } N\rightarrow \infty . \end{aligned}$$
(12)

We shall see shortly that this limit coincides with the maximum marginal cost in the continuum MFG.

Moreover, using the limits of \(a_N, b_N, c_N\) as \(N\rightarrow \infty \) given in Eq. (6), with \(\eta =1\) in the case that all firms are active in equilibrium, we have

$$\begin{aligned} \bar{p}\rightarrow \frac{1}{2+\epsilon } + \frac{1+\epsilon }{2+\epsilon }\bar{s}, \end{aligned}$$

and so

$$\begin{aligned} p_i^* \rightarrow \frac{1}{2} \left( s_i + \frac{2}{2+\epsilon } + \frac{\epsilon }{2+\epsilon } \bar{s} \right) , \quad \text{ and } \quad q_i^*\rightarrow \frac{1}{2} \left( \frac{2}{2+\epsilon } + \frac{\epsilon }{2+\epsilon }\bar{s} - s_i \right) .\nonumber \\ \end{aligned}$$
(13)

We shall again recover the same result from solving the continuum MFG.

2.2.2 Continuum MFG

In the static continuum MFG, there is an infinite number of players labeled by \(x>0\), with associated density \(M(x)\) and marginal cost of production \(s(x)\). (In the static model, the label \(x\) is really not necessary: one could label the players by their costs \(s\) and put a density \(M(s)\). However, in the dynamic game of Sect. 3, \(x\) will denote the remaining capacities of the players, so we retain it here). As in the finite-player example above, we suppose that the marginal costs \(s(x)\) are “small enough” (made precise in (19) below) for all \(x>0\) such that all the players are active, in the sense of receiving positive demand in the MFG solution we now compute. In other words, we take \(\eta = 1\) in the MFG demand function (5)–(6).

A player at location \(x\) optimizes his profit as though he is unable to affect the mean price \(\bar{p}\):

$$\begin{aligned} \max _p \left( a(1) - p + c(1) \bar{p} \right) (p - s(x)), \end{aligned}$$
(14)

where we have used the continuum demand function defined in (5) and (6). Given \(\bar{p}\), the first order condition gives

$$\begin{aligned} p^*(x) = \frac{1}{2} \left( s(x) + a(1) + c(1) \bar{p} \right) . \end{aligned}$$
(15)

The mean price \(\bar{p}\) is

$$\begin{aligned} \bar{p} = \int _0^\infty p^*(x) M(x) \ dx, \end{aligned}$$

and now the continuum system (15) is scalarized by multiplying by \(M\) and integrating over \(x\), which leads to

$$\begin{aligned} \bar{p} = \frac{1}{2 - c(1)} \left( \bar{s} + a(1) \right) , \qquad \text{ where } \quad \bar{s}= \int _0^\infty s(x) M(x) \ dx. \end{aligned}$$
(16)

Note that \(\bar{p}\) is well-defined as \(c<1\). Substituting back into (15), we find the optimal price \(p^*(x)\):

$$\begin{aligned} p^*(x) = \frac{1}{2} \left( s(x) + \frac{2}{2+\epsilon } + \frac{\epsilon }{2+\epsilon } \bar{s} \right) , \end{aligned}$$
(17)

which is the continuum analog of the limit of \(p_i^*\) in (13). The demands are given by

$$\begin{aligned} q^*(x) = D^{(1)}(p^*(x), \bar{p})&= a(1) - p^*(x) + c(1) \bar{p} \nonumber \\&= \frac{1}{2} \left( \frac{2}{2+\epsilon } + \frac{\epsilon }{2+\epsilon }\bar{s} - s(x) \right) , \end{aligned}$$
(18)

which is the continuum analog of the limit of \(q_i^*\) in (13). The \(q^*(x)\) in (18) are positive for all \(x>0\) if and only if

$$\begin{aligned} s(x)<\frac{2+\epsilon \bar{s}}{2+\epsilon }, \quad \forall x>0, \end{aligned}$$
(19)

which is the continuum analog of (11) and identical to the \(N\rightarrow \infty \) limit (12). Note also that it turns out the profit function is simply the square of the quantity:

$$\begin{aligned} \Pi (x) = q^*(x)\left( p^*(x)-s(x)\right) = \left( q^*(x)\right) ^2. \end{aligned}$$

Eventually we would like to use the MFG machinery to approximate finite player games, and one way to do this is by taking the density \(M\) to be a series of delta functions centered at the points \(\{x_i\mid s(x_i)=s_i\}\): \(M = \frac{1}{N}\sum _{i=1}^N \delta _{x_i}\). Then, as in the discrete case, we have \(\bar{p}=\frac{1}{N}\sum ^Np^*(x_i)\) and \(\bar{s}=\frac{1}{N}\sum ^Ns(x_i)\). The optimal price set by the player at \(x_i\) is

$$\begin{aligned} p^*(x_i) = \frac{1}{2} \left( a(1) + s_i + c(1) \bar{p} \right) , \qquad s_i = s(x_i), \end{aligned}$$

where \(\bar{p}\) is given in (16). Comparing this with the discrete case in Eqs. (10) and (9), we see that the only differences are \((a(1),b(1),c(1)) \approx (a_N,b_N,c_N)\) and \(\frac{N}{N-1}\approx 1\), which quantifies the \(\mathcal {O}(N^{-1})\) approximation of the finite player static game by the continuum MFG.

2.3 Cournot–Bertrand Equivalence as \(N\rightarrow \infty \) and in the Continuum

Next, we contrast the difference between the static \(N\)-player Cournot and Bertrand competitions, and how the difference vanishes in the continuum limit. We focus on interior equilibrium in which all firms participate.

2.3.1 Comparison of Cournot and Bertrand \(N\)-Player Games

For the \(N\)-player games, let \(q\) and \(p\) be the vector of quantities and prices respectively. We denote by \(\mathbf {P}\) the \(N\times N\) matrix with \(1\)’s on the diagonal and \(\epsilon /(N-1)\) everywhere else, so that the inverse demand system (1) for the Cournot problem can be written

$$\begin{aligned} p= \mathbf {1}- \mathbf {P}q, \quad \text{ where } \quad \mathbf {1}=(1, \cdots , 1)^T. \end{aligned}$$

From this, we have \(q=\mathbf {P}^{-1}(\mathbf {1}-p)\), which gives the demand system (4) (with \(n=N\)) for the Bertrand problem:

$$\begin{aligned} q=a_N\mathbf {1}- \mathbf {Q}p, \quad \text{ where } \quad \mathbf {Q}=\mathbf {P}^{-1}. \end{aligned}$$

We note that \(\mathbf {Q}\) is the matrix with \(b_N\) on the diagonal and \(-c_N/(N-1)\) everywhere else, and \(a_N\mathbf {1}=\mathbf {P}^{-1}\mathbf {1}\) (which is just the observation \(a_N+c_N=b_N\)).

Cournot competition Here firms choose quantities, and so player \(i\) solves

$$\begin{aligned} \max _{q_i}q_i(1-(\mathbf {P}q)_i-s_i), \end{aligned}$$

which leads to the Nash equilibrium intersection of the first-order conditions \((I+\mathbf {P})q^*=\mathbf {1}-s\), where \(s\) is the vector of costs. Therefore, the Cournot equilibrium quantities are given by \(q^*=(I+\mathbf {P})^{-1}(\mathbf {1}-s)\), and the corresponding prices \(p^*_c=\mathbf {1}-\mathbf {P}q^*\) are given by

$$\begin{aligned} p^*_c = (I+\mathbf {P})^{-1}\mathbf {1}+ \mathbf {P}(I+\mathbf {P})^{-1}s. \end{aligned}$$
(20)

Note that the average Cournot quantity \(\bar{q}\) and price \(\bar{p}_c\) satisfy \((1+\epsilon )\bar{q}=(1-\bar{p}_c)\), which follows from \(\mathbf {1}^T\mathbf {P}=(1+\epsilon )\mathbf {1}^T\); and it is straightforward to compute

$$\begin{aligned} \bar{q} = \frac{1-\bar{s}^{(N)}}{2+\epsilon }, \qquad \bar{p}_c = \frac{1}{2+\epsilon } + \frac{1+\epsilon }{2+\epsilon }\bar{s}^{(N)}, \end{aligned}$$
(21)

where \(\bar{s}^{(N)}\) is the average of the costs. One can also compute the profit of each player:

$$\begin{aligned} \Pi _i = q_i^*(p^*_{c,i}-s_i) = \left( q^*_i\right) ^2. \end{aligned}$$

Bertrand competition Here, as in (7), firm \(i\) solves \(\max _{p_i}(p_i-s_i)(a_N-(\mathbf {Q}p)_i)\), which leads to the first order conditions, intersected to find the Nash equilibrium \(p^*\) that solves the linear system:

$$\begin{aligned} (\mathbf {Q}+b_NI)p^*=a_N\mathbf {1}+ b_Ns. \end{aligned}$$

Multiplying by \(\mathbf {P}\) and using that \(a_N\mathbf {1}=\mathbf {P}^{-1}\mathbf {1}\), we have \((I+b_N\mathbf {P})p^* = \mathbf {1}+ b_N\mathbf {P}s\), which gives

$$\begin{aligned} p^* = (I+b_N\mathbf {P})^{-1}\mathbf {1}+ b_N\mathbf {P}(I+b_N\mathbf {P})^{-1}s, \end{aligned}$$

where we have used an obvious commutation between \(\mathbf {P}\) and \((I+b_N\mathbf {P})^{-1}\) (both being rank one updates of a diagonal matrix). This coincides with the prices (20) from the Cournot competition only if \(b_N=1\), which is true only when the number of players goes to infinity. Indeed, since \(b_N=1 + \mathcal {O}(N^{-1})\), the difference between the Cournot and Bertrand solutions is \(\mathcal {O}(N^{-1})\). The Bertrand equilibrium demands are \(q^*_b=a_N\mathbf {1}-\mathbf {Q}p^*\) and we can compute that the profit is given by:

$$\begin{aligned} \Pi _i = q^*_{b,i}(p^*_i-s_i)=\frac{1}{b_N}\left( q^*_{b,i}\right) ^2. \end{aligned}$$

Furthermore, we also have that the average Bertrand demand \(\bar{q}_b\) is given in terms of the average price \(\bar{p}\) by \((1+\epsilon )\bar{q}_b=(1-\bar{p})\), which follows from \(\mathbf {1}^T\mathbf {Q}=(b_N-c_N)\mathbf {1}^T\) and \(b_N-c_N=a_N=\frac{1}{1+\epsilon }\). From the formula (9), we have

$$\begin{aligned}&\bar{p}=\frac{1-\frac{\epsilon }{N-1}}{2+\epsilon -\frac{2\epsilon }{N-1}} + \frac{1+\epsilon \left( \frac{N-2}{N-1}\right) }{2+\epsilon \left( \frac{N-3}{N-1}\right) }\,\bar{s}^{(N)}, \\&\bar{q}_b=\frac{1}{1+\epsilon }\left( \frac{1+\epsilon -\frac{\epsilon }{N-1}}{2+\epsilon -\frac{2\epsilon }{N-1}} - \frac{1+\epsilon \left( \frac{N-2}{N-1}\right) }{2+\epsilon \left( \frac{N-3}{N-1}\right) }\,\bar{s}^{(N)}\right) , \end{aligned}$$

and so the average Bertrand price and quantity do not equal their Cournot counterparts given in (21), but \(|\bar{p}-\bar{p}_c|, |\bar{q}_b-\bar{q}|\rightarrow 0\) as \(N\rightarrow \infty \) at rate \(N^{-1}\).

2.3.2 Cournot Continuum MFG

This observation anticipates that the Bertrand and Cournot continuum MFGs lead to the same equilibrium prices and quantities. To see this, consider the continuum Cournot game where, as in Sect. 2.2.2, there is an infinite number of players labeled by \(x>0\), with associated density \(M(x)\) and marginal cost of production \(s(x)\). The optimization problem faced by a player at position \(x>0\) is

$$\begin{aligned} \max _q q \left( 1 - q - \epsilon \bar{q} - s(x) \right) , \qquad \bar{q}=\int qM, \end{aligned}$$

where the continuum inverse demand function \(P(q,\bar{q})=1 - q - \epsilon \bar{q}\) is the analog of (1).

The first order condition gives

$$\begin{aligned} q^*(x) = \frac{1}{2} \left( 1 - s(x) - \epsilon \bar{q} \right) , \end{aligned}$$

and integrating with respect to \(M\) leads to

$$\begin{aligned} \bar{q} = \frac{1}{2+\epsilon } \left( 1 - \bar{s} \right) . \end{aligned}$$

Therefore we obtain

$$\begin{aligned} q^*(x)= \frac{1}{2} \left( \frac{2}{2+\epsilon } + \frac{\epsilon }{2+\epsilon }\bar{s} - s(x) \right) , \end{aligned}$$

which is the same as found from the Bertrand continuum MFG, Eq. (18).

We shall see in Appendix that Cournot–Bertrand equivalence also hold in the dynamic MFG with exhaustible resources. We introduce the Bertrand version of this problem in the next section.

3 Dynamic Mean Field Game with Exhaustible Capacities

We look now at a dynamic problem in which firms sell goods over time, but have different capacities or inventories, modeling that they are of different size. As they exhaust their supplies or reserves, they no longer participate and the market shrinks, but the demand functions adjust consistently according to (5). In the static game of the previous section, players were differentiated by their costs of production. In the dynamic \(N\)-player Bertrand games considered in [16], firms have different finite production capacities and, for simplicity, zero production costs. However, the firms will be faced with nonzero shadow costs due to the exhaustibility of production capacities. Here, we analyze the continuum mean field version of this problem. As mentioned in the introduction, the Cournot and Bertrand models give the same result in the continuum limit; we focus our exposition on Bertrand competition for concreteness.

There is an infinity of producers setting prices for their goods. At time \(t=0\), the density of players with remaining capacity \(x>0\) is given by \(M(x)\), where \(\int M=1\). Initial capacity \(x\) allows us to distinguish between bigger and smaller players. As time evolves, some players exhaust their capacity by selling all their goods and drop out of competition, and we denote by \(m(t,x)\) the “density” of firms with positive capacity at time \(t>0\). Let \(\eta (t)\) be the fraction of active firms remaining at time \(t\):

$$\begin{aligned} \eta (t)=\int _{\mathbb {R}_+} m(t,x)\ dx, \qquad \mathbb {R}_+ = (0,\infty ). \end{aligned}$$
(22)

In general, we expect \(\eta (t)<1\) for large enough \(t>0\), and it plays the role of \(n/N\) in the discrete setting. We define the exhaustion time \(T\) of the game to be the first time \(\eta \) hits zero, and all the quantities introduced in the following are defined for \(t < T\).

Given the price \(p(t,x)\) set by one of these players at time \(t\), the expected demand for his good is

$$\begin{aligned} q(t,x) =D^{(\eta (t))}(p(t,x),\bar{p}(t))= a(\eta (t)) - p(t,x) + c(\eta (t)) \bar{p}(t), \end{aligned}$$
(23)

where the functions \(a\) and \(c\) were defined in (6), and \(\bar{p}\) is the average price at time \(t\) given by

$$\begin{aligned} \bar{p}(t) = \frac{1}{\eta (t)} \int _{\mathbb {R}_+} p(t,x) m(t,x) \, dx. \end{aligned}$$
(24)

The average price \(\bar{p}\) is the continuum counterpart of \(\bar{p}^n_i\) in (2), which denotes the average price charged by the remaining firms except the \(i\)th one. In the continuum limit, a single firm no longer affects the average price, and hence \(\bar{p}\) depends on \(t\) but not on \(x\).

The actual demands are subject to random fluctuations and we model this with an additive Gaussian white noise \(\dot{W}_t\) so that the actual demand is given by \(q(t,x) - \sigma \dot{W}_t\). The remaining capacity (or reserves) \((X_t)_{t\ge 0}\) of any producer depletes according to the actual demand and follows the dynamics

$$\begin{aligned} dX_t = -q(t,X_t)\,dt + \sigma \,dW_t, \end{aligned}$$
(25)

as long as \(X_t > 0\), and \(X_t\) is absorbed at zero. As in [9], the Brownian motion \(W\) is specific to the agent considered, and \(\sigma \ge 0\) is a constant.

Remark 4

As an alternative interpretation to the random fluctuations of capacity reserves, we consider the energy production market where the Cournot model is appropriate (as remarked earlier, we will show in Appendix that the Cournot model is equivalent to the Bertrand model in the continuum limit). Here firms determine the extraction rates of the exhaustible resources such as oil or natural gas, and the fluctuations in production capacities may be due to noisy seismic estimation of the oil or gas well.

A firm that starts with capacity \(x>0\) at time \(t\ge 0\) sets prices over the horizon \([t,T)\) to maximize the lifetime profit discounted at constant rate \(r>0\) over Markov controls \(p_t = p(t,X_t)\), with the corresponding demand \(q_t = q(t,X_t)\) given by (23). The value function of the firm is defined by

$$\begin{aligned} u(t,x) = \sup _p \mathbb {E} \left\{ \int _t^\infty e^{-r(s-t)} p_s q_s 1\!\!1_{\{X_s > 0\}} \,ds \ |\ X_t = x \right\} , \qquad x > 0. \end{aligned}$$

The indicator function describes that the player is exhausted when \(X_t\) hits zero and he no longer can produce and earn revenue.

3.1 Dynamic Programming and the HJB Equation

The associated HJB equation is

$$\begin{aligned} \partial _t u + \frac{1}{2} \sigma ^2 \partial ^2_{xx} u - r u + \max _{p \ge 0}\left[ \bigg (a(\eta (t)) - p + c(\eta (t)) \bar{p}(t)\bigg )\left( p - \partial _x u\right) \right] = 0.\nonumber \\ \end{aligned}$$
(26)

We observe that the internal optimization is the static MFG equilibrium problem (14), but with effective shadow cost (or scarcity) \(s(x) \mapsto \partial _x u(t,x)\). The first-order condition in (26) gives

$$\begin{aligned} p^*(t,x) = \frac{1}{2} \bigg ( a(\eta (t)) + \partial _x u(t,x) + c(\eta (t)) \bar{p}(t) \bigg ). \end{aligned}$$
(27)

Substituting (27) into (24), we have

$$\begin{aligned} \bar{p}(t) = \frac{1}{\eta (t)} \int _{\mathbb {R}_+} \frac{1}{2} \Big ( a(\eta (t)) + \partial _x u(t,x) + c(\eta (t)) \bar{p}(t) \Big )m(t,x)\ dx, \end{aligned}$$

from which we obtain

$$\begin{aligned} \bar{p}(t) = \frac{1}{2 - c(\eta (t))} \left( a(\eta (t)) + \frac{1}{\eta (t)} \int _{\mathbb {R}_+} \partial _x u(t,x) m(t,x)\ dx \right) . \end{aligned}$$
(28)

From (23), the optimal (equilibrium) demand is given by

$$\begin{aligned} q^*(t,x) = \frac{1}{2} \bigg ( a(\eta (t)) - \partial _x u(t,x) + c(\eta (t)) \bar{p}(t) \bigg ). \end{aligned}$$
(29)

Therefore, the HJB equation (26) is

$$\begin{aligned} \partial _t u + \frac{1}{2} \sigma ^2 \partial ^2_{xx} u - r u + \frac{1}{4} \bigg ( a(\eta (t)) - \partial _x u + c(\eta (t)) \bar{p}(t) \bigg )^2 = 0, \qquad x > 0. \end{aligned}$$
(30)

When a player reaches \(x=0\), his reserves are exhausted and he no longer earns revenue, so we have \(u(t,0) = 0\). Moreover, at time \(T\) all capacities are exhausted and \(u(T,x) = 0\). The time \(T\) is not known a priori and has to be determined endogenously.

The average price \(\bar{p}\) is computed from the density \(m(t,x)\) of the distribution of reserves \(X_t\) which evolve by dynamics (25), with \(q=q^*\) given by (29). It is the solution of the forward Kolmogorov equation

$$\begin{aligned} \partial _t m - \frac{1}{2}\sigma ^2 \partial ^2_{xx} m + \partial _x \left( - \frac{1}{2} \bigg ( a(\eta (t)) - \partial _x u + c(\eta (t)) \bar{p}(t) \bigg ) m \right)&= 0 \nonumber \\ m(0,x)&= M(x), \end{aligned}$$
(31)

where \(\bar{p}\) depends on \(m\) through (28) and \(M\) is the given initial density of reserves.

We will distinguish between stochastic and deterministic cases:

  • In the first case \(\sigma >0\), we shall assume that \(m\) is a \(\mathcal {C}^{1,2}\) function and therefore a classical solution to (31). When \(x\) is close to zero, the short-term behavior is dominated by the Brownian motion. Once a player is driven to zero he cannot be revived by the Brownian motion, meaning that the effect of noise is predominately one-sided. Hence we have the boundary condition \(m(t,0) = 0\) because players close to zero will “rapidly” be absorbed into zero.

  • In the deterministic case \(\sigma =0\), there is no boundary condition at \(x=0\). In this case we also want to consider the case where the initial distribution is a sum of delta functions to mimic the situation of finite player games. Therefore we assume the initial density \(M\) and the later density \(m\) exist in the sense of distributions, and that the inner products with test functions are \(\mathcal {C}^1\) in time.

The system (30) and (31) is an instance of what Lasry and Lions [15] have called a MFG. The forward/backward system of PDEs is coupled through \(\bar{p}\) in (28) and \(\eta \) in (22). Existence, uniqueness and regularity of solutions to the MFG system is an ongoing challenge and a subject of active research, and we do not attempt to prove these properties here. In the following we shall assume sufficient regularity of \(u\) and \(m\) for our asymptotic calculations to hold, but remark that the perturbation is around the monopoly case \(\epsilon =0\) which is explicitly solvable, and regularity of solution can be seen directly. The validity of our assumptions is backed up by numerical experiments in Sects. 5 and 6. We also note that our model does not fit into the linear-quadratic framework studied by Bensoussan et al. [2], for which there are explicit solutions, because of the nonlinear dependence of \(\bar{p}\) on the state variable and mean field term.

3.2 Lifetime Production and Total Profit

We define here two useful objects of study for analyzing the effects of competition. The output rate \(Q\) at time \(t\) can be defined as

$$\begin{aligned} Q(t) = \int _{\mathbb {R}_+} q^*(t,x) m(t,x) \ dx. \end{aligned}$$
(32)

From (23), \(q^*(t,x) = a(\eta (t)) - p^*(t,x) + c(\eta (t)) \bar{p}(t)\), and so we can also write the output rate \(Q\) in terms of the average equilibrium price as \(Q(t) = \left[ a(\eta (t)) - \bar{p}(t) + c(\eta (t)) \bar{p}(t)\right] \eta (t)\).

In the deterministic setting, we expect that the integral of the output rate over time to be simply the total initial capacity. We define the lifetime production to be

$$\begin{aligned} \text{ Lifetime } \text{ production } = \int _0^T Q(t) \ dt, \end{aligned}$$

and this quantity is invariant under change in the level of competition. This invariance can serve as a useful check for the numerical quality of our code when an explicit solution is not available. The following proposition makes precise the above observation.

Proposition 1

In the deterministic setting, the lifetime production depends only on the initial capacity distribution via

$$\begin{aligned} \int _0^T Q(t) \ dt = \int _{\mathbb {R}_+} x M(x) \ dx. \end{aligned}$$
(33)

Proof

Notice equation (31) is \(\partial _t m = \partial _x (q^* m)\). Hence we have

$$\begin{aligned} - \frac{d}{dt} \int _{\mathbb {R}_+} x m(t,x) \, dx = - \int _{\mathbb {R}_+} x \partial _t m \, dx = - \int _{\mathbb {R}_+} x \frac{d}{dx} \left[ q^* m \right] \, \\ dx = \int _{\mathbb {R}_+} q^*(t,x) m(t,x) \, dx = Q(t), \end{aligned}$$

where the boundary terms in the integration-by-parts clearly vanish. Then integrating this expression in time gives

$$\begin{aligned} \int _0^T Q(t) \ dt = \int _0^T \left( -\frac{d}{dt} \int _{\mathbb {R}_+} x m(t,x) \ dx \right) \ dt = \int _{\mathbb {R}_+} x M(x) \ dx. \end{aligned}$$

\(\square \)

We define the total profit rate \(\Pi (t)\) by

$$\begin{aligned} \Pi (t)&= \int _{\mathbb {R}_+} p^*(t,x) q^*(t,x) m(t,x) \ dx \\&= \frac{1}{4} \left( \Big ( a(\eta (t)) + c(\eta (t)) \bar{p}(t) \Big )^2 \eta (t) - \int _{\mathbb {R}_+} \bigl ( \partial _x u(t,x) \bigr )^2 m(t,x) \ dx \right) . \nonumber \end{aligned}$$
(34)

We will use this to demonstrate the effect of competition in Sect. 5.

3.3 Monopoly with Deterministic Demand \((\sigma =0)\)

Ultimately, our goal is to quantify the effects of market competition in the continuum mean field setting. We do so by studying the first-order corrections to the value function and density in the presence of small but nonzero degree of product substitutability. In preparation for the asymptotic expansion, we first look at the case when \(\epsilon = 0\), which implies that \(c\) in (6) is identically zero, so the goods are independent and the players are monopolists in their own markets. In this subsection, we also suppose that demand is deterministic, so that \(\sigma =0\). Later on in Sect. 4 we will see that the monopoly solution corresponds precisely to the zeroth order expansion in our asymptotic approximation.

From Eq. (6), when \(\epsilon =0\), \(a\) is constant and equal to \(1\). Let \((u_0,m_0)\) be the value function and density in this case. Then Eq. (30) becomes

$$\begin{aligned} \partial _t u_0 - r u_0 + \frac{1}{4} (1 - \partial _x u_0)^2 = 0 , \qquad x > 0, \end{aligned}$$

with \(u_0(t,0) = 0\). The solution is time-independent and given by \(u_0(t,x) = u_0(x)\) solving

$$\begin{aligned} \frac{1}{4} (1 - u_0')^2 = r u_0, \qquad u_0(0) = 0. \end{aligned}$$
(35)

Proposition 2

The solution \(u_0\) to the ODE with boundary condition give in (35) is

$$\begin{aligned} u_0(x) = \frac{1}{4 r} \Big ( 1 + \mathbb {W}\big (\theta (x)\big ) \Big )^2, \qquad \theta (x) = - e^{-2rx - 1}, \end{aligned}$$
(36)

where \(\mathbb {W}\) is the Lambert W-function defined by the relation \(x = \mathbb {W}(x) e^{\mathbb {W}(x)}\) with domain \(x \ge -e^{-1}\) and for \(x\in (-1/e,0)\), we take the principal branch \(\mathbb {W}(x)>-1\).

The economically sensible solution is given by the principal branch of \(\mathbb {W}\), as this ensures that the shadow (or scarcity) cost \(u_0'(x) \rightarrow 0\) as \(x \rightarrow \infty \).

Proof

One can check that \(-1 \le \mathbb {W}(z) < 0\) for \(z \in \left[ -e^{-1},0 \right) \), with \(\mathbb {W}\left( -e^{-1} \right) = -1\), and for \(z > -e^{-1}\)

$$\begin{aligned} \mathbb {W}'(z) = \frac{\mathbb {W}(z)}{z \left( 1 + \mathbb {W}(z) \right) }. \end{aligned}$$

It is now clear that Eq. (36) indeed satisfies Eq. (35) and the zero boundary condition. \(\square \)

From the explicit solution of \(u_0\), we can rewrite Eq. (25) as the ordinary differential equation (ODE)

$$\begin{aligned} X'(t) = -\frac{1}{2} \Big ( 1 + \mathbb {W}\bigl ( \theta ( X(t) ) \bigr ) \Big ), \qquad X(0) = x_0. \end{aligned}$$
(37)

Proposition 3

Equation (37) can be solved in closed form and the solution is given by

$$\begin{aligned} X(t;x_0) = x_0 - \frac{1}{2} t + \frac{1}{2 r} (1-e^{rt}) \mathbb {W}\big ( \theta (x_0) \big ). \end{aligned}$$
(38)

Proof

Consider the function defined by \(f(t) = \mathbb {W}\bigl (\theta (X(t))\bigr )\). A short calculation shows that \(f'(t) = r f(t)\), and hence

$$\begin{aligned} \mathbb {W}\bigl (\theta (X(t))\bigr ) = \mathbb {W}\bigl (\theta (x_0)\bigr ) e^{rt}. \end{aligned}$$
(39)

Using this one can integrate the ODE (37) to get (38). \(\square \)

We observe that Eq. (39) is the famous Hotelling’s rule [11]. Recall that the shadow cost in the monopoly setting is simply

$$\begin{aligned} u_0'(x) = -\mathbb {W}\bigl (\theta (x)\bigr ). \end{aligned}$$
(40)

Then Eq. (39) says that \(u_0'(X(t)) = u_0'(x_0) e^{rt}\). In other words, along the optimal extraction path, the shadow cost grows at the discounting rate \(r\). In the case of linear demand, Hotelling’s rule can be equivalently written as

$$\begin{aligned}&\frac{d}{dt} \left( p^*(t,X(t)) - \frac{1}{2} \right) = r \left( p^*(t,X(t)) - \frac{1}{2} \right) , \quad \Rightarrow \\&p^*(t,X(t)) = \frac{1}{2}\left( 1 - e^{rt} \right) + p^*(0,x_0) e^{rt}. \end{aligned}$$

That is, the (shifted) optimal price \(p^*\) grows at the discount rate \(r\) along the optimal extraction path.

We define the hitting time \(\tau : \mathbb {R}_+ \rightarrow \mathbb {R}_+\) to be the time to exhaustion in the deterministic monopoly market starting at initial capacity \(x_0\):

$$\begin{aligned} \tau (x_0) = \inf \{ t \ge 0 \mid X(t;x_0) \le 0 \}. \end{aligned}$$
(41)

Proposition 4

The hitting time is given explicitly by:

$$\begin{aligned} \tau (x_0) = 2 x_0 + \frac{1}{r} \Big ( 1 + \mathbb {W}\big (\theta (x_0)\big ) \Big ). \end{aligned}$$
(42)

Formula (42) follows directly from (38). The hitting time \(\tau \) is monotonic increasing as expected; for large \(x_0\), \(\tau \) grows linearly in \(x_0\). In fact, in the deterministic setting, when the initial density \(M\) has compact support \([0,x_{\text {max}}]\), it follows that the exhaustion time \(T\) is given by \(T = \tau (x_{\text {max}})\). For the density, recalling from Eq. (6) that \(a \equiv 1\) and \(c \equiv 0\) when \(\epsilon = \sigma = 0\), the forward Kolmogorov equation (31) becomes

$$\begin{aligned} \partial _t m_0 - \frac{1}{2} \partial _x \big ( (1 - u_0') m_0 \big ) = 0, \end{aligned}$$
(43)

with \(m_0(0,x) = M(x)\).

Proposition 5

The solution to Eq. (43) is given by

$$\begin{aligned} m_0(t,x) = \frac{1 + \mathbb {W}\big (\theta (x)\big ) e^{-rt}}{1 + \mathbb {W}\big (\theta (x)\big )} M\big (X(-t;x)\big ). \end{aligned}$$
(44)

Proof

The solution follows from the method of characteristics. For fixed \((t,x)\), we define the characteristic curve by the ODE

$$\begin{aligned} z'(s) = -\frac{1}{2} \Bigl ( 1+\mathbb {W}\bigl (\theta (z(s))\bigr ) \Bigr ), \qquad z(t) = x, \end{aligned}$$
(45)

whose solution is precisely the monopoly capacity trajectory started at \((t,x)\): \(z(s)=X(s-t;x).\) Along the curve \(z(s)\), the function \(\tilde{m}_0(s) = \Bigl ( 1+\mathbb {W}\bigl (\theta (z(s))\bigr ) \Bigr ) m_0(s,z(s))\) is constant, and in particular we have

$$\begin{aligned} m_0(t,x) = \frac{1}{1+\mathbb {W}\bigl (\theta (x)\bigr )} \tilde{m}_0(t) = \frac{1+\mathbb {W}\bigl (\theta (z(0))\bigr )}{1+\mathbb {W}\bigl (\theta (x)\bigr )} M(z(0)) \\ = \frac{1 + \mathbb {W}\big (\theta (x)\big ) e^{-rt}}{1 + \mathbb {W}\big (\theta (x)\big )} M\big (X(-t;x)\big ), \end{aligned}$$

using Hotelling’s rule (39) and the definition of \(X\). \(\square \)

It turns out that the integral of \(m_0\), or the proportion of remaining active firms \(\eta _0\), can be computed in closed-form.

Proposition 6

Given the distribution \(M : \mathbb {R}_+ \rightarrow \mathbb {R}_+\) of the initial capacity \(x_0\), the proportion \(\eta _0 : \mathbb {R}_+ \rightarrow [0,1]\) of remaining players, as defined by Eq. (22), is given by

$$\begin{aligned} \eta _0(t) = 1 - F\left( \tau ^{-1}(t)\right) \end{aligned}$$
(46)

where \(F\) denotes the cumulative distribution function (CDF) of the initial distribution \(M\), and \(\tau ^{-1}\) is the inverse function of \(\tau \) in (42), explicitly given by

$$\begin{aligned} \tau ^{-1}(t) = \frac{t}{2} - \frac{1}{2 r} \left( 1 - e^{-rt} \right) . \end{aligned}$$

Proof

First we note both sides of Eq. (46) evaluate to 1 at \(t=0\). It suffices to show that the time derivatives on both sides are equal for all \(t > 0\). Using Eq. (43), we have

$$\begin{aligned} \eta _0'(t)&= \int _{\mathbb {R}_+} \partial _t m_0(t,x)\ dx = \frac{1}{2} \int _{\mathbb {R}_+} \partial _x \big ( (1 - u_0') m_0 \big )\ dx \\&= \left. \frac{1}{2} \Big ( 1 + \mathbb {W}\big (\theta (x)\big ) \Big ) m_0(t,x) \right| _{0^+}^\infty = - \frac{1}{2} (1-e^{-rt}) M\big ( X(-t;0) \big ), \end{aligned}$$

where we have used that \(m_0(t,x) \rightarrow 0\) as \(x\rightarrow \infty .\) Now, since that \(X(-t;0) = \tau ^{-1}(t)\), we recognize the last line is precisely the time derivative of \(1 - F\left( \tau ^{-1}(t)\right) \), the right-hand side of Eq. (46). \(\square \)

Proposition 7

In the case of monopoly, the average equilibrium price \(\bar{p}_0\) is given by

$$\begin{aligned} \bar{p}_0(t) = \frac{1}{2} \left( 1 - \frac{I(t)}{\eta _0(t)} \right) , \end{aligned}$$
(47)

where \(I\) satisfies the first-order linear ODE

$$\begin{aligned} I'(t) - r I(t) = -\eta _0'(t), \qquad I(0) = \int _{\mathbb {R}_+} \mathbb {W}\big ( \theta (x) \big ) M(x) \ dx. \end{aligned}$$
(48)

Proof

We see from Eq. (28) with \(\epsilon =0\) that the average equilibrium price is given by (47), where, using the formula (36) for \(u_0\), we define \(I(t) = \int _0^\infty \mathbb {W}\big ( \theta (x) \big ) m_0(t,x)\ dx\). Then we compute

$$\begin{aligned} I'(t)&= \int _{\mathbb {R}_+} \mathbb {W}\big ( \theta (x) \big ) \cdot \partial _t m_0(t,x)\ dx = \frac{1}{2} \int _{\mathbb {R}_+} \mathbb {W}\big ( \theta (x) \big ) \cdot \partial _x \big ( (1 - u_0' ) m_0 \big )\ dx \\&= \left. \frac{1}{2} \mathbb {W}\big ( \theta (x) \big ) \Big ( 1 + \mathbb {W}\big ( \theta (x) \big ) e^{-r t} \Big ) M\big ( X(t;x) \big ) \right| _0^\infty + r \int _{\mathbb {R}_+} \mathbb {W}\big ( \theta (x) \big ) m_0 (t,x)\ dx \\&= -\eta _0'(t) + r I(t). \end{aligned}$$

which gives (48). \(\square \)

This representation is convenient for numerical purposes because all we need is to solve a first-order linear ODE to obtain the time evolution of the average equilibrium price \(\bar{p}_0\). Moreover, we will see in Sect. 4 that this splitting is used to prove certain qualitative features of first-order corrections to the game in the case of small substitutability.

Finally, recall the output rate \(Q(t)\) defined in (32). In the monopoly setting, this simplifies to

$$\begin{aligned} Q_0(t) = \eta _0(t) \bigl ( 1 - \bar{p}_0(t) \bigr ). \end{aligned}$$

4 Small Competition Asymptotics Under Deterministic Demand

Having studied the monopoly problem where many quantities, including the value function and density, are explicitly solvable, we are now ready to investigate the effect of competition. We first note that \(\epsilon = 0\) (or equivalently \(a \equiv 1\) and \(c \equiv 0\) from Eq. (6)) is equivalent to stating that firms have independent goods in the sense that they operate in markets without competing with one another. When \(\epsilon > 0\), firms produce goods that are actually in competition with one another. Our approach is to formally construct a perturbation expansion around the non-competitive case for small \(\epsilon > 0\) to view the effects of a small amount competition. Throughout this section, we work with deterministic demand where \(\sigma = 0\).

We will look for an approximation to the PDE system of the form

$$\begin{aligned} u(t,x)&= u_0(t,x) + \epsilon \ u_1(t,x) + \epsilon ^2\ u_2(t,x) + \cdots , \nonumber \\ m(t,x)&= m_0(t,x) + \epsilon \ m_1(t,x) + \epsilon ^2\ m_2(t,x) + \cdots . \end{aligned}$$
(49)

To leading order in \(\epsilon \), the demand coefficients \(a\) and \(c\) in (6) are given by

$$\begin{aligned} a(\eta (t)) = 1 - \epsilon \ \eta _0(t) + \cdots , \qquad c(\eta (t)) = \epsilon \, \eta _0(t) + \cdots , \end{aligned}$$

where \(\eta \) denotes the proportion of remaining players, and hence in the expansion

$$\begin{aligned} \eta = \eta _0 + \epsilon \ \eta _1 + \dots , \quad \text{ we } \text{ have } \quad \eta _i(t) = \int _{\mathbb {R}_+} m_i(t,x)\ dx, \quad i=0,1,\cdots . \end{aligned}$$
(50)

We also expand the average equilibrium price \(\bar{p}(t) = \bar{p}_0 (t) + \epsilon \ \bar{p}_1(t) + \cdots ,\) where, from (28), we find

$$\begin{aligned} \bar{p}_0 (t) = \frac{1}{2} \left( 1 + \frac{1}{\eta _0(t)} \int _{\mathbb {R}_+} \partial _x u_0(t,x) \cdot m_0(t,x)\ dx \right) . \end{aligned}$$

4.1 First-Order Correction to Value Function

Inserting the expansion (49) for \(u\) into Eq. (30) and collecting terms independent of \(\epsilon \), we recover the monopoly Eq. (35) for \(u_0\) whose solution is given by Eq. (36). We obtain the following equation for \(u_1\) by equating terms of order \(\epsilon \):

$$\begin{aligned} \partial _t u_1 - \frac{1}{2} \left( 1 - u_0' \right) \partial _x u_1 - r u_1 = \frac{1}{2} \left( 1 - u_0' \right) \left( 1 - \bar{p}_0 \right) \eta _0 , \qquad u_1(t,0) = 0. \end{aligned}$$
(51)

Observe that Eq. (51) does not involve \(m_1\), and this greatly simplifies the solution process for otherwise the forward-backward structure of MFGs typically requires an iterative solver, with each iteration involving a finite-difference solution to some PDEs, as we do in Sect. 5.

Proposition 8

The correction to the value function \(u_1\) is given by

$$\begin{aligned} u_1(t,x) = -\frac{1}{2} \int _0^{\tau (x)} \Bigl ( e^{-rs} + \mathbb {W}\bigl (\theta (x)\bigr ) \Bigr ) \cdot \bigl (1 - \bar{p}_0(t + s) \bigr ) \cdot \eta _0(t + s) \ ds, \end{aligned}$$
(52)

where \(\tau (x)\) is given by Eq. (42). In particular, the first-order correction \(u_1(t,x)\) is negative for all \((t,x)\).

Proof

Using (40), Eq. (51) can be rewritten as

$$\begin{aligned} \partial _t u_1 - \frac{1}{2} \Bigl ( 1 + \mathbb {W}\big (\theta (x)\big ) \Bigr ) \partial _x u_1 - r u_1 = \frac{1}{2} \Bigl ( 1 + \mathbb {W}\big (\theta (x)\big ) \Bigr ) \left( 1 - \bar{p}_0 \right) \eta _0. \end{aligned}$$

This is a first-order transport equation and can be solved by the method of characteristics. Given fixed \((t,x)\), we define the characteristic curve \(z\) as in (45). Then the discounted first-order correction \(\tilde{u}_1(s) = u_1(s,z(s)) e^{-r(s-t)}\) satisfies the ODE along the characteristic curve

$$\begin{aligned} \tilde{u}_1'(s) = \frac{1}{2} \Bigl ( 1+\mathbb {W}\bigl (\theta (z(s))\bigr ) \Bigr ) \bigl (1 - \bar{p}_0(s) \bigr ) \eta _0(s) e^{-r(s-t)}, \qquad \tilde{u}_1(t+\tau (x)) = 0. \end{aligned}$$

Integrating from \(t\) to \(t+\tau (x)\), we obtain

$$\begin{aligned} u_1(t,x) = \tilde{u}_1(t)&= -\frac{1}{2} \int _t^{t+\tau (x)} \Bigl ( 1+\mathbb {W}\bigl (\theta (z(s))\bigr ) \Bigr ) e^{-r(s-t)} \bigl (1 - \bar{p}_0(s) \bigr )\eta _0(s) \ ds, \end{aligned}$$

using Hotelling’s rule (39). This yields (52) after a change of variable \(s\mapsto s+t\). It follows readily that \(u_1\) is negative for all \((t,x)\) since

$$\begin{aligned} (1 - \bar{p}_0) \eta _0 = \frac{1}{2} (\eta _0 + I) = \frac{1}{2} \int _{\mathbb {R}_+} \Bigl ( 1+\mathbb {W}\bigl (\theta (x))\bigr ) \Bigr ) m_0(t,x) \ dx \ge 0. \end{aligned}$$

\(\square \)

4.2 First-Order Correction to Density

Inserting the expansion (49) for \(m\) into Eq. (31) and collecting terms independent of \(\epsilon \) we recover Eq. (43) whose solution is given by Eq. (44). We obtain the following equation for \(m_1\) by equating terms of order \(\epsilon \):

$$\begin{aligned} \partial _t m_1 - \frac{1}{2} \partial _x \big ( (1 - u_0') m_1 + (-\eta _0 + \eta _0 \bar{p}_0 - \partial _x u_1) m_0 \big ) = 0, \qquad m_1(0,x) = 0.\nonumber \\ \end{aligned}$$
(53)

Proposition 9

The solution to Eq. (53) is given by

$$\begin{aligned} m_1(t,x) = \int _0^t \frac{1 + \mathbb {W}\bigl (\theta (x)\bigr ) e^{-r(t-s)}}{1 + \mathbb {W}\bigl (\theta (x)\bigr )} g\bigl (s, X(s-t;x) \bigr ) \ ds, \end{aligned}$$
(54)

where

$$\begin{aligned} g(t,x) = \frac{1}{2} \partial _x \bigl ( (-\eta _0 + \eta _0 \bar{p}_0 - \partial _x u_1) m_0 \bigr ), \end{aligned}$$

and \(X(t;x)\) was given in Eq. (38).

Proof

This follows from the method of characteristics. For fixed \((t,x)\), we define the characteristic curve by Eq. (45). Along the characteristic curve, the function

$$\begin{aligned} \tilde{m}_1(s) = \Bigl ( 1+\mathbb {W}\bigl (\theta (z(s))\bigr ) \Bigr ) m_1(s,z(s)) \end{aligned}$$

satisfies the ODE

$$\begin{aligned} \tilde{m}_1'(s) = g(s,z(s)) \Bigl ( 1+\mathbb {W}\bigl (\theta (z(s))\bigr ) \Bigr ), \qquad \tilde{m}_1(0) = 0. \end{aligned}$$

Integrating from \(0\) to \(t\), and using the definition of \(\tilde{m}_1\) we obtain

$$\begin{aligned} m_1(t,x) = \int _0^t g(s,z(s)) \frac{1+\mathbb {W}\bigl (\theta (z(s))\bigr )}{1+\mathbb {W}\bigl (\theta (x)\bigr ) } \ ds = \int _0^t g(s,X(s-t;x)) \\ \frac{1+\mathbb {W}\bigl (\theta (x)\bigr ) e^{-r(t-s)}}{ 1+\mathbb {W}\bigl (\theta (x)\bigr )} \ ds. \end{aligned}$$

\(\square \)

We plot the first-order corrections to the value function and density in Figs. 1a and 1b respectively. Notice that the density correction is positive for large values of \(x\), then changes sign and becomes negative for smaller values of \(x\). This suggests that firms are exhausting their production capacity more slowly in the presence of competition and hence the capacity distribution is shifted away from zero. We will see that this is indeed the case in a later Proposition 10.

Fig. 1
figure 1

Small substitutability expansion under deterministic demand, where \(r = 0.2\) and the initial capacity is chosen to following the beta distribution with shape parameters \(\alpha = 2, \beta = 4\).

Remark 5

We observe that expansion of the form (49) may lead to negative density. This leads us to consider a multiplicative asymptotic perturbation for \(m\) given by

$$\begin{aligned} m(t,x) \approx m_0(t,x) \left( 1 + \tanh \left( \frac{\epsilon \ m_1(t,x)}{m_0(t,x)} \right) \right) . \end{aligned}$$
(55)

Using that \(\tanh x = x + \mathcal {O}(x^3)\) for small \(x\), one can show that (55) agrees with (49) up to first order in \(\epsilon \). Moreover, since \(\tanh x \in (-1,1)\) for all \(x\), we obtain a positivity-preserving asymptotic perturbation for \(m\).

4.3 First-Order Correction to Demands and Capacity Trajectories

Expanding the equilibrium demand \(q^*\) given by (29) as \(q^*=q_0 + \epsilon \, q_1 + \mathcal {O}(\epsilon ^2)\), we have

$$\begin{aligned} q_0=\frac{1}{2} \left( 1 - u'_0 \right) ,\qquad q_1=\frac{1}{2}\left( -\eta _0 + \eta _0 \bar{p}_0 - \partial _x u_1 \right) . \end{aligned}$$

Solving Eq. (25) yields the first-order correction to the capacity trajectories, which we plot in Fig. 1 for various values of \(\epsilon \). In Fig. 1c we plot the first order correction to the equilibrium demand \(q_1\) and observe that it is negative. We show that this is true in general in the following proposition.

Proposition 10

The first order correction to the equilibrium demand \(q\) is negative, that is \(q_1 \le 0\) for \(0 \le t \le T\) and \(x\ge 0\).

Proof

In light of Eq. (51), it suffices to show that \( \partial _t u_1 - r u_1 \ge 0 \) since \(1+\mathbb {W}\bigl (\theta (x)\bigr ) \ge 0\) for \(x \ge 0\). To this end, we first notice that \( e^{-r s} + \mathbb {W}\bigl (\theta (x)\bigr ) \ge 0 \) for \(0 \le s \le \tau (x)\) and \(x \ge 0\). Now using the explicit form of \(u_1\) in Eq. (52), it suffices to show that

$$\begin{aligned} (-\eta _0 + \eta _0 \bar{p}_0)' - r (-\eta _0 + \eta _0 \bar{p}_0) \ge 0. \end{aligned}$$

First we rewrite

$$\begin{aligned} \eta _0 \bar{p}_0 = \frac{1}{2} \left( \eta _0 + \int _{\mathbb {R}_+} \partial _x u_0 \cdot m_0 \ dx \right) = \frac{1}{2} \left( \eta _0 - I \right) \end{aligned}$$

where \(I\) satisfies the differential Eq. (48).

It follows that \((-\eta _0 + \eta _0\bar{p}_0) = -\frac{1}{2} (\eta _0 + I)\). The claim follows immediately since

$$\begin{aligned} (-\eta _0 + \eta _0\bar{p}_0)' - r (-\eta _0 + \eta _0\bar{p}_0) = \frac{1}{2} r \eta _0 \ge 0. \end{aligned}$$

\(\square \)

The asymptotic approximation to first order demonstrates the principal effect of competition in the continuum MFG compared with the monopoly case: demand for the goods drop, the firms sell at a slower rate and so take longer to exhaust their capacities, and so their density is shifted away from zero. We investigate these effects further by numerical methods in the next two sections. Expressions for the higher order terms in the expansions are given in Appendix.

5 Numerical Analysis

We have been able to capture many of the qualitative features of the model analytically in the case of deterministic demand using the asymptotic expansions of the previous section. However, in order to fully analyze the case where \(\epsilon \) is not so small, or in the stochastic model \(\sigma > 0\), we have to solve the PDE system numerically.

In the deterministic monopoly game, the density \(m(t,x)\) becomes singular as \(x\rightarrow 0\) when players begin to exhaust their capacities. Similar problematic behavior is expected in the case of substitutable goods, and this renders accurate numerical solution to the forward equation difficult. It turns out, however, that the tail distribution function \(\bar{\eta }(t,x)\), defined by

$$\begin{aligned} \bar{\eta }(t,x) = \int _x^\infty m(t,y)\ dy, \end{aligned}$$
(56)

is more amenable to numerical treatment. Substituting Eq. (56) into the forward Kolmogorov equation (31), we get for \(t \ge 0\) and \(x \ge 0\)

$$\begin{aligned} \partial _t \bar{\eta }(t,x) - \frac{1}{2} \sigma ^2 \partial ^2_{xx} \bar{\eta }(t,x) - \frac{1}{2} \Big ( a(\eta (t)) - \partial _x u(t,x) + c(\eta (t)) \bar{p}(t) \Big ) \partial _x \bar{\eta }(t,x) = 0,\nonumber \\ \end{aligned}$$
(57)

with initial condition

$$\begin{aligned} \bar{\eta }(0,x) = \int _x^\infty M(y)\ dy. \end{aligned}$$

Note that while \(M\) may be singular at certain values of \(x\) (for instance certain cases of the Beta distribution or, later when we take \(M\) to be a sum of delta functions), \(\bar{\eta }(0,x)\) is bounded and, even in the extreme example of delta functions, still piecewise continuous.

5.1 Solution Strategy

We employ an iterative algorithm to calculate the MFG solution. Starting with initial guesses \((\eta ^0, \bar{p}^0)\) for \((\eta ,\bar{p})\), we follow for \(n = 0,1,2,\dots \) :

  • Step 1. Given \((\eta ^n,\bar{p}^n)\), solve the HJB equation (30) to calculate \(u^n\):

    $$\begin{aligned} \partial _t u^n + \frac{1}{2} \sigma ^2 \partial ^2_{xx} u^n - r u^n + \frac{1}{4} \Big ( a(\eta ^n(t)) + \partial _x u^n(t,x) + c(\eta ^n(t)) \bar{p}^n(t) \Big )^2 = 0,\\ \qquad u^n(t,0) = 0. \end{aligned}$$

    We have the terminal condition \(u^n(T,x) = 0\). In practice we do not know \(T\) and choose \(T_{\text {max}}\) to be significantly larger than (for instance double) its monopoly counterpart \(\tau (x_{\text {max}})\). Then the strategy \(p^{n,*}\) and the corresponding demand \(q^{n,*}\) are given by

    $$\begin{aligned} p^{n,*}(t,x)&= \frac{1}{2} \Big ( a(\eta ^n(t)) + \partial _x u^n(t,x) + c(\eta ^n(t)) \bar{p}^n(t) \Big ), \\ q^{n,*}(t,x)&= \frac{1}{2} \Big ( a(\eta ^n(t)) - \partial _x u^n(t,x) + c(\eta ^n(t)) \bar{p}^n(t) \Big ). \end{aligned}$$
  • Step 2. Given the price \(p^{n,*}\) and demand \(q^{n,*}\), solve Eq. (57) for \(\bar{\eta }^{n+1}\):

    $$\begin{aligned} \partial _t {\bar{\eta }}^{n+1} - \frac{1}{2} \sigma ^2 \partial ^2_{xx} {\bar{\eta }}^{n+1} - q^{n,*}(t,x) \partial _x {\bar{\eta }}^{n+1}(t,x) = 0, \qquad \bar{\eta }^{n+1}(0,x)=\bar{\eta }(0,x). \end{aligned}$$

    Then generate new \((\eta ^{n+1},\bar{p}^{n+1})\) from

    $$\begin{aligned} \eta ^{n+1}(t)&= \bar{\eta }^{n+1}(t,0), \quad m^{n+1}(t,x) = \partial _x \bar{\eta }^{n+1}(t,x), \quad \bar{p}^{n+1} (t) \\&=\frac{1}{\eta ^{n+1}(t)} \int _{\mathbb {R}_+} p^{n,*}(t,x) m^{n+1}(t,x) \ dx. \end{aligned}$$

When \((\eta ^{n+1}, \bar{p}^{n+1})\) is close enough to \((\eta ^n, \bar{p}^n)\), we call \((u^n,m^n)\) a solution to the MFG. Steps 1 and 2 themselves involve PDE solvers using finite difference which we describe in more detail.

Step 1 Using the method of lines, we discretize the HJB equation in the space dimension but not in time and solving the resulting system of ODEs using the fourth-order Runge-Kutta method.

Step 2 In the stochastic case, we apply the standard finite difference method. In the deterministic case, we can write the forward Kolmogorov equation in terms of the tail distribution \(\bar{\eta }\) as

$$\begin{aligned} \partial _t \bar{\eta }^{n+1}(t,x) - q^{n,*}(t,x) \partial _x \bar{\eta }^{n+1}(t,x) = 0, \qquad \bar{\eta }^{n+1}(0,x) = \int _x^\infty M(y)\,dy. \end{aligned}$$

In this form, it is clear that \(\bar{\eta }^{n+1}\) just gets transported along the characteristics

$$\begin{aligned} \frac{d}{dt} x^{n+1}(t) = -q^{n,*}(t,x^{n+1}(t)), \qquad x^{n+1}(0) = x_0. \end{aligned}$$

It therefore suffices to solve a family of ODEs with different initial \(x_0\).

5.2 Results and Observations

5.2.1 Deterministic Bertrand Games \((\sigma =0)\)

We illustrate the numerical results with one instance of the model, where we choose \(\epsilon = 0.3, r = 0.2\) and assume a beta distribution with shape parameters \(\alpha =2, \beta = 4\) for the initial capacity. See Fig. 2 for the convergence graph in this case, we note that the iterative solver converges very rapidly, often in less than 10 iterations.

Fig. 2
figure 2

Convergence of \(L_1\) error in the iterative solver, for deterministic Bertrand competition, with model parameters as in Fig. 3. Here we take the final iteration of our algorithm as a proxy as the true solution, and measure the \(L_1\) error by \(\Vert \eta -\eta ^{true}\Vert _{L_1}\).

Fig. 3
figure 3

Various descriptive statistics of deterministic Bertrand competition, where \(r = 0.2\) and the initial capacity is assumed to follow a beta distribution with shape parameters \(\alpha = 2, \beta = 4\).

Figure 3d compares the average equilibrium price \(\bar{p}\) in Bertrand competition against the monopoly case. Figure 3c shows the proportion of remaining players in Bertrand competition as well as the monopoly case. Figure 3e compares the output rate \(Q\) in Bertrand competition against the monopoly case. Figure 3a shows the capacity trajectories for various initial values in Bertrand competition as well as the monopoly case.

In the presence of competition, firms are more cautious and exhaust their production capacity more slowly, as shown in Fig. 3c and 3a. This is in accordance with Proposition 10 where an asymptotic expansion is used to show that production is slowed down in the presence of competition. Although each firm reduces their production level, and hence the decrease in the output rate \(Q\) as shown in Fig. 3e, as the game proceeds further, the production level in the presence of competition is actually above the monopoly level. This is because firms are more cautious in the competitive market and find themselves with higher production capacities as the game unfolds, even though they each chooses a smaller production level than they would in monopoly, overall we still see an increase in the production level. This is in accordance with Proposition 1 since the time integral of \(Q\) has to be invariant to the degree of competition \(\epsilon \). Figure 3f shows the total profit rate \(\Pi (t)\) defined in (34): it is initially higher in the case \(\epsilon =0\) of many firms producing independent goods, but declines more quickly as resources become scarce and firms drop out than when \(\epsilon >0\) and competition enforces greater discipline in price setting close to exhaustion.

5.2.2 Stochastic Bertrand Games \((\sigma >0)\)

For \(\sigma > 0\), the forward equation can no longer be solved using the method of characteristics, and we need to specify the boundary conditions for \(\bar{\eta }(t,x)\) and solve the PDE using finite differences. We choose

$$\begin{aligned} \lim _{x\rightarrow \infty } \bar{\eta }(t,x) = 0, \qquad \lim _{x\rightarrow 0} \partial _x \bar{\eta }(t,x) = 0. \end{aligned}$$

This is appropriate because we have an absorbing boundary at \(x = 0\), that is to say, once a firm hits zero, it is out of the game and cannot return.

Solving the full PDE using our iterative solver, we compare the average equilibrium price in the presence of noise, with and without competition, see Fig. 4. We notice that a high level of noise pushes down the average equilibrium price \(\bar{p}\) as well as shortens the duration of game. This is expected since the effect of our stochastic term is predominantly one-sided, once a firm exhausts their production capacity, they cannot be revived by the Brownian motion. Moreover, a high level of noise washes out the effects of competition, since the Brownian motion dominates the interactions between competitive firms.

Fig. 4
figure 4

Average equilibrium price \(\bar{p}\) and proportion of remaining players \(\eta \), in the presence of noise. Dotted lines and solid lines represent respectively the monopoly and competitive case. Initial capacity is assumed to follow a beta distribution with shape parameters \(\alpha =2, \beta = 4\). Other relevant model parameters are \(r = 0.2, \sigma = 0.1\) (low noise), or \(\sigma = 0.5\) (high noise).

6 MFG Approximations to Deterministic Finite Player Games

Since real-world situations involve games with only a finite number of players, we consider using the MFG framework to study the \(N\)-player game. The goal is to apply the MFG methodology to provide an efficient way to model situations with a moderate to large number of players in the deterministic dynamic game where \(\sigma =0\).

The idea is to approximate an \(N\)-player game by an initial density of the form

$$\begin{aligned} M(x) = \frac{1}{N} \sum _{i=1}^N \delta (x-x^i_0), \end{aligned}$$

where \(\delta \) is the Dirac-delta function, and \(x^i_0\) corresponds to the initial capacity of the \(i\)th player. In the deterministic setting, we denote the hitting time of player \(i\) to reach 0 by \(\tau _i\), where \(i= 1,2,\dots ,N\). The remaining proportion of active players \(\eta (t)\) is then a pure jump function, with jump times given by \((\tau _i)_{1\le i \le N}\). The average equilibrium price \(\bar{p}(t)\) will also jump across \(\tau _i\). We describe the algorithm we use to solve the MFG in this setting.

6.1 Discretization Algorithm

Again the solution to the discrete MFG depends on an iterative algorithm. We modify our scheme slightly to take advantage of the discrete nature of the problem at hand. Starting with the initial guess \(u^0=u_0\) in (36) for the value function \(u\),

we follow

  • Step 1. Given \(u^n\), solve \(N\) ODEs

    $$\begin{aligned} \frac{d}{dt} x^{n,i}(t) = - q^{n,*}(t,x^{n,i}(t)), \qquad x^{n,i}(0) = x^i_0. \end{aligned}$$

    We obtain, in particular, \(\tau ^{n,i}\) for \(i = 1, 2, \dots \), which is the hitting time of the \(i\)th player, in the \(n\)th iteration. Then for \(\tau ^{n,k-1} < t \le \tau ^{n,k}\), we have

    $$\begin{aligned} \eta ^n(t)&= \eta ^n_k = \frac{N-k+1}{N}, \\ \bar{p}^n(t)&= \frac{1}{2 - c(\eta ^n(t)) } \left( a(\eta ^n(t)) + \frac{1}{\eta ^n(t)} \frac{1}{N} \sum _{i=k}^N \partial _x u^n \left( t, x^{n,i}(t) \right) \right) . \end{aligned}$$
  • Step 2. Given \((\eta ^n, \bar{p}^n)\), we solve the HJB PDE (30) to obtain a new guess for the value function \(u^{n+1}\).

We iterate until the updated approximation for \((\eta , \bar{p})\) is close enough to the previous iterate. See Fig. 5d, e for the average equilibrium price \(\bar{p}\) and output rate \(Q\), respectively, in a numerical example, with initial capacity distribution of the \(N\)-players is specified in the caption. As \(N\) increases, we can use this discrete algorithm to approximate the continuous MFG, thus providing another way to solve the MFG PDE system.

Fig. 5
figure 5

MFG approximation to the \(N\)-player game, in the case of 10 players with initial sizes given by \((0.08,0.14,0.19,0.24,0.29,0.34,0.39,0.45,0.53,0.66)\), and \(\epsilon =0.3\).

6.2 Comparison with Two-Player Bertrand Competition

In the two-player case, each firm has a fixed lifetime capacity of production at time \(t=0\) denoted by \(x_i(0)\), and where \(x_i(t)\) denotes the remaining capacity at time \(t\). Each firm \(i\) chooses a dynamic pricing strategy, \(p_i = p_i(\mathbf {x}(t))\) where \(\mathbf {x}(t) = (x_1(t),x_2(t)).\) Given these prices, each firm \(i\) receives market demand at a rate \(D_i(p_1,p_2)\), where \(D_i\) are given in (4) with \(n=N=2\). Their capacities deplete as:

$$\begin{aligned} \frac{dx_i}{dt}(t) = -D_i\left( p_1\left( \mathbf {x}(t)\right) ,p_2\left( \mathbf {x}(t)\right) \right) . \end{aligned}$$

The value functions of the two firms are

$$\begin{aligned} V_i(x_1,x_2) = \sup _{p_i \ge 0} \left\{ \int _0^\infty e^{-rt}p_i\left( \mathbf {x}(t)\right) D_i\left( p_1\left( \mathbf {x}(t)\right) ,p_2\left( \mathbf {x}(t)\right) \right) \mathbf {1}_{x_i(t) > 0}\,dt\right\} . \end{aligned}$$

As long as both players have resources, this is a duopoly. After the first player has exhausted his capacity, the other player has a monopoly until he also runs out of reserves. As detailed in [17], a dynamic programming argument for nonzero-sum differential games yields that these value functions, if they have sufficient regularity, satisfy the following system of PDEs:

$$\begin{aligned} \sup _{p_i \ge 0} \left\{ -D_1(p_1,p_2) \frac{\partial V_i}{\partial x_1} - D_2(p_1,p_2) \frac{\partial V_i}{\partial x_2} + p_i D_i(p_1,p_2) \right\} - r V_i = 0, \\ (x_1,x_2) \in \mathbb {R}^2_+, \\ \left. V_i\right| _{x_i=0} = 0, \quad \left. V_i\right| _{x_j=0} = u_0(x_i), \quad \quad i = 1,2, \quad j \ne i, \end{aligned}$$

where \(u_0\) given in (36) is the monopoly value function.

In [17], the following asymptotic approximation is constructed in the small \(\epsilon \) limit. The value function of player \(i\) is expanded as

$$\begin{aligned} V_i(x_1,x_2) = u_0(x_i) + \epsilon v_i^{(1)}(x_1,x_2) + \mathcal {O}(\epsilon ^2). \end{aligned}$$

The correction \(v_i^{(1)}\) is given, for \(x_1 > x_2\), by

$$\begin{aligned} v_1^{(1)}(x_1,x_2)&= \frac{1}{4 r} \left( e^{-r \Lambda (x_2)} \left( 1 + r \Lambda (x_2) \right) - e^{-r \Lambda (x_1)} \left( 1 - r \Lambda (x_2) \right) \right. \nonumber \\&+ \left. e^{-r \left( \Lambda (x_1) + \Lambda (x_2) \right) } - 1 \right) , \end{aligned}$$
(58)

where \(\Lambda (x) = - \frac{1}{r} \log \left( - \mathbb {W}\left( \theta (x) \right) \right) \), and, for \(x_2 \ge x_1\), by reversing the roles of \(x_1\) and \(x_2\) in (58). The solution for \(v_2^{(1)}\) is the same: \(v_2^{(1)} = v_1^{(1)}\). From these, approximations to the Nash equilibrium prices and demands can be computed, and hence approximate game trajectories \(x_i(t)\).

Numerical Example In the two-player game, the two firms have sizes 0.25 and 0.75 respectively, while the continuum MFG approximation uses two (equally weighted) delta functions centered at 0.25 and 0.75. See Fig. 6 for the capacity trajectories in the monopoly case (dotted), computed using the two-player asymptotic expansion (dashed), and the MFG approximation (solid).

Fig. 6
figure 6

MFG approximation for two-player game (solid), compared with the asymptotic expansion (dashed) and the monopoly solution (dotted). Here we take \(\epsilon = 0.3\).

We notice that the MFG approximation predicts a more cautious behavior since the firms are producing at a slower pace than the two-player solution. However, while the continuum MFG overstates the extent of competition when used to approximate the 2-player game, the trajectories are remarkably close.

7 Conclusion

We have studied nonzero-sum stochastic differential games arising from Bertrand competitions of mean field type with linear demand functions in the limit of an infinite number of players. By considering the case where there is a small degree of interaction between the firms, we are able to construct an asymptotic approximation that captures many of the qualitative features of the ordinary differential games. Numerical solutions provide further insight into the stochastic case and when there is a higher degree of competition. By considering the tail distribution instead of the density itself, numerical solution becomes very tractable.

We find that, in the presence of competition, firms tend to be more cautious and slow down their production, and hence the duration of the game increases. Moreover, firms find themselves left with a higher production capacity as the game proceeds, and therefore total production \(Q\) goes up even though each individual firm reduces their production level compared to the monopoly case. This leads to a more stable output level throughout the lifetime production profile.

Moreover, we consider the case where the initial distribution of the production capacity is a sum of delta functions. This setting mimics the case of finite player games and allows us to compare the MFG solution with the two-player asymptotic solution. Surprisingly, as seen in Fig. 6, the game trajectories are quite close even when approximating a two-player game. Therefore the continuum MFG technology has excellent promise in approximating very difficult nonzero-sum differential game problems with a small number of players.