Title: Markets and Efficiency Author: Thomas Breuel Institution: UniKL
# 10 manufacturers of equal size
N = 10
capacities = ones(N)
# a range of unit costs
unit_costs = maximum(randn(N)*20.0+100.0,0.0)
Although the numbering for the manufacturers is arbitrary, we sort them by their unit costs; this makes it easier to see how the most efficient manufacturer (rates[0]
) succeeds.
unit_costs = numpy.sort(unit_costs)
There is also a set of $M$ customers, with a wide range of redemption values for the product produced by the manufacturers.
M = 100
redemptions = rand(M)*200.0
We can find the market equilibrium price by looking at the supply and demand curves.
def sdcurves():
prices = linspace(0.0,200.0,10000)
supply = [sum(capacities*(unit_costs<=p)) for p in prices]
demand = [sum(redemptions>=p) for p in prices]
plot(prices,supply)
plot(prices,demand)
sdcurves()
Supply and demand:
# computing the market clearing price
def clearing():
prices = linspace(0.0,200.0,10001)
supply = [sum(capacities*(unit_costs<=p)) for p in prices]
demand = [sum(redemptions>=p) for p in prices]
return prices[find(array(supply)>=array(demand))[0]]
clearing()
179.52000000000001
Long-term investment:
growth_rate = 1e-2
prices = []
capacity_history = []
for month in range(1000):
capacity_history.append(capacities.copy())
c = clearing()
capacities += (c-unit_costs)*growth_rate
capacities = maximum(capacities,0.0)
prices.append(c)
prices = array(prices)
capacity_history = array(capacity_history)
# prices decrease over time
plot(prices)
[<matplotlib.lines.Line2D at 0x7fd29e409410>]
Competition has concentrated the entire production in the most efficient manufacturer.
plot(capacities)
[<matplotlib.lines.Line2D at 0x7fd29e21b2d0>]
Since we only have a single supplier, the supply curve now looks like this.
sdcurves()
The unit cost of the most efficient manufacturer approximately equals the clearing cost.
print unit_costs[0]
print clearing()
59.1998062358 59.2
The rate at which the most efficient manufacturer produces equals the total demand at its unit production cost.
print sum(redemptions>clearing())
print capacities[0]
66 66.0101376417
imshow(capacity_history[::20].T,cmap=cm.Blues)
<matplotlib.image.AxesImage at 0x7fd29e0f1990>
plot(sum(capacity_history,axis=1))
plot(capacity_history[:,0])
plot(capacity_history[:,1])
plot(capacity_history[:,2])
[<matplotlib.lines.Line2D at 0x7fd29e09c190>]
Important Points:
QUESTIONS
EXTENSION
In real life, all manufacturers improve their processes over time. Assume there is a minimum unit cost and that manufacturers move towards that at some rate from their starting rate (i.e., the difference between their unit cost and the minimum cost decreases by some percentage every month). Now there are two growth rates: the growth of manufacturing capacity, and the rate (possibly manufacturer dependent) at which manufacturers improve manufacturing costs.