An Impulse-Regime Switching Game Model of Vertical Competition

We study a new kind of non-zero-sum stochastic differential game with mixed impulse/switching controls, motivated by strategic competition in commodity markets. A representative upstream firm produces a commodity that is used by a representative downstream firm to produce a final consumption good. Both firms can influence the price of the commodity. By shutting down or increasing generation capacities, the upstream firm influences the price with impulses. By switching (or not) to a substitute, the downstream firm influences the drift of the commodity price process. We study the resulting impulse--regime switching game between the two firms, focusing on explicit threshold-type equilibria. Remarkably, this class of games naturally gives rise to multiple Nash equilibria, which we obtain via a verification based approach. We exhibit three types of equilibria depending on the ultimate number of switches by the downstream firm (zero, one or an infinite number of switches). We illustrate the diversification effect provided by vertical integration in the specific case of the crude oil market. Our analysis shows that the diversification gains strongly depend on the pass-through from the crude price to the gasoline price.


Introduction
Since Hotelling's (1931) [18] seminal study of commodity prices, considerable efforts have been undertaken to understand the dynamics of the equilibrium price of commodities and in particular, its long-run properties. The cyclical nature of price dynamics is driven by the substitution effect, whereby consumers will switch to a different commodity if prices rise too high. In a deterministic setting the switching time to the substitute is simple to analyze, but with the stochastic economic cycle consumers face a huge challenge in determining when is the appropriate moment to switch. The succession of booms and busts of commodity prices complicates the switching timing. In the long-run, production capacities adapt to demand and make the price oscillate around a long-term equilibrium. Indeed, the long-run behaviour of commodity prices exhibits super-cycle patterns. The econometric studies in Leon and Soto (1997) [23], Erten and Ocampo (2012) [12], Jacks (2013) [19] and more recently Stuemer (2018) [30], all find the presence of super-cycles of several decades in the price of commodities. This phenomenon makes one wonder whether it is even necessary for the consumers to ever switch and whether it is not preferable to just wait for the prices to crash again.
In this paper we design a dynamic model of competition between production and consumption of a commodity used as an intermediate good, allowing to draw conclusions on the long-run dynamics of the commodity price. In our model, two factors drive the price of the commodity: on the one hand, short-term but persistent shocks of demand and/or production, and on the other hand, strategic decisions of the (representative) upstream production firm and of the (representative) downstream consumer firm. The upstream producer extracts the commodity at cost c p and sells it for a price X. The downstream industry buys the commodity and converts it into a final good that has a price P , non-decreasing in X. This framework covers a wide range of industries. One might think for example, of the agricultural sector where soy enters as an input for the food industry to produce a large range of consumer goods. In the aluminum industry, upstream smelters produce aluminum to be used by the automotive and transportation industries. In the oil industry, the crude is extracted by production firms, then transformed into gasoline and kerosene by downstream refineries, and then consumed in the retail market. For the sake of simplicity, we identify the downstream firm that transforms the commodity with the final consumer and this downstream firm's profit with the consumer's surplus.
We focus on the role of the commodity price X that intrinsically creates competition between the representative agents of producers and consumers. In a nutshell, producers prefer high price X, while consumers prefer low price X. This competition is dynamic and manifests itself through strategic price effects actuated by the two industries. Therefore, X is (partially) jointly controlled by the producers/consumers, leading to game-theoretic impacts.
On the upstream production side, the producer needs the commodity price X to be high enough to make a profit margin. We suppose that the dynamics of investment and disinvestment in upstream production is driven by production capacity shocks that cause jumps in the price X. This assumption is consistent with the theory of real options that predicts the existence of threshold prices triggering the decision of entry and the exit from the market (see MacDonald and Siegel (1986) [25] and Dixit and Pindyck (1994) [11]). It is also consistent with the observations of quick swings in investment and disinvestement in production, see e.g. the boom and bust of commodity prices in 2008-10.
On the downstream consumer side, consumers induce a long-term effect on the commodity price only if they switch to a substitute, and they switch to a substitute only if they anticipate that X will remain high enough for a long time. The downstream side faces slower dynamics because it involves the transformation of many local installations using the commodity. To have an example in mind, one may think of the thousands of adjustments required to change heating systems in buildings, or of the slow effect of the energy saving programs launched by OECD after the 1970s oil shock. Thus, in our model, the downstream market for the final good can be in contraction or expansion regime. The contraction regime corresponds to a decreasing demand for the primary commodity, i.e. the market is abandoning the use of the commodity for a substitute, while the expansion mode corresponds to an increasing demand for the commodity. Depending on the state of the downstream retail market, the drift of the commodity price takes either a constant positive value in the expansion mode or a negative value in the contraction mode. Because such consumer shifts are slow and expensive, the state is persistent (i.e. piecewise constant in time) and changing the state of the final good market incurs heavy switching costs. This toggling of the price trend can be interpreted as endogenous regimeswitching, a common way of modeling commodity prices through the business cycle. Beyond the impact of producers and consumers decisions, the commodity price is subject to exogenous short-term stochastic shocks, captured through a Brownian motion driving risk factor.
Our aim is to construct and characterize the dynamic equilibrium in the commodity market due to this vertical competition. Our major contribution is to provide an endogenous, game-theoretic basis for two key stylized features of commodity markets: (i) super-cycles that manifest as long-term meanreversion; (ii) fundamental impact of supply and demand that maintains the price in a range of values rather than a single equilibrium value. Furthermore, our model allows for three types of equilibria depending on the number of demand switches undertaken by the consumer at equilibrium: zero, one, or an infinite number of switches. All equilibria exhibit the latter qualitative properties. Besides, the higher the consumer's switching cost, the more she is compelled to endure an unfavorable range of prices.
Along the way, we also make mathematical contributions to the literature on non-zero-sum stochastic games (see Martyr and Moriarty (2017) [24], Atard (2018) [4], De Angelis et al. (2018) [13], Aïd et al. (2020) [1]). To our knowledge ours is the first paper that: (i) considers a mixed impulsecontrol/switching-control stochastic game; (ii) explicitly constructs impulse-switching threshold-type equilibria in non-zero-sum games; provides new verification theorems regarding best-response strategies for (iii) an impulsing agent in a regime-switching setting and (iv) switching agent with an impulsed state process. While our solution is non exhaustive in the sense that we a priori focus on a special class of equilibria (leaving open the question of existence of other equilibrium families), it is highly tractable. Namely, we are able to provide closed-form description of the dynamic equilibrium, offering precise quantitative insights regarding the producer and consumer roles and their equilibrium behavior.
To emphasize the latter point, beyond several synthetic examples that illustrate and visualize our model features, we also present a detailed case-study of the diversification effect provided by vertical integration in the crude oil market circa 2019, viewed as a competition between crude oil producers and oil refiners that convert crude into gasoline and other consumer goods. Indeed, the industrial organization of upstream and downstream segments is an important concern both for the anti-trust regulators and for the firms themselves. It is reflected in the extensive economic literature on the subject and in its persistent presence within the political debate (see Lafontaine and Slade (2007) [20] for a review of the topic). From a firm's perspective, vertical integration brings multiple virtues, including the potential to reduce the long-term exposure to commodity price fluctuations. See for example Helfat and Teece (1987) [16] for an empirical estimation of the hedge procured by vertical integration in the oil business. In our case study, we consider the generic type of equilibrium and a small downstream firm asking herself whether she has an interest in getting more vertically integrated. We show that the gains from integration are directly linked to the pass-through parameter that links the crude oil price to the retail gasoline price. The higher this pass-through, the higher production activity dominates the retail activity both in terms of expected rate of profit and the standard deviation of rate of profit.
The rest of the paper is organized as follows. Section 2 sets up the competitive producer-consumer commodity market. Section 3 then constructs the respective threshold-type impulse-switching equilibria by considering the producer and consumer best-response strategies. Section 4 illustrates and discusses the different types of emergent equilibria using toy examples. Section 5 presents the above vertical integration case study and Section 6 concludes. All the proofs, as well as additional comparative statics, are delegated to Section 7.

Description
We use (X t ) to denote the (pre-equilibrium) commodity price, modeled as a continuous-time stochastic process. The two players are denoted as producer and consumer. In what follows sub-index p (resp. c) in the notation will always refer to the producer (resp. consumer). The market involves the original raw commodity that is being produced and the goods market (e.g. gasoline). The producer extracts the commodity at cost c p and sells it for price x. The consumer buys it for price x, converts it into a final good, and sells it for price P .

Profit rates:
The price x of the commodity influences the volume of trade, captured by the demand function D p (x). A similar phenomenon plays out in the final-good market: the goods price P leads to sales volume D c (P ). Since the consumer is in effect the intermediary between the commodity and the goods market, she will pass some of her input price shocks to the output price P ≡ P (x).
We ignore the players' fixed costs because they can be considered to be integrated in the investment costs, and concentrate on the variable costs and revenues that are driven by the respective input/output prices. Based on the above discussion, the instantaneous profit rate of the producer is Let c c be the processing/conversion cost from input commodity to final good and α be the respective conversion factor, so that one unit of commodity becomes α units of the final good (e.g. barrels of crude oil, converted into barrels of gasoline). Then the instantaneous profit rate of the consumer is We note that while the consumer has market power, he is not the only user of the commodity (e.g. crude oil is also used by the petrochemical industry), so there is no direct link between production volume and consumption volume. Thus, while there is a physical link between the consumer input volume D c (P )/α and her output volume D c (P ), there is no direct link between D c (P )/α and aggregate commodity demand D p (x). We shall consider linear inverse demand If we further assume that P (x) = p 0 + p 1 x (the price of the final good is linearly proportional to the commodity price), and D c (P ) = d 0 − d 1 P (final good demand is linearly decreasing in its price P ), the profit rate of the consumer becomes: The consumer profit is concave in the commodity price x, γ 2 < 0, if and only if the pass-through coefficient p 1 is higher than the conversion factor 1/α. It means that the final good price increases faster than the need of the downstream industry to produce one more good, which is a sound economic condition for having a sustainable downstream industry. To sum up, the profit rates of both producer and consumer are concave and quadratic in x.
Market conditions: We model the commodity price process (X t ) as a controlled Itô diffusion of the form The Brownian motion (W t ) captures exogenous price shocks due to random demand or production fluctuations, or pertinent economic shocks for the industry. In this sense, the model is agnostic in the reasons why the commodity price fluctuates around its mean trend. The point process N t := i≥1 ξ i 1 {τ i ≤t} captures the producer interventions at times (τ i ) i≥1 and impulses (ξ i ) i≥1 . A positive impulse is triggered by an investment phase, and has a negative impact on the price. A negative impulse is induced by a disinvestment phase and has a positive impact on the price.
The drift process (µ t ) represents the state of the retail market for the final good. It is either in expansion or in contraction state. When in expansion, demand is growing faster than the available production capacity, hence prices tend to rise: µ t = µ + > 0. When in contraction, the demand is shrinking faster than the production capacity, thus the price tends to decrease, and thus µ t = µ − < 0. This modeling corresponds to an imperfect adjustment of the market as in a sticky price model in macroeconomics. The drift is fully controlled by the consumer, where σ i is the i-th switching instance taken by the consumer in the case µ 0− = µ + (with the convention σ 0 = 0, so that σ 1 is the first switching time) and analogously when µ 0− = µ − by interchanging odd and even switching times. Thus, both players influence (X t ), although their actions are of distinct types, namely impulse control (N t ) by the producer and switching-drift control (µ t ) by the consumer. The resulting controlled price dynamics are denoted as X (µ,N ) . The quadratic nature of the upstream and downstream profit rate functions π p (·) and π c (·) implies that each player has their own natural habitat given by the intervals (x 1 c , x 2 c ) and (x 1 p , x 2 p ) for commodity price levels with: x 1 c := min Players make a positive profit only if the price stays in the interval ( The concavity of the profit functions implies that players have preferred commodity levelsX p ,X c that maximize their profit rates, namely:X Typically, we expect thatX c <X p , so that the preferred commodity price of the consumer is lower than that of the producer. The stochastic fluctuations coming from (W t ) can generate three different market conditions: X t <X c I: abnormally low prices; X c ≤ X t ≤X p II: vertical competition; X p < X t III: abnormally high prices.
In the first and last cases, both players have the same preferences to raise or decrease X t ; in the intermediate case, they compete against each other. Because both players can in principle push (X t ) in either direction, the market organization is influenced by their relative gain of doing so, as well as their action costs. In cases I and III, the players are in waiting mode because of the second-mover advantage, hoping that the other will act first which allows the second to benefit from the price effect without paying the cost of (dis-)investment or of switching. In case II they are in preemption mode, with the player who moves first being able to increase her profits at the expense of the other. These dynamic shifts between waiting and preemption is an important feature of vertical competition.
Objective functions and admissible strategies: The objective functionals of the players consist of integrated profit rates π · (x), discounted at constant rate β > 0 and subtracting the control costs that are paid at respective intervention epochs. We take the investment cost function of the producer to be some convex function K p : R → R, and of the consumer as H : {µ − , µ + } → R + . We denote the latter as H(µ − ) = h − , H(µ + ) = h + . Depending on the initial drift µ 0 being positive/negative the producer's objective function is given by: and, similarly, the representative consumer's objective function is: In order for the state variable dynamics and players' expected payoffs to be well-defined we give the following definition of admissible strategies. To this end, let (Ω, F, (F t ) t≥0 , P) be a probability space with a filtration satisfying the usual conditions and supporting an (F t ) t≥0 -Brownian motion (W t ).

Remark 1.
Observe that the property 1 above implies that the producer intervention times do not accumulate in finite time, so that for all t > 0 the process N t = i≥1 ξ i 1 {τ i ≤t} , t ≥ 0, is well-defined, adapted and finite-valued. Moreover, the integrability condition in 5 gives that σ j → ∞ (as j → ∞), i.e. the switching times of the consumer do not accumulate in finite time either, so that the dynamics of the controlled state variable (4) is well-defined too. Regarding the expected profits of the players, they are both finite due to integrability properties in 3 and 5 above.

Remark 2.
According to the definition of admissibility above, neither player can intervene more than once at a time. However, simultaneous interventions coming from both of them are not excluded. As discussed, the dynamics of the intervention in upstream production is much faster than the switching of the consumption regime for final good. Thus, in case both players try to act simultaneously, we assume that the producer has priority. This avoids unnecessary technicalities and allows for a consistent modeling of the vertical competition.

Equilibrium
Using this notion of admissible strategies, we give the definition of Nash equilibrium.
Definition 2 (Nash equilibrium). A Nash equilibrium is any pair ((ξ i , τ i ) i≥1 , (σ j ) j≥1 ) ∈ A p × A c satisfying the following property: for any other pair of strategies and the convention σ 0 = 0 (analogously in the other case µ 0− = µ − by interchanging odd and even switching times).
In line with the envisioned Markovian structure and in order to maximize tractability, we concentrate on a specific class of dynamic equilibria. Namely, we aim to construct threshold-type Feedback Nash Equilibria which are of the form and where p}, for some measurable function δ : R → R and some suitable Borel sets Γ ± p , Γ ± c ⊂ R. Thus, (10)- (11) imply that players act based solely on the current price (X t ) and demand regime (µ t ), ruling out history-dependent strategies, and moreover the strategies are characterized through fixed action regions Γ ± p , Γ ± c and impulse maps δ(·). We will denote by τ k the aggregated intervention times coming jointly from the two players. The fact that in (10) producer's intervention times τ i are defined via Γ p (t−) translates the assumption that in case of simultaneous interventions, the producer plays first and so her thresholds naturally depend on the drift µ t− just before her and consumer's actions (compare to Remark 2).
The action regions Γ ± p , Γ ± c are expected to be as follows. The impulse intervention region of the upstream production Γ ± p = (x ± , x ± h ) is two-sided: the producer will act whenever X t reaches x ± h from below or drops to x ± from above. Note that these thresholds x ± , x ± h are µ-dependent. On the consumption side, when µ t = µ + (expansion regime), the consumer will switch to µ − if X t gets too high: Γ + c = (y h , ∞). Similarly when µ t = µ − (contraction regime), she will switch to µ + if X t gets too low Γ − c = (−∞, y ). Finally, when the producer intervenes, he will bring X t to her impulse level x ± * r so that the impulse amount is ξ ± r = x ± r − x ± * r . The natural ordering we expect is the producer impulses towardsX p and the consumer switches towardsX c , so that when acting both players try to move X towards their preferred levels. However, the precise ordering between the impulse thresholds x ± r and the switching thresholds y's is not clear a priori and will emerge as part of the overall equilibrium construction.

Illustration of Competitive Dynamics
To further understand the market evolution under competition of the producer and consumer, we focus on the case where both players are active. The producer's strategy is summarized via a 2 × 4 matrix C p which lists the thresholds x ± , x ± h and the target levels x ± * , x ± * h . Thus, the no-intervention regions are [x ± , x ± h ] and impulse amounts are x ± h − x ± * h , x ± * − x ± : The consumer has two switching thresholds y , y h ; in a typical setup we expect them to satisfy the following ordering Note that in the expansion regime (drift µ + ), we assume that y h < x + h . Therefore, coming from below, X * t hits y h first, causing the consumer to switch into the contraction regime with drift µ − . As a result, the impulse threshold x + h is not effective, i.e. it will never get triggered along an equilibrium path of (X t ). Similar argument implies that x − is not effective either if x − < y . In the left panel of Fig. 1 we illustrate such threshold-based vertical competition among the two players.  The blue arrows represent drift-switching controls exercised by the consumer at levels y and y h , while the red curved arrows represent impulse controls exercised by the producer at levels x + , x − h that instantaneously push X t to x + * and x − * h respectively. Right: A sample path of the controlled commodity price (X * t ) under competitive equilibrium. Observe that X * t ∈ [1, 2] for all t.
To illustrate competitive dynamics, the right panel of Fig. 1 shows a sample trajectory of (X * t ) (the superscript emphasizing the fact that we are now looking at equilibrium) with producer and consumer strategies According to the above discussion, the effective thresholds are (x + , y h ) when µ t = µ + , or (y , x − h ) when µ t = µ − . In other words, in the expansion regime, (X t ) will be between [1.0, 1.8] and in the contraction regime it will be between [1.2, 2.0]. In Fig. 1 (Right), we start in the contraction regime with X 0 = 1.5 and µ 0 = µ − . On this trajectory, (X * t ) moves down until it touches the consumer's threshold y , where the consumer switches to a positive drift to draw the price up. Nevertheless, the price keeps decreasing and hits x + = 1.0, whereby the producer intervenes and pushes it to x + * = 1.3. Prices then continue to rise up to y h = 1.8 at which point the consumer switches again and starts pushing them back down (supposedly she wishes to keep them somewhere around 1.5). This cyclic behavior continues ad infinitum, yielding a stationary distribution for the pair (X * t , µ * t ). Note that the consumer uses her switching control to keep X * t from going too high or too low, essentially cycling between y and y h . Indeed, starting at X * t = y , the consumer switches to expansion which causes prices to trend up; once they hit y h the consumer switches to contraction, causing prices to trend down. As a result, µ t alternates between µ + , µ − generating a mean-reverting behavior. Throughout, the producer acts as a "back-up", explicitly forcing prices from becoming extreme (namely from falling in the expansion regime, or rising in the contraction regime). These additional interventions by the producer make the domain of (X * t ) bounded. It is also possible that, say, x + h < y h so that in the expansion regime the producer will act first both when (X * t ) falls (impulse threshold x + ) and when (X * t ) rises (x + h ), making the consumer inactive. In that case it is plain to see that the drift µ t ≡ µ + will stay positive forever; (X t ) will be forced to a bounded domain but will not have mean-reverting dynamics since the drift is constant. Instead, it will experience repeated impulses downward to counteract the upward trend due to ongoing consumption growth.

Best-response functions
To obtain a threshold-type Feedback Nash Equilibrium we view it as a fixed point of the producer and consumer best-response maps. Therefore, our overall strategy is to (i) characterize threshold-type switching strategies for the consumer given a pre-specified, threshold-type behavior by the producer; (ii) characterize threshold-type impulse strategies for the producer who faces a pre-specified regimeswitching behavior of (X t ); (iii) employ tâtonnement, i.e. iteratively apply the best-response controls alternating between the two players to construct an interior, non-preemptive equilibrium satisfying the ordering (15).
To analyze best-response strategies, we utilize stochastic control theory, rephrasing the related dynamic optimization objectives through variational inequalities (VI) for the jump-diffusion dynamics (4). The competitor thresholds then act as boundary conditions in the VIs. To establish the desired equilibrium we need to verify that the best response is also of threshold-type and solves the expected systems of equations. We note that all three pieces above are new and we have not been able to find precise analogues of the needed verification theorems in the extant literature. Nevertheless, they do build upon similar single-agent control formulations, so the overall technique is conceptually clear.

Consumer Best-Response
Fixing impulse thresholds x ± r (r = h, l), the consumer faces a two-state switching control problem on the bounded domain (x ± , x ± h ). Namely, given a producer's impulse strategy (τ i , ξ i ) i≥1 with τ = inf{t : we expect the following stochastic representation for her value functions where E x,± denotes expectation with respect to µ t ∈ {µ − , µ + } and h ± are the fixed intervention costs of the consumer. The above is a system of two coupled equations, which locally resembles an optimal stopping problem with running payoff π c (·), reward w ∓ (·) (last term), and stop-loss payoff (middle term) w ∓ (·) due to the producer impulse at τ . This is almost the formulation as considered in [3] except with two modifications: • The domain is bounded on both sides (previously there was a one-sided stop-loss region).
• The boundary condition w + (x ) = w + (x + * ) is autonomous but nonlocal. Therefore, the two stopping-type VIs for the consumer are coupled only through the free boundaries, not through the stop-loss thresholds as in [3]. Now, given a producer strategy C p , if the consumer's response is such that y < x − and x + h < y h , the consumer will be stuck forever in the initial regime because the price touches x − before y in the contraction regime and x + h before y h in the expansion regime. In this case, the price will oscillate between x − and x − h if the initial market is in the contraction regime, and between x + and x + h in the expansion regime.
In the case where the consumer's response satisfies y < x − and y h < x + h , depending on the initial state, the consumer will switch once to the expansion regime or will be stuck in the initial expansion regime. If the initial regime is µ + , the price will touch y h , the regime will switch to contraction, the price will never touch y and will oscillate between x − and x − h . If the initial state is already µ + , no switch of regime will ever occur. The same reasoning applies for the symmetric case where x − < y and x + h < y h . Finally, if the consumer's response satisfies x − < y and y h < x + h , then whatever the initial regime, the state (µ t ) will switch many times between the two regimes.
The best-response of the consumer consists in picking the best response amongst the three possible ones above. Thus, we distinguish three cases: (a) No-Switch: The consumer is completely inactive and simply collects her payoff based on the strategy (x ± ,h ).
(b) Single-Switch: The consumer always prefers one regime to the other. Then she is inactive (like in case (a) above) in the preferred regime and faces an optimal stopping (since there is only a single switch to consider) problem in the other regime.
(c) Multiple-Switch: The consumer switches back and forth between both regimes: the continuation region is (y , y h ).
Proposition 1 provides the value function of the consumer in case (a). The system (24) characterizes the game payoff in case (b), and Proposition 2 provides the value function of the consumer in case (c).

No-switch
Regardless of the consumer strategy, in the continuation region, a direct application of the Feynman-Kac formula on (16) shows that her value function solves the following ordinary differential equation Solving this inhomogeneous second-order ODE, we obtain w ± (x) = ω ± (x) + u ± (x), where letting θ ± 2 < 0 < θ ± 1 be the two real roots of the quadratic equation −β + µ ± z + 1 2 σ 2 z 2 = 0, x solves the homogeneous ODE −βu + µ ± u x + 1 2 σ 2 u xx = 0 and λ ± i,0 , i = 1, 2 are to be determined from appropriate boundary conditions; • ω ± (x) is a particular solution to (17), given by When the consumer is inactive (denoted by w ± 0 ), the continuation region is [x ± , x ± h ] with the boundary conditions at the impulse levels From (19) the respective coefficients λ ± 1,0 , λ ± 2,0 are solved from the following uncoupled linear system: and similarly in the contraction regime, we take be the solution to the system (20)- (21). Then the functions The role of w ± 0 (·) is important for judging the other two cases, and moreover for deciding whether the best-response ought to be of threshold-type.

Single-switch
We next consider the situation where the payoff in the expansion regime is higher than the contraction one for any price x, so that the consumer is never incentivized to switch to the contraction regime. We then expect the consumer's corresponding best-response to be either a single-switch strategy (to the preferred regime) or no-switch (if already there). Economically, this corresponds to y h > x + h so that as the price rises, the producer impulses (X t ) down, and the consumer is not intervening to decrease her demand. As a result, the consumer never switches (except perhaps the first time from negative to positive drift) and lim t→∞ µ t = µ + . This can be observed when demand switching is very expensive, so that the producer has full market power and is able to keep prices consistently low. The consumer is forced to be in the expansion regime forever and she is not able to influence (X t ).
Suppose that the consumer prefers expansion regime (µ t = µ + ) and adopts threshold-type strategies. Given C p , her strategy is summarized by and the resulting contraction-regime value function w − should be a solution to the variational inequality where w + 0 is from Proposition 1 and the continuation region is [y , x − h ]. This is a standard optimal stopping problem. Note that while the above equation for w − depends on w + 0 , the equation for w + 0 is autonomous-the system of equations becomes decoupled because the two regimes of (µ t ) no longer communicate.
To solve (22) we posit that her best-response is of the form with the smooth pasting and boundary conditions: The system (24) is to be solved for the three unknowns y , λ − 1 , λ − 2 , while λ + 1,0 , λ + 2,0 are the coefficients of the consumer's payoff associated to the no-switch strategy in the µ + regime, see previous subsection. We can re-write it as first solving for λ − 1,2 from the linear system and then determining y from the smooth pasting C 1 -regularity The case of a single-switch from expansion to contraction regime can be treated analogously in a symmetric way.

Double-switch
Finally, we consider the main case where the consumer adopts threshold-type switches, i.e. the ordering in (15) holds. Given C p , the w ± are then supposed to be a solution to the coupled variational inequalities where we expect continuation regions of the form (x + , y h ) and (y , x − h ). To set up a verification argument for the consumer's best-response we make the ansatz This yields 6 equations: The six equations can be split into a linear system for the four coefficients and the smooth-pasting conditions determining the two switching thresholds y ,h (viewed as free boundaries) Proposition 2. Let the 6-tuple (λ ± 1 , λ ± 2 , y h , y ) be a solution to the system (31)-(32) such that the order in (15) is fulfilled. Then, the functions defined in (29) give the best-response payoffs of consumer, and a best-response strategy is given by (σ i ) i≥1 , wherê Figure 2 illustrates the shapes of the consumer's value function in the different case of best-response. For the strategy given, we have a dominant function in the contraction regime (w − 0 ) and a dominant function in the expansion regime (w + 0 ). Remark: For comparison purposes, it is also useful to know the continuation region of the consumer when she alone controls the market price (X t ). As usual, this region is (−∞, y h ) in the expansion regime and (y , +∞) in the contraction regime, with the natural ordering y < y h . The value functions w ± satisfy: To set up a verification argument for the consumer's best-response we make the ansatz Furthermore, in the expansion regime, to keep w + (x) bounded as x → −∞ we must have λ + 2,0 = 0 because θ + 2 < 0. In the contraction regime, a similar argument gives λ − 1,0 = 0. We are left with the four unknowns y , y h and λ p 1,0 and λ − 2,0 determined from the following smooth pasting conditions:

Producer Best Response
We now consider the best-response of the producer, given the consumer's switching strategy denoted by C c := [y , y h ]. Once again, we face three Cases: 1. The producer is a monopolist, i.e. the consumer is completely inactive; 2. The consumer adopts a single-switch strategy; 3. The consumer adopts a double-switch strategy.

Producer as Sole Optimizer
To begin with, we determine the monopoly-like strategy of the producer assuming the consumer adopts a no-switch strategy. In that case µ t is constant throughout and the functions v ± of the producer satisfy the variational inequality (VI): Note that the two VIs for v + and v − are autonomous, hence uncoupled from each other. In the continuation region, the general solution of the ODE where the coefficients A, B ± , C ± are identified as: Assuming the producer adopts threshold-type impulse strategies defined by ξ * (x) in the intervention region, her expected payoff is of the form: When applying the optimal impulse ξ ± * (x) at the threshold x ± r , r = , h, the producer brings X t back to the price level x ± * r := x ± r − ξ ± * (x ± r ).For optimality, the respective impulse amounts satisfy the first order conditions v ± x We reinterpret the above as the equation to be satisfied by ξ * (x ± r ) which are treated temporarily as unknowns and plugged into further equations. To ensure that the value function is continuous at x ± r we further need Finally, making the hypothesis that the value function is differentiable at the borders of the intervention region, we have: We consider two cases of impulse costs: (i) constant K p (ξ) = κ 0 and (ii) linear K p (ξ) = κ 0 + κ 1 |ξ|. In case (i), because the impulse cost is independent of the intervention amount there will be an optimal impulse level x ± * r so that for any x in the intervention region the strategy is to impulse back to x ± * r which is the same at the two thresholds. In case (ii), ∂ ξ K p = ±κ 1 and all the smooth pasting and boundary conditions can be gathered in the following system: Note that there are two uncoupled linear systems for v + and v − . The C 0 conditions are from (41), the first two C 1 conditions are from (40) which determines the optimal impulse destination, and the last two C 1 conditions are from (42). By a standard verification argument, one can show that if both systems above admit solutions ν ± 1,2 and x ± ,h , where the latter satisfy the order condition x ± < x ± h , then the functions v ± (x) as in (39) are the value functions of the producer and his optimal strategies are given by the thresholds x ± ,h and impulse amounts ξ * (x ± * ,h ). This can be done by following exactly the arguments in, e.g., [7] (see also their Remark 2.1), which are very standard in the literature of impulse control problems. Therefore, details are omitted.

Non-preemptive Response
Suppose the following ordering, which is similar to (15), holds: We then expect v ± to solve the VIs To obtain the producer best-response it suffices to identify the two active impulse thresholds x + , x − h and the respective target levels x + * , x − * h . The other two boundary conditions take place at the consumer thresholds y , y h , so that the strategy (see (47) below) is The game coupling shows up in the additional boundary condition that when the consumer switches, the producer's value is unaffected: Accordingly, our ansatz is x ≤ y , To simplify the presentation, let us concentrate on the proportional impulse costs K p (ξ) = κ 0 + κ 1 |ξ|.
We have the smooth pasting C 1 and boundary conditions: Unlike the single-agent setting (43), the equations (48) are coupled. The coefficients ν ± 1,2 are the solution to the linear system and the thresholds x + h , x − are determined by the C 1 smooth-pasting (recall that and the first order conditions (FOCs) giving the optimal impulses: be a solution to the system (48), such that the order in (44) is fulfilled and Then the functions v ± are the best-response payoffs of the producer, and a best-response strategy is given by , while (X * t ) follows the dynamics corresponding to the consumer's strategy (σ i ) i≥1 and the producer's impulse strategy

Preemptive Response
It is possible that the static discounted future profit of the producer satisfies, say, v + (x) ≥ v − (x) for any x, so that he always prefers expansion regime to contraction regime. In that case, the consumer switching at y h from expansion to contraction hurts the producer and one possible strategy for him is to preempt in order to prevent the consumer from switching the drift to µ − . This situation could be viewed as looking for best x + h < y h , given y h . In the latter case the constrained solution could be x + h = y h −, whereby the system (43) does not hold and the bestresponse is to impulse (X t ) right before it hits y h , x + h = y h −. This strategy is not well-defined (i.e. the supremum is not achieved on the open interval (x + , y h )), but the resulting preemptive best-response value in the µ + regime can be obtained by using the ansatz (where we slightly abuse the notation to write and the boundary conditions for determining the target impulse levels Note that we now have 5 unknowns, ν + 1,2 , x + , x + * , x + * h rather than six as we "fixed" x + h = y h . This yields the following system Preemption in the contraction regime writes in a symmetric way. In general, we need to manually verify whether x + h > y h (the "normal" case) or x + h = y h (the preemptive case) whenever we consider the producer best-response. The two situations lead to different boundary conditions at the upper threshold, and hence cannot be directly compared. Considering the optimization problem for x + h , we expect his value function to increase in x + h on (x + , y h ) and experience a positive jump at y h , i.e. conditional on someone acting, the producer prefers the consumer's switch to applying his impulse. However, if this is not the case, the consumer action hurts the producer and assuming the impulse costs are low, the best-response is x + h = y h . This corner solution arises due to the underlying discontinuity: on (x + , y h ) the producer compares the value of waiting to the value of doing an optimal impulse, but at y h he compares the value of switching to that of doing an optimal impulse. So it could be that "waiting" > impulsing > switching at y h , leading to pre-emptive impulse to prevent the worst (for the producer) outcome. Proposition 4. Assume µ 0− = µ + . Let the 5-tuple (ν + 1 , ν + 2 , x + , x + * , x + * h ) be a solution to the system (57), such that the order in (44) is fulfilled and x + < x + * , x + * h < y h . Let v + be defined as in (55) and Then, the function v + is the best-response payoff of the producer in the expansion regime, and a bestresponse strategy is given by with Γ p (t) = Γ + p (t) = (−∞, x + ] ∪ [y h , +∞), while X * follows the dynamics corresponding to the producer's impulse strategy (τ * i , ξ * i ) i≥1 .

Equilibria
The best-response functions defined in Section 3 lead to three types of potential market equilibria, depending on the equilibrium behaviour of the consumer and characterized by the relative positions of the consumerand producer thresholds: • Type I -generic: y ≤ x − h and x + ≤ y h .
• Type III -preemptive: y ≤ x − h and x + = y h ; or y = x − h and x + ≤ y h . In equilibrium Type I, the consumer switches back and forth forever between the two expansion and contraction regimes. The optimal policy of the consumer is given by the threshold y in the contraction regime and y h in the expansion regime, while the optimal policy of the producer is formed by the pair (x + , x +, * ) in the expansion regime and symmetrically by the pair (x +, * , h x − h ) in the contraction regime. We anticipate this to be the most common equilibrium type; it was precisely described and illustrated in Section 4.1.
In equilibrium Type II, the consumer and the producer both prefer a given regime and thus, the consumer switches at most once when the market is initialized in the opposite regime. Afterwards, only the producer acts to maintain the price between (x , x h ). Consider the case of a single switch from expansion to contraction; the consumer's optimal policy consists then in only one threshold, y h . The optimal policy of the producer is more complicated: in the expansion regime, it consists of the pair (x + , x +, * ) and in the contraction regime, it consists of a quadruplet (x − , x −, * , x −, * h , x − h ). The same reasoning applies in the other single switch case. This equilibrium is described in Section 4.2.
The last type of equilibrium, named Type III, resembles the preceding one in the sense that at most one switch can be observed. But it differs because here the consumer is stuck forever in a state she wishes to leave. In that case described in Section 4.3, only the producer acts. Starting in the expansion regime, for instance, the consumer would like to switch to the contraction regime when the price reaches a threshold y h . But the producer, who prefers perpetual expansion, preempts the switch by acting at the threshold y − h , just before the action of the consumer. Threshold-type equilibria offer analytical tractability to describe the long-run market behavior. The latter can be summarized by the stationary distribution of the commodity price (X * t ) and the consumer regimes (µ * t ) as induced by the equilibrium strategies (N * t , µ * t ). To quantify these effects, we define an auxiliary discrete-time jump chain (M * n ) ∞ n=0 which takes values in the state space The chain M * keeps track of the sequential actions of the players, where S ± represents the switches of the consumer ("S + " stands for the switch µ − → µ + and "S − " for µ + → µ − ) and I ± r the impulses (up/down at the two impulse boundaries) of the producer. Thus, M * summarizes the sequence of market interventions stored within τ i , σ i stopping times. Note that states M * n ∈ {S + , I + h } imply a positive drift µ + of X * , while the rest imply a negative drift µ − . Moreover, if the consumer adopts a double-switch strategy and the producer adopts a non-preemptive strategy as discussed in Section 4.1, then the thresholds x + h and x − will be hit at most once by X * and therefore the corresponding states I + h and I − of M * n are transient. Because the dynamics of X * between interventions are always Brownian motion (BM) with drift, the transition probabilities of M * can be described in terms of hitting probabilities of a BM. This offers closed-form expressions for the the transition probability matrix P of M * , and its invariant distribution denoted by Π. Moreover, the sojourn times of M * correspond to (X * t ) hitting the various thresholds (in terms of the original continuous-time "t") and are similarly linked to BM first passage times. Combining the above ideas, we can then derive a complete description of (µ * t ), namely the long-run proportion of time that the commodity demand is in expansion/contraction regimes and the respective expected switching time, see (71).
In the following section otherwise stated, we use the parameter values in Table 1, p}. This yields consumer and producer preferred price levels ofX c = 3,X p = 4. The same set of parameters yields an equilibrium of each type, showing the non-uniqueness of equilibria in this model.

Type I -Generic
We look for an interior, non-preemptive equilibrium satisfying the ordering (15), i.e. a pair of consumer and producer strategies of the form (y * , y * h ) and (x + , x + * , x − * h , x − h ). To construct this equilibrium, we employ tâtonnement, i.e. iteratively apply the best-response controls alternating between the two players. This corresponds to the interpretation of Nash equilibrium as a fixed point of best-response maps BR. The equilibrium is obtained using two different fixed-point algorithms. Given strategies C 0  Figure 5: A sample path of the controlled market price (X * t ) under a Type I equilibrium (Left), Type II (Center) and Type III (Right) together with E X * t (black solid curve). The colors along the x-axis indicate the corresponding µ * t . We start with µ * 0 = µ + .
and C 0 c , we have either an asynchronous or synchronous algorithm, namely synchronous.
The resulting equilibrium found using both algorithms is the same and is The dynamic equilibrium of the commodity price X * is illustrated in Figure 5 (Left). The market starts in the expansion regime, µ * 0 = µ + . We observe that x − * h is close to y * h , implying that once the price has reached the switching level y * h , it is likely to touch soon thereafter the threshold x − * h , making the price drop to x − * h . The producer "backs up" this mean-reversion by impulsing down if prices rise too much and impulsing down if they drop too much. Otherwise, she lets the consumer be in charge via switching control that benefits him as well.
At equilibrium, the price X * fluctuates in a range of values where neither the producer nor the consumer have negative profit rate. If alone in the market, the optimal monopolistic strategies of the producer and the consumer are We see that the equilibrium strategy of the producer C I, * p is quite close to what he would have done if alone in the market. On his side, the consumer-induced equilibrium price range is wider than he would prefer (2.6 against 2.2 if alone). In equilibrium, it is as if the producer lets the consumer do the job of bringing back the price to his preferred levelX p . The producer intervenes only if X * t drops too low or gets too high, after the regime switching has occurred. But, in the long-run, the average price lim t→∞ E[X * t ] is close to 3.5, which is the mid-value betweenX p andX c . The players' equilibrium strategy profile yields a stationary distribution for the pair (X *  Figure 6: Estimated long-run densities φ * of X * in a double-switch and one-sided impulse equilibrium. Panel (a): overall kernel smoothed φ * (·). (b): long-run distributions φ * ± of X * conditional on µ(t) = µ + (resp. µ(t) = µ − ). Recall that the domain of X * t depends on the current regime, so the support of the two densities differs.

Type II -Transitory
In another type of equilibrium the consumer switches only in one regime, with the other being absorbing. For this reason, we name it transitory. To fix ideas, suppose that the consumer only switches from expansion regime to contraction regime. In that case, the producer effectively acts like a profit maximizing monopoly in the contraction regime with two-sided impulses; in the expansion regime she will apply a one-sided impulse as in the equilibrium type I.
To solve for such equilibrium, we first compute the producer strategy in the contraction regime which is a decoupled VI as in (39) leading to the 6 equations in (43) but only for v − , x − r , x − * r , r ∈ { , h}. This solution induces the corresponding no-switch solution ω − 0 of the consumer as in (20)- (21). Both v − , ω − 0 are then fixed and act as source terms to solve for the equilibrium in the expansion regime. For the latter, we need to compute v + (·) and the associated thresholds x + , x + * (only one threshold), as well as ω + (x) and the switching threshold y h (note that there is no y ). The boundary conditions This reasoning leads to the following algorithm. If x + and x +, * are fixed, we compute the bestresponse of the consumer by solving the variational problem for the consumer value function ω + such that: This is exactly the best-response in the single-switch case with the solution given by the system (24) and which provides the consumer's threshold y h . Now, if we consider that y h is fixed, we can compute the best-response of the producer by solving a VI for the value function v + that satisfies The boundary conditions giving the four unknowns (x + , x +, * , ν + 1 , ν + 2 ) are: Now, we can perform the iterations y 0 We find the following fixed-point of the best-response functions of the producer and the consumer: The system starts in the expansion regime, and once the price reaches level X * t = 4.3, the consumer switches to contraction and the systems remains in that state for ever. After that, she relies on the producer to impulse (X * t ) up/down when prices get too low/too high but never reverts to the Expansion regime. Thus, in the long-run (X * t ) is simply a Brownian motion with negative drift µ − that has two impulse boundaries x − = 2.4, x − h = 6.1. Compared to the double-switch equilibrium of the previous section, the above market equilibrium in (65) has two important differences. First, as t → ∞ we have that µ * t → µ − so that in the long-run the market will be in the contraction regime and the consumer becomes inactive. Second, because the producer eventually "takes over", she will intervene much more frequently (see center panel of Figure 5), benefiting himself and reducing consumer value.

Type III -Preemptive
The producer may have an interest to preempt the switch, say, from the expansion regime to the contraction regime to avoid decline in the consumption of the commodity he produces. In this case, the equilibrium is a fixed point of the best-response function of the producer described in Section 3.2.3 and the best-response function of the consumer described in Section 3.1.2. We look for an equilibrium where the consumer would like to switch at y h in the expansion regime, but where the producer makes y h his own intervention threshold to impulse the price down.
Using the same protocol as in Type I and Type II equilibrium research, we find the following threshold strategy for the producer and the consumer: In the preemptive equilibrium, the price fluctuates in a narrower range than the other two equilibria. Here, (X * t ) oscillates between x + = 1.7 and x + h = y h = 4.3.

Equilibrium Non-Uniqueness
There are at least three potential equilibria. A natural question is thus whether one of them is preferable to the others. Figure 7 shows the value functions of the producer and of the consumer in the two market regimes (expansion and contraction) and for the different equilibria from type I to type III. We observe that the producer would prefer in both regimes to live in a type I equilibrium.
The function v ± 1 dominates all the other ones (note that there is no v − 3 because in equilibrium type III contraction never happens). However, the consumer would rather be in the preemptive equilibrium type III: her value function w + 3 dominates the other two. Intuitively, we may think that the switching costs she saves by letting the producer do all the work of maintaining the price around its long term average value compensate for the inconvenience of having prices that are higher than preferred.

Impact of Market Volatility
As one example of comparative statistics that are possible in our model, we investigate the impact of volatility parameter σ of X on the equilibrium profits and behavior of X * . In Table 2 we list statistics of φ * for a range of market volatilities σ. We also quantify the profitability of the two players through their average percentage of optimality (APOO) which is the ratio between average profit rate π r (X * t ) in equilibrium and the maximum profit that could be hypothetically obtained at the first-best level π r (X r ), r ∈ {c, p}.
In all types of equilibria, both players are worse off in terms of expected profit rate as σ increase. This occurs even though in type I and in type II equilibria the average price E[X * ] increases. However, that gain is dominated by the losses due to higher Var(X * ) which implies that prices tend to be further from their preferred levelsX r decreasing E φ * [π r ].

Effect of consumer's switching cost
A key parameter that controls which equilibrium type we face is the consumer's switching cost h 0 . Starting from the double-switch situation, as h 0 increases (> 0.6), the consumer is less incentivised to switch from µ + to µ − and we enter the single-switch scenario of Section 3.1.2. Consequently, she receives the No-Switch payoff ω + 0 (x) when µ t = µ + and solving for her best-response boils down to solve for y h only. Once h 0 gets very large, her best-response is simply the No-Switch response ω ± 0 . Conversely, as h 0 ↓ 0 her actions become free. In that situation, we can reduce the producer problem  Table 2: Long-run mean and variance of X * , long-run profit rates, and frequency of regime switches as market volatility σ changes (APOO in parentheses).
to a single, piecewise VI with a free boundaryX c : with the C 0 regularity atX c : lim x↑Xc v(x) = lim x↓Xc v(x). Fig. 8 shows that for low h 0 , x + * h < y and x + h is greater but close to y h . Thus, when consumption switches from expansion to contraction, it is very likely that the price touches x + h soon thereafter and is impulsed back to x + * h and thus, the regime rapidly switches back to expansion again. When the switching cost increases, this solution disappears.  Table 1 parameter values. We show the consumer thresholds y , y h , the producer thresholds x + , x − h and respective impulse target levels x * ,+ , x * ,− h .

Remark 3.
It is possible for the impulse amounts to be so large as to lead to a double simultaneous control: producer's impulse instantaneously followed by the consumer switching. In this setting, the producer effectively forces the consumer to switch the regime by impulsing X * hard enough. This situation corresponds to x − * h < y , so that the impulse in the contraction regime moves X * into the respective switching region (−∞, y ), and as a result the consumer immediately switches to the expansion regime. This situation occurs if, for instance, the drifts are µ − = 0.01, µ + = 0.1, so that the consumer is not able to ever efficiently lower prices. Consequently, the producer is forced to fully control price reduction. We observe in the above situation the equilibrium thresholds of x − * h = 3.04 < y = 3.69. 2

Case study: diversification effect of vertical integration
The industrial organization of upstream and downstream segments is linked to anti-trust regulations. From a regulatory perspective, vertical integration could be used to increase market power and foreclose competitors. For example, see De Fontenay and Gans (2005) [10] who develop a game theoretic model for the foreclosure effect of vertical concentration and Hasting and Gilbert (2005) [15] for the related empirical facts in the context of the US retail gasoline market. At the same time, consumers can benefit from vertical integration of commodity producers; we refer to related analysis of electricity markets from a market equilibrium point of view (Aïd et al. (2011) [2]) and an empirical point of view (Mansur (2007) [26]). Another virtue of vertical integration is its potential to reduce the long-term exposure of the firm to commodity price fluctuations. See Helfat and Teece (1987) [16] for an empirical estimation of the hedge procured by vertical integration in the oil business.
In this section, we accordingly study whether or not downstream or upstream firms have an interest in being vertically integrated. To this end we consider a small firm that has no market power regarding the commodity price X and focus on the case of the market equilibrium type I (generic case). We then investigate whether the firm can benefit from a diversification effect by having activity both in the downstream consumer side and the upstream conversion side.
To make the case study concrete, we consider a simplified version of the crude oil and gasoline markets, the latter a shorthand for refined products, calibrated to the ballpark of the 2019 state of the world. Currently, world oil consumption is about 100 Mb/d (millions of barrels per day), normalized to 1 "barrel" per day. We take as a nominal initial price X 0 = 50 USD/b and a nominal volatility of crude σ = 10 USD/b. To calibrate our model, we consider that crude oil producers have a preferred range of prices that goes from x 1 p = 30 USD/b to x 2 p = 100 USD/b and that the average cost of oil extraction is c p = 30 USD/b. This leads to a demand function D p (x) = 1 − 0.01x, which captures the low sensitivity of the demand of crude to prices. The crude is transformed into gasoline with a small amount of losses 5%, so that the conversion factor is α = 0.95.
We set the transfer function of crude oil price to average price of gasoline to P (x) = 10 + 1.1x, where P (x) is also expressed in USD/b. There is evidence that the (pre-tax) price of gasoline is a linear function of the crude. For instance, using monthly data of the Energy Information Agency of the US Department of Energy on refined products prices from January 1983 to November 2019 1 , we regressed the US Total gasoline Retail sales by refineriesP to the monthly crude oil priceX and found a linear relationP m = 1.2X m + 14 + m with a regression R 2 = 95%. Considering that the basket of refined products includes not just gasoline (even if it accounts for the largest share), we simplified the relation. Note that the condition p 1 ≥ α for having a downstream convex profit function holds. Furthermore, refinery costs c c are highly variable between 4 to 10 USD/b. We take the higher value of c c = 10. Finally, we consider that the demand function for refined products, D c (P ) = d 0 − d 1 P is such that d 0 = 5 b/d of crude equivalent refined products and d 1 = 0.05. With these parameters, the preferred range of crude prices for the consumer is between x 1 c = 11 and x 2 c = 82 USD/b. We consider fixed action costs both for the production firm and the downstream firm. We consider that the producer and the downstream firm lose two years of profit at optimal price to change state making κ 0 = 2π p (X p ) and h 0 = 2π c (X c ). Finally, we take µ ± = ±0.15 per year, which implies that it takes 10 years for the crude price to increase by 1.5 USD.
The resulting equilibrium type I producer impulse strategy C I, * p and consumer's switching strategy C I, * c associated to the calibration summarized in Table 3 Figure 9: Left: Profit rate function of the consumer π c (x) (red) as the pass-through parameter p 1 is varied, as well as the fixed producer profit rate π p (x) (blue). Middle: Respective equilibrium strategy thresholds y , y h (red) and x + , x − h (blue) as a function of p 1 . We also plotX c and E φ * [X * ], shading the typical commodity price range [E φ * [X * ] ± σ φ * (X * )]. Right: Risk-minimizing integration level λ * as a function of p 1 .  Figure 10: The curve λ → (σ(π λ ), E π λ ) as a function of the pass-through parameter p 1 .
Now let us consider a small firm engaging in a fraction λ ∈ (0, 1) of activity in the downstream sector and 1 − λ in the upstream sector. Her profit rate is thus π λ := λπ c + 1 − λ π p . The firm is vertically integrated when 0 < λ < 1. Denote by σ(π λ ) the standard deviation of her profit rate π λ (·) integrated against the stationary distribution φ * of X * , and by E π λ = π λ (x)φ * (dx) the respective expected profit rate. To fix ideas and because the analysis is symmetric, we are interested in situations where a pure downstream firm (λ = 0) would be better off having part of her activity in the upstream sector. This will take place when the upstream activity provides a higher expected profit rate and/or a lower risk as measured by σ(π λ ). Figure 10 presents the risk-return curves λ → (σ(π λ ), E π λ ) as the pass-through parameter p 1 increases from the nominal value of 1.1 to 1.18. We observe that for low values of p 1 diversification gains are limited: expected profit rate goes up but risk also increases. For moderate p 1 a pure downstream firm unambiguously benefits from some upstream activity: she can achieve the same level of risk with a higher expected profit. For high p 1 the upstream sector dominates completely with lower risk and higher average profit. Figure 9 (Right) shows the critical integration level λ * that minimizes the risk σ(π λ ) and captures the "variance-minimal" business model.
We observe that for high enough pass-through values, being a producer (λ = 1) dominates any other combination of activity. This phenomenon happens even though the maximum profit rate of the downstream firm π c (X c ) increases and gets higher than the producer's maximum profit rate function π p (X p ) as shown in the left panel of Figure 9. As shown by the evolution of equilibrium price range in Figure 9 (Middle), as p 1 increases, the equilibrium is getting more and more detrimental to the downstream firm. The shaded salmon area represents the interval where commodity prices tend to reside. The average commodity price remains stable around 65 USD/b, and its the standard deviation is not affected much by p 1 either, whileX c is steadily decreasing. Thus, since the expected profit rate of the integrated firm is a function of the expected price and its standard deviation, it does not change much. But its variance grows as a function of p 1 and thus increases significantly. To conclude, in our model we do observe a diversification effect obtained by mixing upstream and downstream activities, however the integration gains depend closely on the pass-through parameter p 1 which serves as a transmission channel of the volatility of the commodity price to the retail price.

Conclusion
We showed how a simple model of competition between upstream and downstream representative firms having different pace of intervention can lead to a rich variety of equilibria, potentially non-unique. The fact that the upstream firm can impact the price more rapidly than the downstream firm gives the producer a significant advantage, enabling him to lock the consumer in the producer's preferred range of prices. Further, in the case of the crude oil market and its refinery products, we stressed how the pass-through parameter p 1 plays a key role for the diversification effect induced by vertical integration. Vertical integration is beneficial for low values of p 1 while for higher values, production dominates downstream activity both in terms of expected profit rate and profit standard deviation.

Proof of Proposition 1
Proof. The proof is standard, nonetheless we give some detail for the reader's convenience. To ease the notation, let us consider only the case µ = µ + , the other case being identical. Let w + 0 (x) = ω + (x) + u + (x), where the parameters (λ + 1,0 , λ + 2,0 ) ∈ R solve the system (20)- (21). By construction the function w + 0 is of class C 2 everywhere. Hence we can apply Itô's formula to e −βs w + 0 (X s ) on the time interval [0, t ∧ ζ n ), yielding e −β(t∧ζn) w + 0 (X t∧ζn ) = w + 0 (x) + t∧ζn 0+ e −βs w + 0 (X s− )(µ + ds + σdW s − dN s ) − βw + 0 (X s− )ds t∧ζn 0+ e −βs w + 0 (X s− )ds + 0<s≤t∧ζn e −βs ∆w + 0 (X s ) + w + 0 (X s− )∆N s , where (ζ n ) n≥1 is a localizing sequence of stopping times along which the local martingale part above is in fact a true martingale. We use the notation and for, respectively, the first and second derivative in x. Taking expectations on both sides, using the fact that w + 0 solves the ordinary differential equation (17) and letting n → ∞, we obtain Now, notice that on the jumps of X we have ∆w + 0 (X s ) = w + 0 (x + * r ) − w + 0 (x + r ), which is zero by the boundary conditions (19), hence the jump part in the equation above vanishes. Moreover, being Fig. 11(a) illustrates the fact that a threshold switching strategy might not be optimal in all potential situations by considering the shape of w ± 0 (x). In the right panel, we have comonotonicity between w + and w − : the consumer is incentivised to switch to µ + when X t is low and to µ − when X t is high. In that situation, we expect that a threshold-type strategy is a best response. In contrast, on the left panel two other cases are illustrated. First, we see that it is possible that w + (·) w − (·), in other words the consumer has a strong preference to one regime over the other. In that case, the expansion regime could be absorbing, i.e. it is optimal to never switch to µ − . In the plot this would happen if h 0 is low (dashed line), whereby w − (x) > w + (x) − h 0 and it is optimal to switch to µ − at any x (therefore µ + would never be observed in the resulting game evolution). At the same time, we see that if h 0 is moderate (the solid line), then the region where w − 0 (x) > w + 0 (x) − h 0 is disconnected, so it is likely that a two-threshold switching strategy is an optimal response.

Proof of Proposition 2
Proof of Proposition 2. By construction, the functions w ± (x) in (29) solve the system of VIs in (27)- (28) and satisfy w + ∈ C 2 (( Let N denote the pure jump component in X's dynamics associated to the producer's strategy with thresholds (x ± , x ± * ; x ± h , x ± * h ). The proof is structured in two steps. -Step 1: optimality. The following verification argument proves that such functions coincide with the best-response payoffs of the consumer and that the switching timesσ i as in the statement are optimal provided they are admissible. First, by an approximation procedure as in the first part of the proof in [1, Theorem 3.3], we can assume without loss of generality that w + ∈ C 2 ((x + , x + h )) ∩ C 0 (R). Let µ 0− = µ + . Consider two consecutive switching times of any consumer admissible strategy, say σ 2i and σ 2i+1 , for i ≥ 0 with the convention σ 0 = 0, and recall that over [σ 2i , σ 2i+1 ) the state process X has drift µ + . Applying Itô's formula to e −βt w + (X t ) over the interval [σ 2i ∧ T, σ 2i+1 ∧ T ), for some finite T > 0, we obtain Using the dynamics dX s = µ + ds + σdW s − dN s between the two switching times above, localizing the martingale part through a suitable sequence of stopping times ζ n and taking expectation on both sides, we obtain where we set ζ k n,T := σ k ∧ ζ n ∧ T . Notice first that the third summand above vanishes since between σ 2i and σ 2i+1 , the state process X can jump only due to the impulses of the producer, hence at any of such jumps the C 0 -pasting condition at x + h yields Regarding the second summand, we use the variational inequality (27) so that we can write E e −βζ 2i+1 n,T w + (X ζ 2i+1 n,T e −βs π c (X s )ds .
Now, letting n → ∞ we obtain by dominated convergence that Analogously, we can get the same inequality between the switching times σ 2i−1 and σ 2i for i ≥ 1 with w − replacing w + , so summing them all up we have Note that by admissibility i≥1 e −βσ i ∈ L 2 (P), which implies sup i≥1 σ i = +∞ almost surely. Then, using the C 0 -pasting conditions in (30) and letting T → ∞, we finally obtain for any admissible consumer strategy (σ i ). Applying the same arguments to the sequence (σ i ) we would get equalities instead of inequalities everywhere. The proof for the case µ 0− = µ − is analogous and therefore is omitted.
-Step 2: admissibility. To conclude we show that the switching timesσ i are admissible, i.e. they belong to the set A c . To do so, notice first that (σ i ) is a sequence of [0, ∞)-valued stopping times. Hence, it remains to show that a.s.σ i <σ i+1 for all i ≥ 0, and i≥1 e −βσ i ∈ L 2 (P). The former follows from y < y h . For the latter, we can proceed as in the proof of [1,Prop. 4.7], whose main idea is to write each σ i as a sum of independent exit times for some (scaled) Brownian motion with possibly different drifts and initial conditions. First, let us denote (τ k ) k≥1 the increasing sequence of stopping times exhausting the intervention times of both players. Therefore we have hence it suffices to prove that k≥1 e −2βτ k ∈ L 1 (P). Now, notice that τ k , k ≥ 1, can be represented as k r=1 ζ r , where ζ r is a sequence of independent random variables distributed as the exit time, say ζ z,µ , of one of the processes z + µt + σW t with , which is a convergent geometric series, due to β > 0 and the fact that ζ z,µ > 0 almost surely for all (z, µ) ∈ Z ± . This shows that sequence of switching timesσ i is an admissible consumer's strategy and concludes the proof.

Proofs of Propositions 3 and 4
Proof of Proposition 3. Let v : {µ − , µ + } × R → R be the function defined as v(µ ± , x) = v ± (x), with v ± as in (47). By construction, the functions (v + , v − ) solve the system of VIs in (45) and moreover v ± ∈ C 2 ((x + , x − h ) \ {y , y h }) ∩ C 0 (R), hence not necessarily C 1 at the points y , y h . Recall that where without loss of generality we can assume σ i is the i-th switching instance taken by the consumer in the case µ 0− = µ + (remember the convention σ 0 = 0). The other case µ 0− = µ − can be treated in a similar way, it is therefore omitted. We split the rest of the proof in two steps.
-Step 1: optimality. The following verification argument proves that such functions coincide with the best-response payoffs of the producer and that the impulse strategy as in the statement is optimal provided it is admissible. First, by an approximation procedure as in the first part of the proof in [1, Theorem 3.3], we can assume without loss of generality that v ± ∈ C 2 ((x + , x − h )) ∩ C 0 (R). Consider any producer admissible strategy (τ i , ξ i ) i≥1 as in the first part of Definition 1. Applying Itô's formula to e −βt v(µ t , X t ) over the interval [σ 2i ∧ T, σ 2i+1 ∧ T ), for some finite T > 0, we obtain e −β(σ 2i+1 ∧T ) v(µ σ 2i+1 ∧T , X σ 2i+1 ∧T ) = e −β(σ 2i+1 ∧T ) v + (X σ 2i+1 ∧T ) = e −β(σ 2i ∧T ) v + (X σ 2i ∧T ) where the first equality comes from the fact that over [σ 2i ∧T, σ 2i+1 ∧T ), the drift equals µ + (remember that µ 0− = µ + ). Using the dynamics dX s = µ + ds + σdW s − dN s , with N t := i≥1 ξ i 1 {τ i ≤t} , between the two switching times above, localizing the martingale part through a suitable sequence of stopping times ζ n and taking expectation on both sides, we obtain E e −βζ 2i+1 n,T v + (X ζ 2i+1 where we set ζ k n,T := σ k ∧ ζ n ∧ T . For the third summand above, notice that between σ 2i and σ 2i+1 , due to the non-local term in the variational inequality (45), the state process X can jump only due to the impulses of the producer and at any of such jumps we have Now, due to X t ∈ [x + , x − h ] for all t ≥ 0, letting n → ∞ we obtain by dominated convergence that e −βs π p (X s∧T )ds Analogously, we can get the same inequality between the switching times σ 2i−1 and σ 2i for i ≥ 1 with v − replacing v + , so summing them all up we have Note that by admissibility i≥1 e −βσ i ∈ L 2 (P), which implies sup i≥0 σ i = +∞ almost surely. Then, using the C 0 -pasting conditions in (48) and letting T → ∞, we finally obtain for any admissible producer's strategy (τ i , ξ i ) i≥1 . Applying the same arguments to the impulse strategy (τ * i , ξ * i ) i≥1 as in the statement we would get equalities instead of inequalities everywhere. Notice that the second order conditions (52) guarantee the optimality of the impulses ξ * i . -Step 2: admissibility. To conclude the proof, we need to show that the impulse strategy (τ * i , ξ * i ) i≥1 is admissible as in the first part of Definition 1. Property 1 is granted by the dynamics of the state variable X and the fact that producer's thresholds satisfy x + < x + * , x − * h < x − h . Property 2 is obviously satisfied by definition of the optimal impulses ξ * i as in the statement. Hence, we are left with showing property 3, i.e. i≥1 e −βτ * i ξ * i ∈ L 2 (P). We can proceed once more as in the proof of [1,Prop. 4.7] and in the second part of Proposition 2's proof. We provide all details for reader's convenience. First, let us denote (τ k ) k≥1 the increasing sequence of stopping times exhausting the intervention times of both players. Since the optimal impulses (ξ * i ) i≥1 are uniformly bounded by some positive constant, say κ, we have hence it suffices to prove that k≥1 e −2βτ k ∈ L 1 (P). Now, notice that τ k , k ≥ 1, can be represented as k r=1 ζ r , where ζ r is a sequence of independent random variables distributed as the exit time, say ζ z,µ , of one of the processes z + µt + σW t with Due to the independence of the sequence ζ r we have which is a convergent geometric series, due to β > 0 and the fact that ζ z,µ > 0 almost surely for all (z, µ) ∈ Z ± . This shows that (τ * i , ξ * i ) i≥1 is an admissible producer's impulse strategy and concludes the proof.
Proof of Proposition 4. Here, notice that x + h = y h so that, given producer's priority in case of simultaneous interventions (cf. Remark 2), the drift is always equal to µ + (recall that we are in the case µ 0− = µ + ). Hence, this proof can be performed as the one of Proposition 3, by ignoring the intervals where the drift is µ − so that the second half in the RHS of inequality (70) is zero. The admissibility is proved in the same way. The details are therefore omitted.

Equilibrium Dynamics Computation
Let (a, b) be an arbitrary interval and x ∈ (a, b) be an interior starting location. We define δ + (x; a, b) to be the first passage time associated to the interval (a, b) of a Brownian Motion with drift µ + starting from x and P + (x; a, b) to be the probability that this BM hits a before b (similarly for δ − (x; a, b) and P − (x; a, b) associated to drift µ − ). These quantities admit explicit expressions, see [6].
The expected time τ − := inf{t : µ t = µ − } for µ t to switch from µ + to µ − within a double-switch and one-sided impulse equilibrium is then where P is the transition matrix of M * n . Above, the first term denotes the time to either reach x + (producer impulses up) or y h (switch to contraction); the second term counts the additional time if x + is reached first multiplied by the respective probability P + (x 0 ; x + , y h ). Let ζ be the resulting vector of expected sojourn times. Then the long-run proportion of time that X * carries a positive drift (µ + ) is and similarly the long-run proportion associated to a negative drift (µ − ) is ρ − = 1 − ρ + .