Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

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, scroll down to the code cells and run them sequentially.

Preliminaries

Consider a demand curve of the form:

qi=AbPiq_i = A - b \cdot P_i

Its associated inverse demand function will be:

P(qi)=Ab1bqiP(q_i) = \frac{A}{b} - \frac{1}{b} \cdot q_i

Total Revenue TR(qi)=P(qi)qiTR(q_i) = P(q_i) \cdot q_i can be differentiated to find

MR(qi)=Ab2bqi=P1bqiMR(q_i) = \frac{A}{b} - \frac{2}{b} \cdot q_i = P - \frac{1}{b} \cdot q_i

and we can find an expression for the gap

P(qi)MR(qi)=qibP(q_i) - MR(q_i) = \frac{q_i}{b}

This is also the firm’s markup over marginal cost PMCP-MC (since MR=MCMR=MC).

Note the larger is bb, the more firm sales fall for a given price rise (i.e. the more elastic is demand).

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:

TC(qi)=F+cqiTC(q_i) = F + c \cdot q_i

hence MC(qi)=cMC(q_i) = c and average cost is

AC(qi)=Fqi+cAC(q_i) = \frac{F}{q_i} + c

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 ii’s good is:

qi=S[1nb(PiPˉ)]q_i = S \cdot \left [\frac{1}{n} - b \cdot (P_i - \bar{P}) \right ]

Here SS is total output in the industry. If firm sets product price PiP_i equal to price of other similar products Pˉ\bar{P} then firm will produce qi=Snq_i = \frac{S}{n} of total output. If it tries to raise Pi>PˉP_i > \bar{P} it loses some but not all market share.

Expanding out the earlier inverse demand equation:

qi=[Sn+bPˉS]bPSq_i = \left [\frac{S}{n} + b\bar{P} \cdot S \right ] - b P S

which we can invert to get an inverse demand curve for each firm.

Monopolistically competitive market with free entry will drive P=ACP=AC and hence profits to zero.

Source
import numpy as np
import matplotlib.pyplot as plt
from ipywidgets import interact, fixed
Source
plt.style.use('seaborn-v0_8-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)
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)
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 P=ACP=AC. The MRMR curve is not drawn, but it would cross the horizontal marginal cost curve to determine the equilibrium quantity.

firm(S=S/20, F=F, c=c)
<Figure size 1000x600 with 1 Axes>

Below we can see the effect of increasing market size. As market size SS increases from S=50,000S=50{,}000 to S=200,000S=200{,}000, the demand curve for each firm shifts out and becomes more elastic (flatter). However, any temporary new profits earned will attract new entrants, and we end up at a new equilibrium with a new P=ACP=AC further down the firm’s ACAC curve, as shown.

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 cost curve).

firm(S=50000, F=F, c=c)
firm(S=200000, F=F, c=c)
<Figure size 1000x600 with 1 Axes>

Solving for equilibrium nn and Pˉ\bar P

In a symmetric equilibrium Pi=PˉP_i = \bar{P} then qi=q=Snq_i = q = \frac{S}{n} or S=nqS = n \cdot q

qi=[Sn+bPˉS]SbPq_i = \left [\frac{S}{n} + b\bar{P} \cdot S \right ] - S b P

The cc curve

Average cost ACAC rises with the number of firms nn, because more firms in the same market means lower production runs and higher average fixed costs.

Substituting q=Snq = \frac{S}{n} into AC=Fq+cAC = \frac{F}{q} + c:

AC=nFS+cAC = \frac{nF}{S} + c

Average cost rises with the number of firms nn because each firm produces less (Sn)\left(\frac{S}{n}\right) and so each firm is spreading their fixed costs over fewer units of output.

The pp curve

Price falls with the number of firms nn because increased competition reduces markups.

In a symmetric equilibrium firm demand could be written:

qi=[Sn+bPˉS]SbP=AbPq_i = \left [\frac{S}{n} + b\bar{P} \cdot S \right ] - S b P = A' - b' P

Recall that with a demand curve of form qi=AbPq_i = A^\prime - b^\prime \cdot P we found a markup

P=c+qbP = c + \frac{q}{b^\prime}

Substituting using b=Sbb^\prime = S\cdot b, and q=Snq=\frac{S}{n} we get:

P=c+1bnP = c + \frac{1}{b \cdot n}
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
<Figure size 1000x600 with 1 Axes>

Here we can see the effect of opening to trade (the potential market for each firm now becomes the sum of the country markets SS). Here we suppose four equal-size countries open up to each other (the graph then becomes a depiction of the integrated world market).

The result is lower prices and average cost and a higher number of product varieties nn.

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
<Figure size 1000x600 with 1 Axes>

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 n=22n=22 in each country (88 firms in total, but only 22 products) to a world total of n=45n=45 firms and products. Each country now has just 11 firms but each of these firms now has much larger production runs (q=4,472q=4{,}472 after opening to trade compared to q=2,236q=2{,}236 in the closed economy).

The price (and average cost) of each product falls from 75to75 to 52 and the number of product varieties rises from 22 to 45.

Below, we put the firm-level and market-level graphs side-by-side.

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
<Figure size 1000x600 with 2 Axes>

And after the countries open to trade:

twopane(S,F,c)
n = 100, P= 40, q = 10000, F/q =  10
<Figure size 1000x600 with 2 Axes>