In 1929, Harold Hotelling published his pioneering paper “Stability in competition”. He proposed that firms tend to gravitate towards one another as they try to attract their competitors’ customers, resulting in minimum product differentiation – a finding that has since become known as Hotelling's Law. Today, Hotelling’s Law is one the most influential and well-known microeconomic findings. The original Hotelling model for spatial competition is considered a paradigmatic example of an analytical economic model by Reiss1. It has seen many extensions and has even been applied to explain parties’ political programme in election races23. My simulation is a generalisation of this model and illustrates several phenomena related to spatial competition, like product differentiation. It can be used to study the effect of relaxing assumptions from Hotelling’s original model. Moreover, it demonstrates the benefits of agent-based modelling for economic theory and for teaching by illustrating that analytical results are not always robust to all intuitive variations of a model.
The simulation, “Generalisation of the Hotelling Model”, models firms’ and customers’ decisions in one- and two-dimensional markets and analyses the macro-level outcomes and patterns produced by the agents’ decisions and interactions. The user can observe which prices firms set, how they move, and what happens if elastic or flexible demand are introduced. I show that Hotelling’s Law does not hold in general, reproduce previous findings, and argue that the simulation which Ottino-Loffler et al.4 present as a generalisation for two dimensions and multiple firms is not robust to elastic and flexible demand.
I describe my program and the logic of my agents in section 2, and relate my project to previous research on Hotelling’s Law in section 3. I describe my simulation’s results and support them with a descriptive statistical analysis of my computational experiments in section 4. Section 5 discusses the role of agent-based modelling for economic theory and teaching. Section 6 concludes.
My simulation is written in the NetLogo agent-based modelling language5. There are two types of agents: shops and customers. The agents are placed on a line or on a plane, depending on the setting chosen. My program’s concept can be characterised by two main rules: Shops try to maximize their revenues, and customers buy from the shop with the lowest sum of price and distance. Simulation interface and code and generated data are available upon request. For a detailed description of my code see the comments in the “Code” tab of my simulation.
The agents and their variables are initialised using the setup button. The simulation consists of different rounds (ticks), which are prompted by the go and the go forever buttons. Each round, shops sequentially choose their location and/or their price according to the decision rule selected by the user. Then, customers’ shop preferences are updated. If the user enables some type of customer movement, the customers move accordingly and update their shop preferences afterwards. In the end, the customers are coloured, the shops’ demand and revenue calculated, and the measures for analysing the simulation updated. The simulation stops automatically after 1000 rounds.
Visualisation and Layout
The simulation’s interface allows the user to vary parameters and enable or disable certain features. The plots keep track of the prices the shops set, the revenues they generate, and their distance to their closest competitor. Two output fields monitor the number of local oligopolies6 that have emerged on the market and the size of the largest oligopoly.
Each customer adds up price and distance for each shop. The sum represents the costs of acquiring a good. Customers choose to buy from the store that offers the lowest sum. Customers will thus ceteris paribus prefer to buy from a shop that is closer to them. In the event of a tie, the customer chooses randomly. If demand elasticity is introduced, the customers choose not to buy if the costs of acquiring a good exceed their individual valuation for the good. Customers are coloured after the shop they buy from. If they choose not to buy, they are coloured black.
Customers can move if this feature is enabled in the interface (flexible demand). This represents a change in their preferences. In my simulation, customers can combine different types of movement. They move after the shops have made their price and position choices, adjusting their preferences to their peers and to the shops. Customers’ range of movement, like that of shops, is coupled to maxMovement. Customers can herd, that is, they move towards the point on the plane with the highest customer density. They can move towards trendsetters, and they can move towards shops. This targeted movement is combined with random movement to avoid all customers gathering on one point. Random movement also represents factors that the different types of targeted movement do not capture.
Shops try to maximize their revenues. They make choices about their position and their price based on the current location of their competitors and based on the position of customers at the beginning of each round. Shops can correctly predict their share of customers after any location and/or price changes. There are different settings to represent different types of choice behaviour (RulesShops). They make their decision without any knowledge of their competitors’ strategies, and shops do not have costs. Shops’ initial prices are set randomly in a range from one to ten.
For price choices, shops consider different prices and choose the one that, given the current distribution of customers, promises the highest revenue. Shops consider prices in a range of maxPriceChange based on their current price. Shop’s prices are displayed next to them. For position choices, shops consider the area surrounding them in a range of maxMovement.
My simulation builds on Hotelling’s model of spatial competition and its interpretation in the NetLogo simulation by Ottino, Stonedahl and Wilensky. In this section, I introduce Hotelling’s model and Hotelling’s Law and give a brief overview on the NetLogo simulation by Ottino, Stonedahl and Wilensky and its results.
Hotelling’s Spatial Competition Model
Figure 1 depicts Hotelling’s spatial competition model7. Hotelling analyses the profit-maximizing positioning and pricing behaviour of two shops on a line of length l. The two firms A (blue) and B (grey) set prices pA and pB, competing to sell their product to static customers uniformly distributed along the line. Hotelling first derives the shops’ profit-maximizing prices and their corresponding revenues, assuming that the shops’ positions are fixed. He then relaxes this assumption to analyse the location shops would choose.
Hotelling assumes that shops face no costs and that their demand is given by their share of the customers (a+x and b+y, respectively). He additionally assumes that demand is inelastic, i.e. that customers do not react to price changes, and that they retrieve their purchases from a shop at a transportation cost c per unit of distance. Customers buy from the shop which offers the lowest sum of price and transportation costs. He finds that the cheaper shop gravitates towards the more expensive shop. The cheaper shop will move closer until “the sharper competition […] due to proximity is offset by the greater body of buyers”8.
Hotelling’s Law holds that all firms in a multi-dimensional market will move together as closely as possible.
Hotelling describes the strategic interaction of two shops. His model’s setting is very reminiscent of a game with sequential decision making: First A chooses its position, then B chooses its position. Both shops maximize profits, which solely depend on their position: Profit-maximizing prices are a function of the shops’ locations. Hotelling’s interpretation of the decision problem demands further consideration. If we modify the game, do the results hold? What happens, for example, if A can react to B’s movement, or if we include more firms? In my NetLogo simulation, I interpret the scenario as a repeated game and include more firms.
My simulation represents Hotelling’s model if numShops is set to two and Settings is set to one dimension (see Figure 2). Customer’s transportation costs equal the distance to the shop. Shops act sequentially according to the chosen decision rule. My simulation replicates Hotelling’s findings for his model, with further options: It includes additional features to relax some of Hotelling’s assumptions and to analyse the effects. Does Hotelling’s Law hold, for example, if we increase the number of firms or dimensions, if demand is elastic, or if customers can move?
NetLogo Simulation by Ottino, Stonedahl and Wilensky
Economists have designed multiple extensions to the Hotelling model to relax its assumptions. In “Spatial Competition with Interacting Agents”, Bertrand Ottino-Loffler, Forrest Stonedahl, Vipin Veetil and Uri Wilensky present “an agent-based simulation model to study spatial competition in a two-dimensional space with multiple firms”9. Their simulation, “Hotelling’s Law model”, is freely accessible in the NetLogo’s models library10. My simulation’s logic differs from theirs and adds additional features. It also suggests that their generalisation is not robust to elastic and flexible demand
Ottino-Loffler et al. run their simulation 500 times and record the results at the end of each run. They statistically analyse these computational experiments and present three findings. My simulation confirms their findings, with one exception.
(1) “The principle of minimum differentiation does not hold in general.”11
According to their simulation, Hotelling’s Law holds when there are two firms, but not when there are more. The shops do not form one large cluster, as predicted by Hotelling’s Law. The authors plot the minimum and the maximum distance between firms at the end of each run and show that with three or more firms, some converge on the same location while others choose a location further away. The shops take characteristic, symmetrical positions on the plane. My simulation confirms this finding, and additionally suggests that Hotelling’s Law does not hold for elastic demand either.
(2) “Local duopolies emerge from the interaction between firms.” 12
Ottino-Loffler et al. observe that the shops “form pairs, but never triples or groups of other sizes”13. Only local duopolies and monopolies emerge from the interaction. My simulation contradicts this. Firms do form larger clusters if prompted by a high customer density. If we allow for targeted customer movement and a lot of customers gather in one region as a result, shops are drawn to these regions and form large clusters.
(3) “Firms charge lower prices in more competitive regions.”14
This finding consists of two distinct observations: First, Ottino-Loffler et al. show that there is a positive relation between the distance to a firm’s nearest competitor and its price. The closer shops move towards one another, the more competition and the lower the price. Second, the authors suggest that prices are related to a shop’s position on the plane. They argue that the edges of the plane are less competitive because shops do not face competitors in all directions. Some shops move to the periphery and charge high prices for a small area, while others compete over a larger region in the middle. Ottino-Loffler et al. do not provide a statistical analysis to support this, but their simulation produces this phenomenon. My simulation confirms both observations.
In this section, I describe my simulation’s properties and results, point out the most interesting observations, and explain the economic mechanisms driving them. I show what my simulation reveals about the robustness of Hotelling’s Law, the number and size of local oligopolies emerging over time, and the relation between a shop’s location and its price. I support my findings with a statistical analysis of my simulation’s properties. For this, I employ NetLogo’s inbuilt BehaviourSpace tool to run computational experiments.
Robustness of Hotelling’s Law
I find that shops sometimes, but not always, form one large cluster, and that Hotelling’s Law therefore does not hold in general; Hotelling’s Law does not hold if demand is elastic, and flexible demand reduces product differentiation. I argue that the model presented by Ottino-Loffler et al. is robust to neither elastic nor flexible demand.
Hotelling’s Law predicts minimum product differentiation. To evaluate whether all shops indeed gather in one place, I measure the distance between shops and their competitors. I, like Ottino-Loffler et al.15, record shops’ minimum and maximum distance from their competitors at the end of each run. For a detailed overview of the experiment’s setup, see Table 1: Computational experiment "Robustness of Hotelling's Law".
If Hotelling’s Law applies, we expect both shops’ minimum and maximum distance from their competitors to be close to zero: If a shop’s minimum distance to its competitor is close to zero, we know that a cluster of at least two firms has formed. If we observe that the maximum distance of a shop to its competitor is close to zero, that means that all firms form one cluster. In other words, a minimum distance close to zero is sufficient to confirm Hotelling’s Law, a maximum distance close to zero is necessary.
Shops sometimes, but not always, form one large cluster. Hotelling’s Law predicts that firms form one large cluster. However, this is not always the case: Hotelling’s Law therefore does not hold in general.
As illustrated by Figure 4, most shops’ minimum distance to competitors will approach zero during the run of the simulation, no matter the number of shops created in the simulation. We observe many duopolies. Figure 5 shows that full clusters are rarer.
Hotelling’s Law does not hold if demand is elastic. With elastic demand, shops are drawn apart because they react to the loss of customers on the edge. Hotelling suggests this result in his paper16. Figure 9 shows that elastic demand increases shops’ minimum distance to their competitors. If customers can ceteris paribus decide not to buy, shops will be relatively further away from their closest competitor. Observing a large minimum distance means that the prediction by Hotelling’s Law does not hold. Thus, Hotelling’s Law is not robust to elastic demand. This result moreover suggests that Ottino-Loffler et al.’ s generalisation of spatial competition is not robust to elastic demand: The outcome of their simulation would be altered by introducing elastic demand; causing their duopolies to be drawn apart.
Flexible demand reduces product differentiation. If demand is flexible, i.e. if customers can move, any type of patterned movement that increases the density of customers lowers product differentiation. A high customer density draws in shops because it promises a sales increase (see Figure 6). Herding behaviour, movement towards trendsetters, and any type of customer movement towards shops change the distribution of customers and tend to increase customer density. This lowers the shops’ maximum distance to their competitors, creating large oligopolies (see Figure 10, Figure 11, and Figure 12). Thus, flexible demand reduces product differentiation. This means that Hotelling’s Law is robust to any changes in the distribution of customers which increase the customer density.
Additionally, this property of my simulation shows that there are cases where all shops form one large oligopoly. The simulation by Ottino, Stonedahl, and Wilensky does not include flexible demand. Therefore, Ottino-Loffler et al. do not consider its effects and find that “firms do not form one large cluster”17. The spatial competition model the authors present is thus not robust to flexible demand.
Relationship between prices and competition
However, the general intuition behind Hotelling’s Law holds: The more direct competition, the lower the price charged. Shops’ prices depend on the distance to their competitors. Economic theory suggests this finding as well: Shops who do not face close competitors succeed in creating a local monopoly, charging higher prices. Prices are lower in local oligopolies.
Figure 7 shows that the relation between a shop’s price and competition creates specific patterns: If shops can only move and try to maximize their revenue given their randomly assigned price, shops with higher prices find their niche at the less competitive edges of the market, where they do not face competition from all sides. Shops with lower prices move to the more competitive centre of the market, where they can obtain larger customer shares. We also see that firms with similar prices move closer to compete over customers, while shops with a much higher price than their closest competitor try to move away from competition to keep their market share.
As illustrated by Figure 8, the further shops are away from their closest competitor, i.e. the less direct competition they face, the higher the prices they set (see Table 2: Computational experiment "Relation between Price and Distance"). This result confirms Ottino-Loffler et al.’s third finding that “[f]irms charge lower prices in more competitive regions”18.
My simulation and its results suggest that agent-based modelling could benefit both economic theory and teaching: Agent-based modelling draws attention to the potential lack of robustness of analytical results and illustrates the effects of relaxing assumptions. I argue that simulations could support and complement economic analysis in bridging the gap between economic theory and reality, and that they are a useful teaching tool, raising awareness for the impact of (implicit) assumptions one textbook model outcomes.
Agent-based modelling is especially well-suited to complement microeconomic theory because it allows one to observe the macro-level outcomes of individual decision making. Simulations allow a comprehensive and intuitive access to studying the effects of extending a model and relaxing its assumptions. The economist can explore whether her analytical results are robust to all intuitive variations of the model. Simulations thus help the economist bridge the gap between her theoretical work and reality through robustness checks. Agent-based modelling can inspire further research and complement analytical work that way. There are three distinct challenges to economic modelling where simulations may prove especially useful: analysis beyond methodological individualism, preference changes, and analytical intractability.
• Simulations provide the opportunity to supplement microeconomic models with heterogenous agents and a richer perspective on group behaviour. Simulations therefore facilitate economic analysis beyond methodological individualism.
• Simulations allow the economist to explore the effect of preference changes. Orthodox economic theory treats preferences as static because individuals’ preferences are not directly observable. Any economic phenomenon could be explained by a change in individuals’ preferences - this would trump the economic analysis of the incentives, constraints, and of the environment which lead to an economic outcome. However, if we make preference changes visible, we can include them in our model, and simulations allow just that: Customer movement in my simulation represents a change in preferences.
• Simulations can advance microeconomic theory if a problem proves to be difficult to solve analytically. As Ottino-Loffler et al. put it, sometimes “[t]he mathematical intractability of the problem begs for a whole new approach”19. Agent-based modelling offers a way out.
Moreover, agent-based modelling could be used as an interactive teaching tool for economics courses. Simulations provide an intuitive and explorative, even playful access to decision problems, and may facilitate student’s understanding because they are more accessible than calculating the results of a model on the blackboard. Their interface invites students to explore the model and its variations, and their visualisation supports analysis: The simulation shows under which assumptions economic laws hold. Simulations could be used to introduce textbook models such as the Hotelling model to students, raising their awareness of the impact (implicit) assumptions have on the analytical outcome of a model.
However, the results of simulations must be analysed carefully. Computational experiments provide a way to assess their robustness but are limited to the simulation parameters they vary. Nevertheless, if modelling the same problem using different code leads to similar results, those can be taken to be more robust. The explanatory and predictive power of simulations therefore must be assessed just as carefully as that of analytical models.
I introduced my program and its features, relating it to previous work on the Hotelling model. I analysed my simulation’s properties and supported my findings with computational experiments. I showed that while the general intuition behind Hotelling’s Law – that shops charge lower prices if they face more direct competition – is robust, Hotelling’s Law itself does not hold in general. Moreover, the generalisation Ottino-Loffler et al. present for two dimensions and multiple firms is not robust to elastic or flexible demand. Finally, I argued that agent-based modelling could benefit both economic theory and teaching. Simulations pose an interesting and promising complement to analytical modelling both for economic researchers and inside the economics classroom. Hotelling’s writing suggests that he would have endorsed a careful application of his results. He was well-aware of his model’s limitations and writes that "[t]he reasoning, of course, requires modification when applied to the varied conditions of actual life"20. Agent-based modelling can do just that.
Ottino-Loffler et al. 2017.
The measure used to capture the number of local oligopolies may not be accurate if there are very few but large oligopolies.
Hotelling 1990, 54.
Hotelling 1990, p. 59.
Ottino-Loffler et al. 2017, p. 2.
Ottino et al. 2009.
Ottino-Loffler et al. 2017, p. 5.
Ottino-Loffler et al. 2017, p. 6.
Ottino-Loffler et al. 2017, p. 6.
Ottino-Loffler et al. 2017, p. 6.
Ottino-Loffler et al. 2017, p. 5.
Hotelling 1990, p. 63.
Ottino-Loffler et al. 2017, p. 6.
Ottino-Loffler et al. 2017, p. 6.
Ottino-Loffler et al. 2017, p. 3.
Hotelling 1990, p. 62.