IRS, Product Variety, and Trade#
Here is a presentation and simulation of a model of “Increasing Returns to Scale, monopolistic competition and Trade” based on the Krugman (1979) article by the same name in the Journal of International Economics with the following simplifications and adaptations:
model and graph analysis simplified to be similar to Krugman, Obstfeld, Melitz textbook.
We use the linear demand setup from Salop, S. (1979) “Monopolistic Competition with Outside Goods,” Bell Journal of Economics
This is a jupyter notebook with executable python code for the graphs and simulations. If you want to execute and interact with the content below please first go to the Code Section below, execute the code there and then return. Also, if running on Microsoft azure notebooks ‘Change the kernel’ to python 3.6.
Preliminaries#
Consider a demand curve of the form:
It’s associated inverse demand function will be:
$
Total Revenue
and we can find an expression for the gap
$
This is also the firm’s markup over marginal cost
Note the larger is
Firm Technology and Costs#
Each firm has exclusive right to produce a unique product (protected by patent or copyright) but competitors can enter the market to supply similar goods. There is a relatively high fixed cost of establishing a production plant and then a simple constant marginal cost:
hence
Demand for Product Variety#
Consumers demand variety. Products are symmetric substitutes in consumption. Salop (1979) constructs a model with linear demands
assume symmetric demand for each good. Demand for firm
Here
Expanding out the earlier inverse demand equation:
which we can invert to get an inverse demand curve for each firm.
Monopolistically competitive market with entry will drive
Show code cell source
import numpy as np
import matplotlib.pyplot as plt
from ipywidgets import interact, fixed
import seaborn as sns
Show code cell source
plt.style.use('seaborn-colorblind')
plt.rcParams["figure.figsize"] = [6,6]
plt.rcParams["axes.spines.right"] = False
plt.rcParams["axes.spines.top"] = False
plt.rcParams["font.size"] = 18
plt.rcParams['figure.figsize'] = (10, 6)
plt.rcParams['axes.grid']=False
A = 100000
b = 1/1000
F = 100*1000
c = 30
S = 1*1000*1000
qmax = 100
nmax = 50
q = np.arange(1,qmax)
n = np.arange(1,nmax)
Show code cell source
def p(q, A=A, b = b):
return A/b - (1/b) * q
def mr(q, A=A, b = b):
return A/b - (2/b) * q
def AC(q, F=F, c = c):
return F/q + c
def mc(q, c = c):
return c*np.ones(len(q))
def cc(n, S=S, F=F, c = c):
return n*F/S + c
def pp(n, b=b, c = c):
return c + 1/(b*n)
Show code cell source
def firm(S =S, F=F, c=c):
qmax = 15000
ne = np.sqrt(S/(b*F))
Pe = c + np.sqrt(F/(S*b))
qe = S/ne
q = np.arange(1,qmax)
plt.xlim(0,12000)
plt.ylim(0,125)
plt.plot(q, p(q, A=(S/ne+b*S*Pe), b = b*S))
plt.plot(q, mr(q, A, b), color='b')
plt.plot(q, mc(q, c))
plt.xlabel('q')
plt.ylabel('P, AC')
plt.plot(q, AC(q, F, c))
plt.scatter(qe,AC(qe,F,c))
plt.vlines(qe,0,Pe, linestyle=":")
plt.hlines(Pe,0,qe, linestyle=":");
The following shows a firm in a long run equilibrium where
firm(S=S/20, F=F, c=c)

Below we can see the effect of increasing market size. As market size
Hence, closed economy countries with larger market size will have more firms/product variety, lower equilibrium prices, and higher labor productivity (since each firm is further down its average product curve).
firm(S=50000, F=F, c=c)
firm(S=200000, F=F, c=c)

Solving for equilibrium and #
In a symmetric equilibrium
The cc
curve#
Average cost AC rises with the number of firms 𝑛 , because more firms in the same market means lower production runs and higher average fixed costs.
Substiting
Average cost rises with the number of firms
The pp
curve#
Price falls with the number of firms 𝑛 because increased competition reduces markups.
In a symmetric equilibrium firm demand could be written
$
Recall that with a demand curve of form
Substituting using
Show code cell source
def mkt_eq(S = S, F=F, c=c):
nmax = 150
n = np.arange(1,nmax)
ne = np.sqrt(S/(b*F))
Pe = c + np.sqrt(F/(S*b))
AC = c + ne*F/S
print(f"n = {ne:2.0f}, P={Pe:3.0f}, q = {S/ne:5.0f}, F/q = {ne*F/S:3.0f}")
plt.xlim(0,150)
plt.ylim(0,125)
plt.xlabel('n')
plt.ylabel('P, AC')
plt.plot(n, cc(n, S=S, F=F, c = c), color='b')
plt.plot(n, pp(n, b=b, c = c), color='g')
plt.text(nmax,pp(nmax),"pp")
ntop = (100-c)*S/F
plt.text(min(nmax,ntop), cc(min(ntop,nmax),S=S, F=F, c = c), "cc")
plt.scatter(ne,Pe)
plt.hlines(Pe,0,ne,linestyle=":")
plt.vlines(ne,0,Pe,linestyle=":")
mkt_eq(S=200000, F=F, c=c)
n = 45, P= 52, q = 4472, F/q = 22

Here we can see the effect of Opening to Trade (the potential market for each firm now becomes the sum of the country
The result is lower prices and average cost and a higher number of product varieties
mkt_eq(S=50000, F=F, c=c)
mkt_eq(S=200000, F=F, c=c)
n = 22, P= 75, q = 2236, F/q = 45
n = 45, P= 52, q = 4472, F/q = 22

In the example above each country now sells to the entire world market, so the size of each country’s market in effect quadruples. The total number of firms (and products) goes from
The price (and average cost) of each product falls from $75 to $52 and the number of product varieties rises from 22 to 32.
Below, we put the firm-level and market-level graphs side-by-side.
Show code cell source
def twopane(S, F, c):
plt.figure()
ax = plt.subplot(121)
firm(S,F,c)
ax= plt.subplot(122)
mkt_eq(S,F,c);
Here is the country when closed to trade:
twopane(50000,F,c)
n = 22, P= 75, q = 2236, F/q = 45

And after the countries open to trade.
twopane(S,F,c)
n = 100, P= 40, q = 10000, F/q = 10
