Cournot market competition simulations

Spanos Ioannis

This presentation is a Jupiter Notebook, so that we can interactively run python code. It is accompanied by a script writen in python, linked bellow.

https://github.com/ispanos/CournotGame

This file also serves as documentation for the aforementioned script and is published under the MIT licence.

Copyright 2021 Spanos Ioannis, github.com/ispanos

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Defining our market

We assume the linear Inverse Demand Curve, $$ P = A - B*Q $$ where P is the Price and Q is the total demand.

We also assume that the first derivatives of the Cost Curves of our companies are:

$$ MC_{i} = K_{i} + M_{i}q_{i} $$

where i is the number of the company. In our case, in the beginning there are 3 companies.

Calculating production levels

Best Responses

Since the companies are in a Cournot market game, each one of them is going to maximize its profits, by adjusting its production, according to the demand and its competitor's production.

$$max\Pi_{i}(q_{i}) => MR_{i} = MC_{i}\ (1)$$$$...$$$$for\ i =1,\ (1)\ =>\ (M_{1} + 2*B)*q_{1} + B*q_{2} + B*q_{3} = A - K_{1}$$$$for\ i =2,\ (1)\ =>\ B*q_{1} + (M_{2} + 2*B)*q_{2} + B*q_{3} = A - K_{2}$$$$for\ i =3,\ (1)\ =>\ B*q_{1} + B*q_{2} + (M_{3} + 2*B)*q_{3} = A - K_{3}$$$$Or$$$$ \begin{bmatrix} (M_{1} + 2*B) & B & B \\ B & (M_{2} + 2*B) & B \\ B & B & (M_{3} + 2*B) \end{bmatrix}* \begin{bmatrix} q_{1} \\ q_{2} \\ q_{3} \end{bmatrix}= \begin{bmatrix} A - K_{1} \\ A - K_{2} \\ A - K_{3} \end{bmatrix} $$

Merger

Marginal Cost

After companies i and j merge, we add the two marginal cost curves horizontally:

$$ q_{m} = q_{i(MC_{i})} + q_{j(MC_{j})}, $$

where $q_{m(MC_{m})}$ is the inverse marginal cost curve of the new company, named m.

The new company, has now the following marginal cost:

$$ MC_{m} = \frac{M_{j}*K_{i} + M_{i}*K_{j}} {M_{i} + M_{j}} + \frac{M_{i}*M_{j}}{M_{i}+M_{j}}*q_{m} $$$$Or$$$$ MC_{m} = K_{m} + M_{m}*q_{m} $$

Best Responses

The new company, and the one that wasn't included in the merger, compete again on the amount of output they will produce.

$$max\Pi_{i}(q_{i}) => MR_{i} = MC_{i}\ (1)$$$$...$$$$for\ i =1,\ (1)\ =>\ (M_{m} + 2*B)*q_{m} + B*q_{2} = A - K_{m}$$$$for\ i =2,\ (1)\ =>\ B*q_{1} + (M_{2} + 2*B)*q_{2} = A - K_{2}$$$$Or$$$$ \begin{bmatrix} (M_{m} + 2*B) & B \\ B & (M_{2} + 2*B) \\ \end{bmatrix}* \begin{bmatrix} q_{m}\\ q_{2} \end{bmatrix}= \begin{bmatrix} A - K_{m}\\ A - K_{2} \end{bmatrix} $$

Edge Cases

     To reduce the complexity of the python function, that calculates the marginal cost curve of the new company, I'm working under the assumption that the demand is relatively high. The script does not work in cases where the demand is so low that the company is better off using only one of the two facilities at its disposal.

     Furthermore, if one of the companies has a constant marginal cost, and the other one has a linear marginal cost, the script terminates. In cases like that, its likely that the new company manufactures only in the facilities with the constant marginal cost. Still, a very high constant marginal cost could be suboptimal, compared to a low, yet variable marginal cost.

     These checks can't be done in the merge_companies() function without increasing the complexity of the Company object. Then, for every 2 companies that have merged, with that specific combination of marginal costs, our calculations would have to increase exponentially.

     To manually find if the company is going to produce in both facilities or not, calculate $q_{m}$, solve for $MC_{m}$ and run the function set_cournot_production(demand, companies) for all 3 possible $MC_{m}$ curves. Out of the three possible outcomes, select the marginal cost curve that maximizes the profits of company m.

Cournot market game for N companies

We observe that the matrix that solves for the production units of each company, follows a clear pattern.

On the left side, the diagonal, is

$$ (MC_{i} + 2 *B),\ where\ i = 1, 2, 3 ... N,\ for\ N\ companies $$

On the right side, $$ (A - K_{i}),\ where\ i = 1, 2, 3 ... N,\ for\ N\ companies $$

In order to create a function (in Python) to calculate the units of production for any number of companies we:

  1. Create an N x N matrix, X, where every element is B, the slope of the inverse demand curve
  2. Two N x 1 arrays that are composed of the elements mentioned above, $$ X:\ \begin{bmatrix} B\ B\ B\ ... B\\ B\ B\ B\ ... B\\ ...\ ...\ ...\\ B\ B\ B\ ... B\\ \end{bmatrix}\ ,\ D:\ \begin{bmatrix} MC_{1} + 2 *B\\ MC_{2} + 2 *B\\ MC_{3} + 2 *B\\ ...\\ MC_{N} + 2 *B\\ \end{bmatrix}\ and\ U:\ \begin{bmatrix} (A - K_{1})\\ (A - K_{2})\\ (A - K_{3})\\ ...\\ (A - K_{N})\\ \end{bmatrix} $$

  3. Replace the diagonal of matrix X, with matrix D to create matrix H.

  4. Finally, if we solve $H*q = U$ for $q$, we get the production units for every company competing in the market.

Simulations

Three-way game with one merger

Let's start with 3 companies with the following marginal cost curves:

Company 1: $MC_{1}\ =\ 2.71\ +\ 5.34*q_{1}$,

Company 2: $MC_{2}\ =\ 6.13\ +\ 1.11*q_{2}$,

Company 3: $MC_{3}\ =\ 4.75\ +\ 1.53*q_{3}$

With an inverse demand curve : $P = 2221.08 - 15.81*Q$

Merger Paradox

     As we simulate the mergers of two companies, by adding their $q_{(mc)}$ horizontally, we can observe that the resulting companies produce fewer units. The competing companies are now fewer, thus the HHI index increases after the merger. The new equilibrium is closer to the equilibrium of a monopoly. However, the profits of the newly created company are less than the sum of the profits of the companies that merged. None of the above mergers are profitable, and the companies would rather compete than merge.

     The company that benefits from the merger is the one that did not take part in it. This happens because both its market share, and the market price, increase.

     The conclusion is that neither the consumers, nor the companies that took part in the merger, benefit from the merger. The only beneficiary is the company that did not take part in the merger.

Consecutive mergers with 7 companies

     Now, lets simulate a market comprized of more comprised, given that we are able to add as many companies as we want in the simulation.

Table of total profits

Companies Not merged Merged
1, 2 €8811.76 €6822.04
1, 2, 3 €13928.99 €9642.67
1, 2, 3, 4 €18199.28 €13545.94
1, 2, ..., 5 €23073.35 €20906.78
1, 2, ..., 6 €28141.39 €36541.23

     Only after 5 consecutive mergers did we see an increase in the profitability of the new company, compared to the pre-merge conditions. The new company, named "1&2&3&4&5&6" in the above code-block, has a €36541.23 profit. The above mentioned event is mainly attributable to the significant decline of competition. The HHI index is now three times higher than before. The price is more than two times higher, and the production is 25% lower.

     Furthermore, the mergers that include less than 6 companiesare not profitable, hence the companies would rather compete than merge.

     In a real market however, a merger like that would create a huge dead weight loss and such a price increase, that no committee would ever allow such a merger to take place.

Non symmetrical costs

     If companies 1 and 2 merge, the merger is profitable. However, the constant part of $MC_{1\&2}$ is almost double than that of $MC_{2}$, so we have to make sure that the merged company is actually producing only in the facilities of company 2. So we use $MC_{2}=MC_{1\&2}$

     Company "1&2" produces in both facilities, because the profits are now lower than before.

     The reason that Company 1 and Company 2's merger is profitable, is due to the asymmetry of the marginal costs. The price increased by 22%, and the third company is almost 50% more profitable. The total production is exactly the same. All in all, the merger is probably going to be prevented by the competition committee.