Jean-Henry Ferrasse
email: jean-henry.ferrasse@univ-amu.fr

Nandeeta Neerunjun
email: nandeeta.neerunjun-demaiziere@univ-amu.fr

Hubert Stahn
email: hubert.stahn@univ-amu.fr

Managing intermittency in the electricity market

Keywords: electricity market, renewables, intermittency, demand flexibility JEL classification: Q41, Q42, D61, G13

We analyze the integration of intermittent renewables-based technologies into an electricity mix comprising of conventional energy. Intermittency is modeled by a contingent electricity market and we introduce demand-side flexibility through the retailing structure. Retailers propose diversified electricity contracts at different prices allowing consumers to choose their optimal electricity consumption. These contracts are modeled by a set of state-contingent electricity delivery contracts. We show existence and uniqueness of a competitive equilibrium of the contingent wholesale and retail markets. We provide a welfare analysis and only obtain constraint efficiency due to a limited number of delivery contracts. Finally, we discuss the conditions under which changing the set of delivery contracts improves penetration of renewables and increases welfare. This provides useful policy insights for managing intermittency and achieving renewable capacity objectives.

Introduction

The integration of renewables into the electricity mix is widely accepted as having a significant role to play in decarbonizing the electricity industry. Most particularly, the International Energy Agency reports on the deployment of energy sources as wind and solar helping in increasing renewables-based electricity. Still, their share in the global electricity mix remains quite modest, 7% in 2018 (IEA (2019)). A persisting obstacle to the adoption of these renewables lies in fact in their variable and uncertain nature, collectively referred as intermittent (see Perez-Arriaga and Batlle (2012), [START_REF] Verzijlbergh | Institutional challenges caused by the integration of renewable energy sources in the european electricity sector[END_REF]).

Electricity from renewables varies significantly with natural and uncontrollable conditions 1 . These render the production process from renewable technologies not only intermittent but also inflexible, technically termed as non-dispatchable 2 . Hence, the integration of renewable electricity adds a new source of intermittency on the grid; demand intermittency being a long-existing phenomenon already managed with investment in dispatchable 2 power plants mainly (IEA (2011)). So, intermittency from renewables challenges the imperative of the electricity industry to constantly balance supply and demand. Disruptions in this balance have both technical and economical impacts 3 . Contrary to demand intermittency, this new source of intermittency still needs to be tackled.

In the above context, introducing flexibility in the electricity market is recognized as a solution to managing renewables intermittency [START_REF] Cochran | Flexibility in 21st century power systems[END_REF], EURELECTRIC (2014), IEA (2011), IEA-ISGAN (2019)). Now, flexibility can be implemented upstream of the market so that supply follows demand. For example, through existing or new flexible power plants, storage capacities [START_REF] Benitez | The economics of wind power with energy storage[END_REF], [START_REF] Green | Storing wind for a rainy day: What kind of electricity does denmark export?[END_REF], Pommeret and Schubert (2019), [START_REF] Sioshansi | Increasing the value of wind with energy storage[END_REF]) and interconnection [START_REF] Abrell | Cross-country electricity trade, renewable energy and european transmission infrastructure policy[END_REF], [START_REF] Yang | Electricity interconnection with intermittent renewables[END_REF]). It can also be developed downstream through demand-side flexibility, requiring demand to follow supply. In this paper, we focus on the latter.

The main objective of our work is to provide an approach to manage intermittent supply by means of demand flexibility in the retail market. The importance of demand flexibility was highlighted with the question of optimal investment in production capacity to meet intermittent demand. [START_REF] Borenstein | On the efficiency of competitive electricity markets with time-invariant retail prices[END_REF] and [START_REF] Joskow | Reliability and competitive electricity markets[END_REF] study one weakness of the electricity market to derive optimal investment programs. They point out the disconnection between wholesale prices that vary with electricity provision 1 As examples, electricity production from wind turbines fluctuates with wind speed and direction and that from solar photovoltaic with radiation intensity [START_REF] Crawley | The World Scientific Handbook of Energy[END_REF]).

2 Renewable technologies such as wind turbines and solar photovoltaic are non-dispatchable as their output cannot be turned on, off or adjusted according to variations in electricity demand. In contrast, conventional generators such as coal, nuclear, hydro and gas power plants are controllable and dispatchable. See for instance IEA-ETSAP and IRENA (2015) on dispatchable and non-dispatchable technologies. 3 Mismatches between supply and demand can lead to, for example, frequency fluctuations which in turn cause brown-outs or blacks (see [START_REF] Passey | The potential impacts of grid-connected distributed generation and how to address them: A review of technical and non-technical factors[END_REF] for instance). These result in heavy economic losses such as manufacturing and sales losses, interruption of services, etc. See, for example, [START_REF] Küfeoglu | Interruption costs of service sector electricity customers, a hybrid approach[END_REF] on the economical consequences of power outages on service sector customers.

and retail tariffs such as the flat tariff which do not reflect these changes 4 . Consumers are therefore unaware of varying wholesale market conditions including those where expensive power plants are run to meet peak demands. In a framework where demand is intermittent, [START_REF] Borenstein | On the efficiency of competitive electricity markets with time-invariant retail prices[END_REF] and [START_REF] Joskow | Reliability and competitive electricity markets[END_REF] suggest the implementation of time-varying tariffs such as Real-Time-Pricing (RTP) 5 to improve efficiency of the market in terms of capacity investment. In practice, time-varying tariffs that have been developed also include Time-of-Use (ToU), Critical Peak Pricing (CPP) and Variable CPP. These tariffs are abled to shape demand thereby reducing peaks 6 and investments in expensive peaking power plants used only for a few hours during a year (IRENA (2019)). Since these retail contracts can stabilize demand intermittency, we now propose to tap into them or use more sophisticated ones to adjust demand according to intermittent supply.

Can retail contracts be designed to unlock demand flexibility and ease the integration of intermittent renewable technologies? As part of their work, [START_REF] Ambec | Electricity provision with intermittent sources of energy[END_REF] and [START_REF] Rouillon | Optimal and equilibrium investment in the intermittent generation technologies[END_REF] address this question and find the optimal investment in renewable capacity in a framework with intermittent supply. While Ambec and Crampes (2012) consider that consumers can use either a flat retail tariff or one that varies with the availability of the intermittent source of energy (by anology RTP), [START_REF] Rouillon | Optimal and equilibrium investment in the intermittent generation technologies[END_REF] considers that there is a mix of both consumers. Our work differs in that matter as we want to take into account more diversified retail contracts than the polar flat-tariff and RTP contracts.

To investigate the above question, we have in mind a theoretical framework of capacity investment and electricity production with two types of energy sources: an intermittent and non-dispatchable source such as wind or solar and a non-intermittent and dispatchable source such as nuclear or fossil fuel. We propose that electricity production due to the integration of the intermittent renewable technology depends on conditions such as weather (e.g., "with" or "without" the intermittent source) or times of day (night, dawn, daytime and dusk). We refer to these conditions as states of nature. Electricity production is therefore state-contingent. We consider that the wholesale market is a contingent one where contingent electricity is traded at contingent prices. We further propose that retailers introduce demand flexibility in the retail market through diversified electricity delivery contracts supplied at different prices. These allow consumers to choose their optimal electricity consumption based on their flexibility. The diversity of the de-livery contracts is depicted through what we call base state-contingent electricity delivery contracts whose structure is similar to the asset structure in the incomplete market theory (see for instance [START_REF] Magill | Theory of Incomplete Markets[END_REF]). These base delivery contracts can well generate contracts with flat and time-varying tariffs but one can also think of more complex contracts depending on weather conditions or on the pressure on the wholesale market. In this paper, we provide a general model for the structure of the base state-contingent electricity delivery contracts.

Considering a competitive setting, we show existence and uniqueness of the equilibrium of the state-contingent wholesale and retail markets in which the optimal investment in intermittent renewable capacity is endogenous. Assuming that the base state-contingent electricity delivery contracts structure is not rich enough to generate delivery contracts allowing perfect adjustment of demand to variations in supply, we find that we are in a situation of missing markets. This lack of richness can be explained, for instance, by variations in conditions and thereby electricity supply at a level of granularity which is too fine to incite response from consumers. We nevertheless show that the electricity market equilibrium and social welfare are constraint efficient. The constraint is induced by the limited number of the base delivery contracts which constrains electricity allocations. We are also able to determine the conditions under which changing the base delivery contracts improves (i) welfare, (ii) the degree of integration of the renewable capacity and (iii) both. Ultimately, we find that it is impossible to find a change in the delivery contracts structure which both increases investment in renewable capacity and reduces the production of conventional electricity in each state of nature.

The rest of the article is organized as follows. We start with a key example in Section 2. Section 3 presents the theoretical framework and the main assumptions. In Section 4, we describe the electricity contract markets and derive some useful properties of electricity demand. Section 5 studies state-contingent electricity supply and describes market equilibrium. Section 6 discusses the issue of constraint welfare and missing markets. In Section 7, we analyze the impact of changing state-contingent delivery contracts on social welfare, investment in intermittent renewables capacity and conventional production. Section 8 concludes. Technical proves are relegated to the appendix.

A key example

We begin by an introductory, built-in example of our framework where we consider a perfectly competitive electricity market with 2 producers, 1 retailer and 1 consumer. Producer 1 plans to install a solar photovoltaic (PV) power plant and producer 2 operates a long-existing coal power plant. In this market, electricity production from both power plants depends on two weather conditions given by s ∈ {1, 2} where for instance 1 = "sunny"and 2 = "not sunny". They occur respectively with probabilities π and 1 -π which are objectively known by all the agents. Producer 1 plans to install capacity κ of the solar PV power plant which for each unit of the capacity produces 1 unit of electricity when s = 1 and 0 unit when s = 2. He bears only an investment cost of K(κ) = 1 2 κ 2 . Producer 2 produces y s units of electricity at cost c s (y s ) = 1 2 (y s ) 2 . Electricity produced in each s is traded on the corresponding wholesale market at price p s . As for the retailer, he buys electricity on the wholesale markets and sells an electricity delivering contract which supplies 1 unit of electricity when s = 1 and a units when s = 2. When a = 1, we can identify the retail contract to the flat contract. The price of a contract is given by q and the quantity of contracts sold by the retailer by θ r . Finally, the consumer buys quantity θ c of the retail contract to receive x s units of electricity for each s. Considering a von Neumann-Morgenstern setting, his expected utility of electricity consumption is given by EU(x s ) = 2 s=1 π s ln x s and budget by m 0 . First, let g = g 1 g 2 = 1 0 be the intermittent productivity of each unit capacity of the solar PV power plant, A = a 1 a 2 = 1 a , electricity delivering structure of each unit of the retail contract and x = x 1 x 2 = Aθ c , electricity consumption of the consumer induced by the retail contract structure A. We can now go through the behavior of each agent.

Starting with the consumer, we observe that the delivering contract, A, imposes a constraint on his electricity consumption. For instance when A = 1 1 , he will consume the same quantity of electricity units x s under all weather conditions. So given A, the ex ante objective of the consumer is to choose quantity θ c of the retail contract at unit price q which maximizes his expected utility of electricity consumption x under a given budget m 0 . If m is a composite goods regrouping all goods other than electricity and with price set to 1, the utility maximization program of the consumer which is linear in m writes:

max θc,m EU (x) + m s.t. x = Aθ c q * θ c + m = m 0 (1)
By substitution, we simplify the program in terms of θ c and write the first order condition:

π θ c * + 1 -π θ c * -q * = 0 =⇒ θ c * = 1 q * (2)
We now move to the retailer who derives revenues from quantity θ r of retail contracts sold at price q. His expected cost per unit contract is simply his expected expenditure on quantity a 1 and a 2 of electricity units procured on the wholesale market at expected prices. In fact, the expected cost associated to the retail contract structure A is by construction linear in quantity θ r . His ex ante profit maximization program is straightforward:

max θr q * -2 s=1 a s π s p s * θ r =⇒ q * = πp 1 * + a(1 -π)p 2 (3)
At this point, we can say that the retail market clears when the retailer supplies exactly the quantity of contracts that is demanded by the consumer, that is θ c * = θ r * . Given this, q * is the price of retail contracts that clears demand and supply on the retail market. Furthermore, we observe that the demand for retail contracts from the consumer leads to a demand for electricity from the retailer which is conditional on weather conditions and given by Aθ c * . Let us shift to the supply side of electricity starting with producer 1 who invests in the solar PV power plant. Given g, the producer expects revenues from a random production traded at expected wholesale prices. His objective is therefore ex ante to maximize his profits per unit capacity κ by equating his expected revenues to his marginal cost of investment : max

κ κ 2 s=1 g s π s p s * - 1 2 κ 2 =⇒ κ * = πp 1 * (4)
As for producer 2, he has a flexible electricity production from the coal power plant. He therefore maximizes his profits simply by adapting his production plan in each weather condition s such that the wholesale price of electricity in state s equates his marginal cost of production in state s. Since this cost is, here, of c s (y s ) = 1 2 (y s ) 2 we get:

p * 1 = y * 1 , and p * 2 = y * 2 (5)
Finally, we can write the market clearing conditions equating supply and demand of electricity on the wholesale markets:

y * + κ * g = Aθ c * =⇒ p * 1 p * 2 + πp * 1 1 0 = 1 a 1 πp 1 * + a(1 -π)p * 2 (6)
and the electricity prices at equilibrium are:

p * 1 = (1 + π) γ (1 + π) γ and p * 2 = a (1 + π)γ γ , (7)
where γ = π + a 2 (1 -π 2 ) > 0.

We now turn to social welfare in this example. In this case, the existence of delivering contracts acts as a constrain on trade. Here, the existence of a unique contract A implies that x 1 = θ and x 2 = aθ or x 1 = ax 1 . The constraint social welfare solution therefore solves:

max x,y,κ SW = EU(x) -2 s=1 π s c (y s ) -K(κ) s.t.
xy -κg = 0

x 2 = ax 1 (8)
We denote by λ = ( λ 1 λ 2 ) the Lagrangian multiplier associated with the first constraint and µ that with the second constraint to obtain the first-order conditions:

π x 1 * -λ 1 + aµ = 0, 1 -π x 2 * -λ 2 -µ = 0 =⇒ π x 1 * + a(1 -π) x 2 * = λ 1 + aλ 2 (9)
κ * = λ 1 ( 10
)
y 1 * = λ 1 π , y 2 * = λ 2 1 -π (11)
From these equations, we immediately observe that the electricity production plan and allocation are constraint efficient in this market. In fact, if we identify λ = ( λ 1 λ 2 ) to the vector of expected prices, ( πp 1 (1 -π)p 2 ) , the above conditions are exactly the same as the utility and profit maximization conditions for the agents found earlier.

Eq.( 9) can be identified to Eq.(2) knowing that x = Aθ and by substituting the solution to Eq.( 3) into (2). Eq.( 10) is identified to (4) and Eq.( 11) to [START_REF] Borenstein | On the efficiency of competitive electricity markets with time-invariant retail prices[END_REF].

Lastly, want to analyze what happens when we change a in the retail contract structure ( 1 a ) . We start by optimal social welfare which can be rewritten as:

SW * = πln π λ 1 -aµ + (1 -π)ln 1 -π λ 2 + µ - λ 1 2 2π - λ 2 2 2(1 -π) - λ 1 2 2 ( 12
)
where

λ 1 = π √ (1+π)γ (1+π)γ , λ 2 = a(1-π) √ (1+π)γ γ and µ = π(1-π)(1-a 2 (1+π)) √ (1+π)γ a(1+π)γ So, dSW * da = µ π λ 1 -aµ = µx * 1 =⇒ dSW * da = π (1 -π) (1 -a 2 (1 + π)) aα (13)
Now, we know that µ is associated to the constraint of the retail contract structure which restricts electricity consumption. One first thing to note is that µ = 0 or else this constraint is not restrictive. We can therefore say that optimal social welfare can be increased by increasing a when µ > 0 and decreasing a when µ < 0.

Also, we can analyze the impact of changing a on equilibrium prices p * 1 and p * 2 :

dp * 1 da = - a(1 -π 2 ) (1 + π) α 3 (1 + π)α 3 < 0, dp * 2 da = π (1 + π) α 3 α 3 > 0 (14)
From the above, we conclude that the optimal solar PV capacity can be increased by decreasing a since κ * = πp * 1 . This will be at the expense of increasing production from the coal power plant in s = 1 (y * 1 = p * 1 ) while in s = 2, production decreases (y * 2 = p * 2 ). We now formalize this example and results in a theoretical model. We will leave behind the objective probabilities and the Von Neumann setting in order to simplify notations in our general framework of an electricity market contingent on conditions s. Also, since we will consider more than 1 retail contract, we will ensure that their prices are free of arbitrage so that there is no trade which costs nothing and gives electricity or money in return.

The main assumptions

Our paper principally aims at addressing two crucial features of renewables: intermittency and decision on optimal investment in capacity. For this purpose, we use a static framework. However, intermittency is not only a matter of physical conditions on which renewables depend but also how these change over time 7 . As such, there is a dynamic effect in electricity production from renewables which we capture by a set of states of nature s ∈ {1, . . . , S}. Since electricity production is state-contingent and the wholesale market being organized in each state, we denote by p(s) the contingent electricity price in state s and by p = (p 1 , . . . , p S ) ∈ R S the vector of all state-contingent prices. This choice allows us not to explicitly introduce probabilities nor to introduce a Von Neumann Morgenstern setting.

Another important feature of this framework is with respect to decision-making. Intermittent producers behave ex ante, i.e before the realization of the states of nature. They choose how much to invest in renewables-based capacities by anticipating their future returns. Likewise, conventional producers choose their dispatchable production strategy beforehand. Retailers and consumers ex ante exchange retail contracts based respectively on their expected profits and utility for ex post electricity deliveries, that is deliveries based on realization of the states of nature.

Keeping these two features in mind, we can now move to describing each agent of the electricity market.

The intermediary retailing structure between electricity production and consumption is one of the novelties of the model. In fact, we assume that consumers do not have direct access to the electricity wholesale market. They buy delivery contracts from competitive retailers. These delivery contracts are constructed by using base state-contingent delivery contracts. To illustrate the idea behind these, let us take for instance a Time-Of-Use retail contract with an off-peak period during the night and peak periods during the day and dusk. We can depict three states of nature: night (s 1 ), day (s 2 ) and dusk (s 3 ). Say that this contract can be broken down into two base state-contingent delivery contracts: an off-peak contract k 1 at price q 1 which delivers a 1 units of electricity in s 1 and a peak contract k 2 at price q 2 which delivers a 2 and a 3 units of electricity in s 2 and s 3 respectively. If retailers trade these base delivery contracts, consumers can now buy independently quantities θ 1 and θ 2 of k 1 and k 2 respectively to have the desired electricity consumption for each state of nature. Now retailers can also trade linear combinations of the base delivery contracts. For example, instead of two delivery contracts, they can trade a single one, k 3 , with electricity deliveries a 1 , a 2 and a 3 at price q 3 . Consumers will buy quantity θ 3 of this single contract.

We now materialize the idea that existing or more sophisticated retail contracts can be constructed from base state-contingent electricity delivery contracts. We provide a general model for the latter and for simplicity we assume that trade is done on the base state-contingent delivery contracts (even if, as we have seen in our example, trade can also be done on linear combinations of the base contracts). We say that the holder of one unit delivery contract k has the right to a random electricity consumption of a k = (a 1k , . . . , a Sk ) where a sk ≥ 0 denotes electricity delivered in state s. We introduce a set K = {1, . . . , K} of unit contracts a k which are traded on K competitive markets at price q = (q 1 , . . . , q K ) where q k stands for the price of one unit of contract k. We summarize the electricity delivery in the (S,

K) matrix A = [a k ] K k=1 ∈ R SK + . So, if θ= (θ 1 , . . . , θ K ) ∈ R K denotes a portfolio of contracts, Aθ ∈ R S
describes the random electricity flow induced by portfolio θ. We also introduce some assumptions on A. We first say that K < S. When K = S, there are as many delivery contracts as states of nature which provide perfect information on wholesale market conditions and allow effective adjustment of demand to fluctuating supply. Here we make the analogy to Real Time Pricing contract which can be represented by S delivery contracts. But the interesting question to be asked is what if A SK is not rich enough to provide a perfect adjustment of demand to intermittent supply. Indeed, while the supply side is characterized by variations in production with a high level of granularity, consumers, on the other hand, may be sensitive to smoother variations depicted by K < S contracts, a condition of missing markets. We are interested precisely in such a situation. Secondly we say that A is of full rank, here rank(A) = K. This simply means there is no redundant contract, i.e. a contract which can be obtained by a portfolio of the other contracts. Finally we assume ∀s, ∃k, a sk > 0, i.e. there always exists an asset which delivers electricity in a given state.

The retailers, in this setting, work as intermediaries. They sell, ex ante, delivery contracts θ r at price q and, ex post, provide the required amount of electricity to the contract owner, electricity that they buy on the wholesale market. In other words, if a retailer sells a portfolio θ r , his return is of q θ r while his expected cost due to electricity delivery is of p Aθ r . His supply follows a competitive profit maximization strategy. Finally, let us observe that the transformation process from contract to electricity delivery is linear. We can therefore replace the set of all retailers by a representative one.

The renewable energy technology, in addition to being intermittent, is non-dispatchable. To ensure non-dispatchability, we introduce an ex ante capacity choice κ ∈ R + and model intermittent electricity productivity as the random variable g = (g 1 , . . . , g S ) ∈ R S ++ which describes the state contingent production per unit of capacity. The cost of investing in capacity κ of the technology is given by K(κ) and we assume that K(0) = 0, ∂K(κ) > 0 and ∂ 2 K(κ) > 0 as usually described in literature (e.g.Rouillon (2015)) 8 . Renewable electricity production is equal to κg and without loss of generality, we normalize shortrun marginal cost of production to zero 9 . We finally assume that the optimal investment in capacity and therefore the state contingent production of electricity follows from a competitive profit maximizing behavior.

The conventional energy technology is an existing and fully established one. Its purpose is to act as a back-up capacity of dispatchable electricity generation compensating for fluctuations from the intermittent renewable energy technology. It ensures reliable electricity provision in the absence of demand flexibility. We assume that there is no capacity constraint since electricity production for all s ∈ S does not exceed installed capacity. As the intermittent renewable technology, electricity production from the conventional technology is state contingent too. We denote it by y = (y 1 , . . . , y S ) ∈ R S + . The implementation of such a random production strategy is assumed to have an ex ante production cost C (y). However to capture the idea that the electricity generation is dispatchable, we assume that this cost is additively separable state by state, i.e. C (y) = S s=1 c s (y s ). Moreover, we say that in each state inactivity is allowed and the production cost is increasing at an increasing rate, i.e. c s (0) = 0, ∂c s (y s ) > 0 and ∂ 2 c s (y s ) > 010 and assume, as for the renewable energy sector, that the optimal production plan is derived from a competitive profit maximizing behavior.

The consumption decision is derived from utility maximization of a competitive representative agent. Within our partial equilibrium setting, we assume that this consumer derives his ex ante utility from his random electricity consumption x = (x 1 , . . . , x S ) ∈ R S + and from money m ∈ R that he does not spend for the consumption of this good. We assume, as usually in a partial equilibrium setting, that his utility is linear in money, i.e. U (x, m) = U(x) + m and that the consumer owns a global amount of money, m 0 > 0. The utility associated to random electricity consumption is a continuously differentiable function U(x) which is is increasing and strictly concave, i.e. ∂U(x) 0 and ∂ 2 U(x) is negative definite. We even assume that electricity is a desired good in each state of nature in the sense that for any sequence x n of random electricity consumption with the property their exists a state s for which the consumption becomes zero, the global marginal utility, measured as norm of the gradient becomes large and reciprocally. More formally we say that ∀x n → x 0 , with some x 0,s = 0, lim n ∂U(x n ) → ∞. Finally, let us remember that the consumer has no direct access to the electricity wholesale market but only to the set of contracts proposed by the retailer. His objective is therefore to choose, at price q ∈ R K + , a portfolio θ c ∈ R K of contracts which induces an electricity consumption of x = Aθ c and which maximizes his utility under a standard budget constraint.

To summarize this discussion, let us now propose a definition of an equilibrium. Definition 1. An equilibrium of the contingent electricity markets and the different delivery contract markets is given by a vector

(θ * c , m * , θ * r , y * , κ * , p * , q * ) ∈ R K+1 ×R K ×R S + × R + × R S + × R K + such that: (i) the representative consumer maximizes his utility i.e. (θ * c , m * ) ∈ arg max (θc,m)∈R K+1 U (Aθ c ) + m s.t. Aθ c ≥ 0 (q * ) θ c + m = m 0 (15)
(ii) the retailer maximizes profit, i.e.

θ * r ∈ arg max θr∈R K (q * ) -(p * ) A θ r (16)
(iii) the conventional production plan maximizes profit, i.e.

y * ∈ arg max

y∈R S + (p * ) y -S s=1 c s (y s ) (17)
(iv) the investment in the renewable technology is profit maximizing, i.e.

κ * ∈ arg max

κ∈R + κ (p * ) g -K(κ) (18)
(v) the contract and contingent electricity markets clear, i.e.

θ * r = θ * c and y * + κ * g = Aθ * r ( 19
)

Contract markets and the demand for electricity

Let us first remember that electricity delivery is indirectly obtained through our base contracts which work like financial assets. The existence of an equilibrium therefore requires a no-arbitrage condition. This means here, loosely speaking, that there exists no portfolio of contract which costs nothing and furnishes electricity in at least one state otherwise everybody would purchase this portfolio which is in contradiction with market clearing. To construct this no-arbitrage condition, let us define the (S + 1, K) matrix W given by W = -q A . If there exists a portfolio θ ∈ R K with the property that Wθ≥ 0 with at least one strict inequality, we can conclude that there exists an arbitrage portfolio because this one pays back either money or electricity in at least one state s 0 ∈ S without generating a cost in terms of money or electricity in the other states. The existence of an equilibrium therefore requires some additional restrictions. This is where Farkas' Lemma enters the story which claims that:

θ∈R K , Wθ≥ 0 (at least one strict) ⇔ ∃β∈R S+1 , β 0 and β W = 0

Moreover if such a β exists, the same must be true for the vector 1 β 1 where β 1 ∈R S ++ is composed of the S last components of β divided by its first one. Owing to the block decomposition of W, the no-arbitrage condition becomes:

∃β 1 ∈R S , β 1 0 and q = A β 1 (21)
If we now move to the study of the consumer's demand for contracts, we need to restrict the set of asset prices to the open set Q given by :

q ∈Q = q ∈R K : q = A β 1 with β 1 ∈R S ++ (22)
Moreover, from Eq.( 15) of definition 1, the demand for contracts, θ c (q), can be rewritten as:

θ c (q) = arg max θ∈R K U (Aθ) -q θ s.t. Aθ ≥ 0 (23)
The existence of a solution of this unbounded problem is not really an issue if the noarbitrage condition is satisfied (see proof of proposition 1). We can even claim that the constraint Aθ≥ 0 is never binding since we have assumed that the marginal utility becomes "large"as the consumption in one state goes to zero. Finally since U is strictly concave, we can say that the demand for contracts solves the following first order condition:

A ∂U (Aθ) -q = 0 (24)
Moreover by applying the Implicit Function Theorem to the above equation, one can compute the Jacobian of θ c (q) and show that this matrix is symmetric and negative definite. This means (i) the effect of the change of the price of contract k on the demand of contract k is the same as the change of the price of contract k on the demand of contract k and (ii) the demand for a contract is decreasing with its own price. We can even characterize the boundary behaviors of the contract demand. The first follows from the no-arbitrage condition. In fact, if we take a sequence q n of contract prices free of arbitrage which converges to an arbitrage price, we can even expect that the sequence of optimal portfolio choice θ c (q n ) solving Eq.( 15) of definition 1 is unbounded, i.e. θ(q n ) → ∞, simply because at the limit the consumer is willing to buy an infinite amount of the arbitrage portfolio. The second follows from our boundary condition on the marginal utility associated to the first order condition (see Eq.( 24)). It says that if some contract prices q k become very high, i.e. q n → ∞, the same must be true, by Eq.( 24), for the marginal utility which induces that the electricity consumption in some states become zero. The next proposition summarizes these results.

Proposition 1. The demand of contract is a differentiable function θ c : Q → R K with the property that: (i) ∂θ c (q) = (A ∂ 2 U (Aθ c (q)) A) -1 is a symmetric and negative definite matrix (ii) If ∀n , q n ∈ Q and q n → q 0 with q 0 ∈ bd (Q) then θ c (q n ) → ∞ (iii) If ∀n , q n ∈ Q and q n → ∞ then ∃s 0 ∈ S, (Aθ c (q n )) s 0 → 0

Let us now move to the contract supply. From definition 1, we know that the portfolio supplied by the representative retailer solves max θ∈R K (q -p A) θ. Since this program is linear in θ, we can immediately assert that a finite solution exists if and only if q = A p Moreover at that portfolio price, his profit is zero and he is indifferent between any kind of supply θ r . Under market clearing, he therefore supplies exactly what is asked by the consumer, i.e. the equilibrium contract markets quantity θ (p) = θ c (A p) which is now a function of the state contingent electricity prices. But trading an amount of θ (p) contracts also engages the retailer to provide the consumer with the required amount of electricity in each state of nature. This state contingent demand of electricity D : R S ++ → R S is given by:

D (p) = Aθ c (A p) (25)
This demand for electricity is therefore directly deduced from the consumer's contract demand and hires several properties induced by proposition 1. First of all, we notice that this demand for electricity is only defined for strictly positive prices, p ∈ R S ++ , otherwise the no arbitrage condition given by Eq.( 21) is violated. In the same vein, if at least one of the contingent prices becomes zero, i.e. p → p 0 with some p 0,s = 0, the contract price vector q is no more free of arbitrage. The consumer will therefore take advantage of this opportunity to increase his electricity consumption by an adequate portfolio choice. One can therefore expect that the retail electricity demand which fulfills these contracts becomes large, i.e. D (p) → ∞. A contrario, if some contingent prices become large, i.e. p → ∞, we know since A ≥ 0 and ∀s, ∃k, a sk > 0 that the contract prices must become large, q → ∞. It immediately follows from (iii) of proposition 1 that the electricity consumption, and therefore the demand of the retailer must go to zero in at least one state, i.e. ∃s 0 ∈ S, (D (p n )) s 0 → 0. We can finally deduce the Jacobian of D (p) from that of θ c (q). This one is :

∂D (p) = A∂θ c (A p)A (26)
This matrix is again symmetric and induces the same interpretation as earlier but it is only negative semi-definite. The explanation for this is quite obvious. If one considers a state contingent price change which does not affect the contract prices, i.e. a price change in the ker (A ) of dimension S -K, the contract demand does not change and therefore the electricity demand of the retailer as well. The next proposition summarizes this discussion.

Proposition 2. The state contingent demand of electricity is a differentiable function D : R S ++ → R S which under the no-arbitrage condition is defined for strictly positive state contingent electricity prices p with the property that:

(i) ∂D (p) = A∂θ c (A p)A is a symmetric and negative semi-definite matrix (ii) If ∀n, p n ∈ R S ++ and p n → p 0 with some p 0,s = 0 then

D (p n ) → ∞ (iii) If ∀n, p n ∈ R S
++ and p n → ∞ then ∃s 0 ∈ S, (D (p n )) s 0 → 0

The state contingent electricity supply and the market equilibrium

The production level of the conventional sector is obtained by solving the profit maximization program given by Eq.( 17) of definition 1. This sector has the ability to adjust its production plan in each state since the contingent cost is additively separable. It follows that in each state the optimal production level simply equates the state contingent price to the marginal cost in state s:

∀s ∈ S, p s = ∂c s (y s ) ⇔ y s = (∂c s ) -1 (p s ) (27)
The contingent supply of the conventional sector is therefore given by Y :R S ++ → R S + with Y(p) = (∂c s ) -1 (p s ) s∈S . Under our assumption on the different cost function c s (y), we can claim as usual that the supply in each state, y s (p s ), is increasing with the state contingent price because dys(ps) dps

= 1 ∂ 2 c((∂cs) -1 (ps)) > 0 ( 28
)
and satisfies usual boundary conditions: for a low price the supply goes to zero, i.e. lim ps→0 y s (p s ) = 0 while for a large price, supply becomes infinite, i.e. lim ps→+∞ y s (p s ) = +∞. Moreover, since the production decision is taken independently state by state, we can see that the Jacobian of this contingent supply, ∂Y(p), is a diagonal matrix, D, the s th diagonal term being dys(ps) dps > 0. Since this quantity is positive, we can even say that ∂Y(p) is positive definite.

Contrary to the conventional sector, the intermittent renewable energy sector is not able to adjust its production state by state. It chooses, ex ante, a production capacity which provides a random production level g per unit of installed capacity. This capacity choice is obtained by solving the profit maximization program given by Eq.( 18) of definition 1. Since p are state contingent prices, the optimal capacity choice will be simply obtained by equating the expected additional expected return, p g of a new unit of capacity, to its marginal cost, i.e.

∂K(κ)

= p g ⇔κ = (∂K) -1 (p g) (29)
The state contingent supply of the intermittent renewable energy sector, I :R S ++ → R S + , being of :

I(p) = (∂K) -1 (p g) g (30)
This contingent production is therefore not very reactive to price changes since the capacity choice is only responsive to the change of the expected returns. This fact can be easily observed by computing the Jacobian of I(p) which is given by :

∂I(p) = 1 ∂ 2 K((∂K) -1 (g p)) g g (31)
a matrix of rank 1 since every price change which is orthogonal to the random production plan g does not modify the investment and this set of prices is typically a subset of dimension S -1. But we can nevertheless observe that this matrix remains semi-positive definite since ∂ 2 K > 0. More precisely :

∀v = 0, v ∂I(p)v = 1 ∂ 2 K((∂K) -1 (g p)) (g v) 2 ≥ 0 (32)
But this state contingent intermittent production has another interesting property. In fact, as long as one assumes that the production of an installed unit is always strictly positive and even very small, i.e. g 0, the production level becomes, under our standard assumptions on K, infinite in each state when the prices p ∈ R S ++ become large, i.e. p → ∞.

At this point, we can now construct the contingent electricity supply S(p) = Y(p) + I(p) and summarize our results in the next proposition.

i) ∂S(p) = D+ 1 ∂ 2 K((∂K) -1 (g p)) g g with D a diagonal matrix of the generic term 1 ∂ 2 c((∂cs) -1 (ps)) (ii) ∂S(p) is positive definite (iii) If ∀n, p n ∈ R S
++ and p n → ∞ then ∀s ∈ S, (S(p)) s → +∞ (iv) If ∀n, p n ∈ R S ++ and p n → p 0 with some p 0,s = 0, S(p n ) → S(p 0 ) ≥ 0 and finite

We now can move to market clearing as given by Eq.( 19) of definition 1 and first consider the state contingent electricity markets. From proposition 2, we conclude that state contingent demand of electricity as depicted by the function D(p) is monotonically decreasing while supply, given by the function S(p) from proposition 3, is monotonically increasing. Subject to the boundary behaviors of D(p) and S(p), we can say that there exists a unique set of prices p * ∈ R S ++ that brings demand and supply on the different state contingent electricity markets into equilibrium. Finally, knowing the relationship between free-arbitrage contract prices q and p, we deduce that the different contract markets are cleared at price q * = A p * ∈ R K ++ .

Proposition 4. There exists a unique contingent price vector p * ∈ R S ++ which clears the different state contingent electricity markets and an associated electricity delivery contract price vector q * = A p * ∈ R K ++ which is free of arbitrage and clears the different contract markets.

Equilibrium and Welfare: the missing market issue

Up to now, we have shown that one can consider an equilibrium structure in which sophisticated state-contingent delivery contracts may exist. The basic questions which remain open concern the richness of the available base contracts and the effect of their change on the equilibrium of the electricity market. Our aim here and in the next section is to point out that the contract structure matters as long as this one is unable to provide an effective adjustment of the demand to the fluctuations of the supply. In our model, this directly follows from the fact that the number of base contracts, K, is smaller than S, the number of states of nature. This restricts the potential contingent electricity consumptions to the linear subspace generated by the columns of A, i.e. x ∈ span(A). There are, in some sense, missing markets (with rank(A) < S).

To gain a better understanding of this problem, let us come back to the consumer's program ((i) of definition 1). His portfolio choice is essentially motivated by the electricity consumption that he obtains. So if he faces two contract structures A and A with the property that span(A) = span(A ), he simply adjusts his demand for this contract in order to maintain the same state contingent electricity consumption. In other words, we can say that A is equivalent to A in terms of electricity demand, i.e. A ∼ e A . Since ∼ e is an equivalence relation, we can even restrict our attention to contracts induced by a representative element of each indifference class of ∼ e . To identify this element, we introduce a simplifying assumption which say that the full rank matrix A can be decomposed into

A S-K A K
where A K is an invertible matrix of dimension K and A S-K a matrix of dimension (S -K, K) 11 . Under this assumption, by simply changing the portfolio to θ B = A K θ A , any electricity allocation, x = Aθ, can be obtained with the equivalent contract structure:

B I K with B = A S-K (A K ) -1 (33)
This observation clearly suggests that we can take a matrix B I K as a representative element of a family of contract structure given by:

A = BC C with C any invertible matrix of dimension K (34)
This observation has another consequence. If we restrict our attention to delivery contracts given by B I K , we can say that the contingent electricity consumption, x, satisfies:

x = B I K θ ⇔ θ = (x s ) K s=S-K+1 I S-K -B x = 0 (35)
This clearly says, for K < S, the potential electricity consumption that our consumer can obtain from the delivery contract structure is limited to the set of all x which satisfies

I S-K -B x = 0 (36)
This means the existence of a limited amount of delivery contracts reduces the trade capacity of the consumer and restricts the adjustment capacity of the electricity demand to the fluctuations of the supply. To summarize, we can say :

Proposition 5. Under our assumptions on the base contract structure A: (i) The equivalent contract structure as given in Eq.( 33) provides the same electricity allocation at the same contingent prices. Only contract prices and portfolio adjust and are given by

(q B , θ B ) = A -1 K q A , A K θ A (ii)
Reciprocally, the electricity allocation and prices induced by the contract structure as given in Eq.( 33) remain the same for every element of the family given by Eq.( 34). The associated contract price and portfolio are (q A , θ A ) = (C q B , C -1 θ B ) (iii) A contract structure A equivalent to the structure as given in Eq.( 33) induces a restriction on electricity trades given by I S-K -B x = 0 From this proposition, we will mainly restrict our attention to the contract structure given by B I K in the rest of this paper. But point (iii) of proposition 5 shows another aspect of the introduction of intermittent renewables. In fact, as long as the set of contracts proposed to the consumer is not large enough, i.e. K < S, his potential state contingent consumptions are constrained by Eq.(36). It is therefore impossible to reach a first best allocation (unless this one satisfies this set of restrictions). In other words, even in our competitive setting, Pareto-optimality is out of reach and it is always interesting to see how changes in the contract structure affect welfare. To address this question, let us first introduce a notion of constrained efficiency:

Definition 2. An electricity production plan and allocation (ỹ, κ,

x) ∈ R S+1 + × R S + is constrained efficient iff it solves : SW (B) = max (y,κ,x)∈R 2S+1 + U(x) -C (y) -K(κ) s.t. x -y -κg = 0 I S-K -B x = 0 (37)
If we denote by λ= (λ s ) S s=1 and µ= (µ i ) S-K i=1 Lagrangian multipliers associated respectively with the first and second set of constraints, we obtain the following first order conditions

       ∂U(x) -λ- I S-K -B • µ= 0 -∂C (y) + λ= 0 -dK(κ) dκ + g • λ=0 (38)
If we identify, as usually, the Lagrangian multiplier, λ, to a contingent price vector, p, we immediately observe that the second and the third conditions of Eq.( 38) are exactly the same as the profit maximization conditions for, respectively, the conventional sector (see Eq.( 27)) and the intermittent sector (see Eq.( 29)). A same observation can be made for the first condition of Eq.(38) but it requires a little transformation. In fact:

∂U(x) -λ- I S-K -B • µ= 0 ⇔    B I K (∂U(x) -λ) = 0 µ= (∂ xs U(x) -λ s ) S-K s=1 (39)
The first condition of Eq.(39) becomes very close to the consumer's first order condition given by Eq.( 24). One simply has to remember that (i) we work with an equivalent contract structure and (ii) by the no-arbitrage condition and the identification of λ to p, we must have that q = B I K λ. The second condition defines µ whose interpretation is non-trivial in the context of our framework. Remember that µ is tied to the set of constraints on electricity allocation as defined by condition 2 of Eq.(37). One can therefore expect that µ = 0 otherwise all constraints on trades become ineffective. In other words, the first best consumption plan satisfies these restrictions on trades induced by the contract structure: a situation which surely does not resist to a slight perturbation of the utility function. In the next section in which we consider the effect of changing contracts, we will even sometimes assume that all components of µ are different from 0 meaning, loosely speaking, that the direction to the first best is a non-zero linear combination of all the restrictions on trades (i.e. the different lines of I S-K -B ).

In any case the above largely suggests that: Proposition 6. Any competitive electricity production plan and allocation issued from definition 1 is a constrained efficient allocation given by definition 2 and reciprocally.

Changing contracts

As long as welfare is concerned and at least one constraint on trade is effective (i.e. µ = 0), it is obvious that the introduction of an additional base contract to an existing contract structure A will be welfare improving as long as this one is linearly independent of the existing ones. The intuition is clear. If we move from a matrix A 0 of dimension (S, K) to A 1 of dimension (S, K +1) by adding a new column, the different electricity consumption profiles x = A 0 θ initially available remains reachable by simply not purchasing the new contract. Hence span(A 0 ) ⊂ span(A 1 ). This clearly means, if one remembers the definition of a constraint efficient allocation (see definition 2), that moving from a contract structure A 0 to A 1 must be welfare improving.

Instead of adding a new base contract, we now identify which changes of the existing contracts can be Pareto improving. Let us start with a given contract structure A or its equivalent matrix B. We can show (see proof of proposition 7) by a standard Envelope Theorem applied to the optimization problem of definition 2 that: ∀s = 1, . . . , S -

K, k = 1, . . . , K, ∂ b sk SW (B) = µ s x S-K+k = (∂ xs U(x) -λ s ) x S-K+k (40)
Considering the first best electricity consumption does not satisfy the trade constraints, i.e. µ = 0, (see our discussion in the previous section), we identify state s and asset k for which |µ s | x S-K+k is maximal. The above equation says that the largest effect on welfare can be obtained by increasing or decreasing b sk , whenever µ s > 0 or < 0. The question which remains open is the impact of changing b sk on the base contract structure A. Since several contract structures correspond to B (see (ii) of proposition 5), any change dB in this matrix induces several potential changes dA for A. Knowing B = A S-K (A K ) -1 (see (i) of proposition 5), one simply has to make sure that:

dA S-K = (dB) A K + (dB) (dA K ) for any arbitrary choice of dA K (41)
For instance, if (s, k) 0 with µ s 0 > 0 is the most improving component of B, we obtain the same effect when we change the terms a (sk) 0 and a S-K+k 0 ,s 0 in A by:

da (sk) 0 = (a S-K+k 0 ,s 0 + cst) db (sk) 0 da S-K+k 0 ,s 0 = cst for any constant cst (42)
We summarize this discussion by: Proposition 7. Concerning the welfare effect of a change of the contract structure A, we can say as long as µ = 0 that (i) any addition of a new contract linearly independent of the existing ones improves welfare.

(ii) the best welfare improving option is to change the coefficient (s, k) 0 of the equivalent matrix B for which (s, k) 0 = arg max (s,k) {|µ s | x S-K+k }. This can be done by changing A as described in Eq.(42) (or in Eq.( 41) for more general changes).

We now move to the effect of changing B on equilibrium investment in renewable capacity, κ * = (∂K) -1 (g p * ) (see Eq.( 29)). For this, it is important to understand how changes in B affect the contingent equilibrium prices p * since

dκ * = 1 ∂ 2 K((∂K) -1 (g p * )) g ∂ B p * dB (43)
For this exercise, we reformulate the definition of an equilibrium price. To get the intuition, let us start with the consumer's first order condition given by Eq.( 24) by replacing A by the equivalent contract structure B I K . By market clearing, (i) the consumption will be equal to the supply S(p) and (ii) the contract price must be given by q = B I K p. If we add to the story the idea that the supply S(p) must satisfy the restriction on trades imposed by the contract matrix, we can construct a function f : R S + × R (S-K)K → R S given by:

f (p, B) = B I K (∂U (S(p)) -p) I S-K -B S(p) (44)
The zero of Eq.( 44) is our state-contingent equilibrium price vector p * . The effect of a change of B on p * can therefore be obtained by applying the Implicit Function Theorem to f (p, B) = 0. Lemma 1. We observe that: (i) ∂ p f (p, B) is invertible and by the Implicit Function Theorem:

∂ B p * (B) = [∂ p f (p, B)] -1   I K ⊗ (∂ xs U (S(p)) -p s ) S-K s=1 -(S S-K+k (p)) K k=1 ⊗ I S-K   (45) (⊗ denotes the tensor product) (ii) if only one component of (∂ xs U (S(p)) -p s ) S-K s=1 is different from 0, then ∂ B p * (B) is of rank S -1.
(iii) if at least two components of (∂ xs U (S(p)) -p s ) S-K s=1 are different from 0, then ∂ B p * (B) is of full rank S. This implicitly requires that 1 < K < S -1 12 .

Let us now try to understand the effect of a change in B on investment in renewable capacity. From Eq.(43), we begin by observing the induced price change dP = ∂ B p * dB on investment in renewable capacity. The set of all reachable dP being a linear space, we can conclude, still from Eq.( 43), that if there exists a dP ⊂ g ⊥ with g ⊥ the S -1 dimensional hyperplane orthogonal to g, then investment in renewable capacity can be improved by a contract change dB. This occurs in case (iii) of Lemma 1 since ∂ B p * (B) is of full rank. As a surjective mapping, we can even define the most efficient direction of the induced price change which solves max dP g dP dP and is given by any dP collinear to g. If we now have in mind that dP : R K(S-K) -→ R S , then there even exists, by the Rank Theorem, a subset of contract change associated to this most efficient direction of price change. This subset of dB is of dimension K(S -K) -S. We can therefore say: Proposition 8. If at least two components of (∂ xs U (S(p)) -p s ) S-K s=1 are different from 0 and 1 < K < S -1, all the directions of price changes which improve investment in renewables can be reached, especially the one which is collinear to g and which "maximizes" the penetration of renewables. Moreover each of these improving directions can be obtained by a subset of dimension (K(S -K) -S) of changes in B.

Now, what does at least two components of (∂ xs U (S(p)) -p s ) S-K s=1 are different from 0 mean? To answer this question, let us recall Proposition 6 and Eq.(39). Proposition 6 says that a competitive equilibrium is a constrained efficient allocation obtained by solving the optimization program given by Definition 2. As for Eq.( 39) which says at least two constraints on trade are effective in this optimization program, a rather generic case, is in fact depicted by the restriction of Proposition 8. Of course if this restriction is not fulfilled, then the result on investment in renewable capacity holds only if there exists a dP that does not belong to g ⊥ . Proposition 8 also suggests that there are many ways to change the contract structure in order to improve investment in renewables. This therefore asks two additional questions. First, can we improve both welfare and investment in renewables? The answer to this is quite obvious. Let us come back (see Eq.(43) and Eq.( 40)) to the vectors ∂ B κ * and ∂ B SW of dimension (1, K(S -K)). These two gradients point towards the best improving direction of investment in renewables and social welfare respectively. So as long as these two vectors do not point to exactly two opposite directions, we can conclude (at least intuitively) that there exists changes in the contract structure which improve both investment and welfare.

Let us now move to the second question. Can we ensure that an increase in investment in renewables reduces the production of the conventional sector in each state of nature? The answer is unfortunately no. Since the conventional sector adjusts its production level to the observed (ex post) price by equating the price and the marginal cost, production in state s only decreases if p S decreases. A lower conventional production level in each state therefore requires lower prices in each state. But this reduces the expected returns, g p, of unit investment in renewables and therefore total investment. This observation mainly drives our negative result.

More formally, by using the Gordan's form of Farkas' Lemma, we can say: Proposition 9. (i) As long as ∂ B κ * and ∂ B SW are not collinear with a negative coefficient, there exists changes in B which strictly improve welfare and investment in renewables.

(ii) It is nevertheless impossible to find a change in B which both increases investment in renewables and reduces production of conventional electricity in each state.

Conclusion

The deployment of intermittent renewables introduces pressure on the grid which calls for more flexibility on the electricity market. Focusing on demand-side flexibility, we have addressed the question if diversified retail contracts at different prices can ease the penetration of intermittent renewables. We have modeled intermittency by a contingent electricity market and diversified retail contracts by a set of base state-contingent electricity delivery contracts. First, we have shown existence and uniqueness of a competitive equilibrium of the contingent wholesale and retail markets. Secondly, assuming a limited number of base delivery contracts which constrain electricity allocations, we have been abled to find that the electricity market equilibrium and social welfare are constraint efficient. Finally, we have described the conditions under which changing the structure of the base contracts can improve welfare, the degree of integration of renewable capacity and both. We have also found that it is impossible to find a change in the contracts which both increases investment in renewable capacity and reduces production of conventional electricity in each state of nature.

The results of the paper firstly provide insights on how the role of retailers can be redefined, for example, in the context of liberalized retail electricity markets. The base delivery contracts modeled here can be a tool for retailers to propose diversified contracts that can trigger demand-side flexibility. Secondly, the results are also useful from the perspective of policy implications and highlight the importance of accounting for intermittency in order to achieve renewable capacity objectives.

Several extensions of this model can be expected. The first one has to do with the accounting of carbon emissions. The model can be used to design an economic model for transitioning to a decarbonized electricity mix by considering both intermittency of renewables and carbon emissions from fossil fuels. Ambec and Crampes (2019) examine how the presence of policy instruments (e.g., carbon tax, feed-in tariffs and renewable portfolio standards) affect the socially efficient energy mix with intermittent renewables. This literature can be complemented by investigating how, in the context of a contingent market with renewables, the decision strategy between an ex-ante Pigouvian tax and ex-post trade of carbon emissions permits matters.

A second extension can be to include supply flexibility in the model through storage of electricity. However, this question cannot be directly addressed with the static model considered here since storage is intrinsically a dynamic one. By extending the model to a dynamic framework, it may be interesting to determine, in the context of missing markets, the optimal decision strategy to store and deliver stored electricity given the intermittent nature of renewables. This is in line with a recent literature such as [START_REF] Pommeret | Energy Transition with Variable and Intermittent Renewable Electricity Generation[END_REF]. The authors focus on a social planner's problem and propose one of the first dynamic models of optimal transition from fossil-fueled technologies to renewablesbased that includes intermittency of renewables together with storage.

Thirdly, throughout this paper, we have made the assumption that the wholesale and retail markets are perfectly competitive. It may therefore be worthwhile to investigate how the model behaves with market power. [START_REF] Joskow | Reliability and competitive electricity markets[END_REF] and [START_REF] Rouillon | Optimal and equilibrium investment in the intermittent generation technologies[END_REF], by considering demand and supply intermittency respectively, show that when conventional producers own transmission and distribution networks, investment in renewables become less attractive. With the idea that sophisticated retail contracts can be a solution to manage supply intermittency, we can think of tapping into a contract instrument to address the question of market power distortions in the electricity market.

This argument is mainly based on the degree theory (see [START_REF] Hirsch | Differential topology[END_REF] ch.5, or [START_REF] Villanacci | Differential Topology and General Equilibrium with Complete and Incomplete Markets[END_REF] ch.7). In fact, from the previous point, we also deduce that the two maps f and g have the same degree, i.e.

deg(f ) = deg(g). Moreover, if one defines for a given regular map h the quantity ind

h (p) = det( ∂h| p ) |det( ∂h| p )| ,
we know that deg(h) = p∈h -1 (0) ind h (p). It follows, by computation, that the degree of our simple map g is 1, hence p∈f -1 (0) ind f (p) = 1. Let us now remember that ∂f (p) = ∂S(p) -∂D(p) is a positive definite matrix. Its determinant is therefore always positive. This implies in particular that ∀p ∈ f -1 (0), ind f (p) = 1 and since these quantities sum to 1, the solution is unique.

Appendix E. Proof of Proposition 4

(i) Let (θ * c , m * , θ * r , y * , κ * , p * , q * ) A be an equilibrium with the contract structure A = A S-K A K and A K invertible satisfying definition 1. Now define (ϑ * , m * , ϑ * , y * , κ * , p * , q * ) B = A K θ * c,A , m * A , A K θ * r,A , y * A , κ * A , p * A , A -1 K q * A (E.1)
and let us verify that this vector also satisfies 1 with contract structure of A S-K (A K )

-1

I K . With
regard to point (i) of definition 1, we observe that we obtain the new budget constraint by simply operating a change of variable by replacing θ by θ= (A K ) -1 ϑ, i.e.

Aθ ≥ 0 (q * A ) θ + m = m 0 ⇔              A S-K (A K ) -1 I K ϑ ≥ 0    A -1 K q * A =q * B    ϑ + m = m 0 (E.2)
The solution of this new program (ϑ * , m * ) B = A K θ * c,A , m * A is therefore the same up to, of course, this change of variable. If we now move to (ii) of definition 1, the reader knows from our early discussion (see section 3), that the retailer maximizes his profit and that the contract market clears if the following relation is satisfied q * = A p * . It is a matter of fact to verify, since p * B = p * A , that:

q * A = A p * A ⇔ A -1 K q * A = A -1 K A p * A ⇔ q * B = A S-K (A K ) -1 I k p * B (E.3)
Moreover (iii) and (iv) of definition 1 are not affected by the contract change, the electricity supply remains therefore unchanged. So if the retailer's demand remains unchanged, the proof is finished. This new demand, at price p * B = p * A , is, from Eq.( 25) given by:

D B (p * B ) = A S-K (A K ) -1 I K ϑ * = Aθ * = D A (p * A ) (E.
v 1 ∈ ker B I K v 2 ∈ ker I S-K -B ⇔        v 1 = I S-K -B x 1 with x 1 ∈ R S-K v 2 = B I K x 2 withx 2 ∈ R K ⇒ v 1 v 2 = 0 (H.3)
We deduce from Eq.(H.2) that: If s now denotes a vector of R S-K containing 1 at rank s and 0 elsewhere, the derivative of Eq.(H.7) with respect to b s,k is (-S S-K+k (p, g)) s and, with a same argument, the (K, (S -K) K) matrix of the derivatives with respect to B becomes:

h 1 ∂ 2 U (S(
-(S S-K+k (p)) In other words, it is impossible by a contract change to improve investment in renewables and to decrease conventional electricity production in each state of nature.

Proposition 3 .

 3 The contingent electricity supply S :R S ++ → R S + , given by S(p) = Y(p) + I(p), is a differentiable function with the property that:

(

4 )((E. 5 )(H. 2 )

 452 ii) Conversely, let (ϑ * c , m * , ϑ * r , y * , κ * , p * , q * ) B be an equilibrium with the contract structure B I K satisfying definition 1 and let C be a K dimensional invertible matrix. Define:(θ * , m * , θ * , y * , κ * , p * , q * ) A = C -1 ϑ * B , m * B , C -1 ϑ * B , y * B , κ * B , p * B , C q * B Appendix H. Proof of Lemma 1 (i) Computation of ∂ B p * (B)Let us apply the Implicit Function Theorem to f (p, B) = 0 given by Eq.(44). To apply this theorem, we first need to verify that ∂ p f (p, B) is a square matrix of full rank, here S. This will be done by showing that ker (∂ p f (p, B)) = {0}. By computation:∂ p f (p, B) h = 0 ⇔ B I K ∂ 2 U (S(p)) ∂ p S(p) -I S h = 0 I S-K -B ∂ p S(p)h = 0 (H.1)Since ∂ p S(p) is invertible, in fact even positive definite (see (ii) of proposition 3), we obtain by settingh 1 = ∂ p S(p, g)h: B I K ∂ 2 U (S(p, g)) -(∂ p S(p, g)) -1 h 1 = 0 I S-K -B h 1 = 0Now let us observe that ker B I K ⊥ ker I S-K -B . More precisely :

1 since 5 ) 6 )

 156 p, g)) -(∂ p S(p, g)) -1 h 1 = 0 (H.4) Now remember that ∂ 2 U is, by assumption, negative definite; the same being true for -(∂ p S(p, g)) -∂ p S(p, g) is positive definite (see (ii) of proposition 3). It follows that h 1 = 0 and therefore, ker (∂ p f (p, g, B)) = {0}. We can now move to the construction of ∂ B f (p, B). To compute this derivative with respect to the coefficient of B, we keep the same convention as in the proof of proposition 7. Let us start with the first part of this function f given by B I K • (∂U (S(p)) -p) whose generic term is: i ∂ xj U (S(p)) -p j + ∂ x S-K+i U (S(p)) -p S-K+i If we denote by e k a vector of R K containing 1 at rank k and 0 elsewhere, the derivative of Eq.(H.5) with respect to b s,k is (∂ xs U (S(p)) -p s ) e k . It follows that the derivative with respect to (b s,k ) S-K s=1 will be e k ⊗ (∂ xs U (S(p)) -p s ) S-K s=1and finally the (K, (S -K) K) matrix of the derivatives with respect to B is:I K ⊗ (∂ xs U (S(p)) -p s )Let us now move to the second part of f given by I S-K -B • S(p) whose generic term is:

⊗ 1 ∂ 2

 12 I S-K (H.8) (i) if we set A = ∂ B κ * (p * (B)) ∂ B SW (B)and assume that ∃y ≥ 0, and y = 0,y 1 ∂ B κ * (p * (B))+y 2 ∂ B SW (B) =0 or, in other words, that the two vectors are collinear with a positive coefficient, we can say that ∃dB with the property that :∂ B κ * (p * (B)) dB >0 ∂ B SW (B)dB >0 (J.1)In other words, there exists changes in B which improve both investment in renewables and social welfare (ii) since g 0 and ∂ p Y(p) =D, a diagonal matrix of generic term c((∂cs) -1 (ps)) > 0 (see (i) of proposition 3), we can say that g= α ∂ p Y(p) with α s = g S ∂ 2 c (∂c s ) -1 (p s ) for s = 1, . . . ,S, or, in other words, ∃y = 1 α ≥ 0 and y = 0, y g -∂ p Y(p) = 0. This implies ∃x, g -∂ p Y(p) x 0. So, if we replace x by ∂ B p * (B)dB, we get : ∃dB which satisfies g ∂ B p * (B)dB >0 ∂ p Y(p))dB <0 (J.2)

Retailers buy electricity at wholesale prices which vary with electricity provision (prices are low when power plants with low marginal cost of production are run and vice-versa.), with the commitment to supply electricity reliably to consumers for any level of demand and at fixed tariffs. The widely spread retail tariff is the flat tariff whereby consumers are charged the same price per unit of electricity all day.

An extensive literature on time-varying tariffs can be found in the work of[START_REF] Borenstein | Dynamic pricing, advanced metering, and demand response in electricity markets[END_REF].

In France, for example, the majority of households have retail contracts with "off-peak/peak"hours tariffs where they pay a lower price during off-peak demand hours and a higher price during peak demand hours. This retail contract has been able to incentivize consumers to use electric water heaters to heat water during off-peak hours rather than during peak hours, thereby alleviating the peak demand of electricity due to water heating.

For example, electricity production from wind turbines depends on wind speed which varies on all time-scales, from sub-seconds to decades[START_REF] Widén | Variability assessment and forecasting of renewables: A review for solar, wind, wave and tidal resources[END_REF]).

The strictly convex capacity investment cost function can be viewed as investment starting at the most productive site, e.g., in terms of weather conditions.

The resource is "free"and variable costs such as operation and maintenance costs for solar and wind technologies tend to be typically lower than those of conventional technologies (IRENA (2018), Lazard (2018)).

The strictly convex production cost function can be explained by a variety of conventional power plants with exogenous production capacities and which are ordered by "merit", i.e., by increasing order of their marginal costs of production.

The reader can be surprised by this assumption since even if A is of full rank, it is not obvious that the last K rows form an invertible matrix. This property can nevertheless be obtained by introducing required permutations. We however decide, for the simplicity of the discussion, to introduce this assumption instead of using permutation matrices which unnecessarily complicate notations.

If K = S -1, the vector (∂ xs U (S(p)) -p s ) S-K s=1 contains only one component while for K = 1, ∂ B p * (B) only contains S -1 columns.

The authors thank E. Franquet and S. Rouillon for their helpful comments and discussions on an early version of the manuscript. Of course the usual claim applies. The financial support by the French National Research Agency Grants ANR-17-EURE-0020 and ANR-16-CE03-0005 (GREEN-Econ) are also gratefully acknowledged.

Appendix

Appendix A. Proof of Proposition 1 (o)Existence and uniqueness of the contract choice θ c (q)

Let us study the consumer program given by Eq.( 15) of definition 1 for all q ∈ Q. First observe that the global utility U (Aθ c ) + m is increasing in m. We can therefore say that the optimal solution necessarily belongs to: B = (θ, m) ∈ R K+1 : Aθ≥ 0 and q θ + m = m 0 (A. [START_REF] Abrell | Cross-country electricity trade, renewable energy and european transmission infrastructure policy[END_REF] This set is obviously non-empty and closed. So if we show that B is also bounded, hence compact, we know that this program has a solution. To verify this property, let us first observe that ∀(θ, m) ∈ B, m is bounded from above. In fact since Aθ≥ 0 , we can say by the no-arbitrage condition (see Eq.( 21)) that β 1 Aθ= q θ≥ 0 (remember that β 1 0). It follows that m = m 0 -q θ is bounded from above by m 0 . Let us now show that ∀(θ, m) ∈ B, θ is bounded. Assume the contrary, i.e. there exists a sequence (θ n , m n ) ∈ B with the property that θ n → ∞ and define ϑ n = θn θn . Since ϑ n belongs to the unit circle of R K which is a compact set, ϑ n admits a converging subsequence whose limit is ϑ 0 . Because (θ n , m n ) ∈ B, we can also say that ∀n, Aϑ n ≥ 0 and q n ϑ + mn θn ≤ m0 θn and since m n is bounded from above and m 0 finite, we deduce that Aϑ 0 ≥ 0 and q ϑ 0 ≤ 0. By the no-arbitrage condition, neither one component of Aϑ 0 nor of q ϑ 0 can be strictly positive otherwise ϑ 0 is an arbitrage portfolio. It follows in particular that Aϑ 0 = 0 and since A is of full rank, this implies that ϑ 0 = 0. But this is the desired contradiction since by construction ϑ 0 = 1. Finally, since m = m 0 -q θ with θ bounded, we can say that m is not only bounded from above but also from below.

Let us now move to the uniqueness issue. We have seen from Eq. ( 23) that the optimal portfolio choice can be obtained by solving the equivalent program given by: max

Seeing that the set of feasible solutions (Aθ≥ 0) is convex, if f (θ) is strictly concave, we know that the solution is unique and is given by the continuous function θ c : Q → R K . So let us verify that the Hessian of f (θ, q) with respect to θ is negative definite. By computation ∀v ∈R K and v = 0

Let us now remember that A is a (S, K) matrix of full rank with K < S. It follows that for v = 0, h = Av = 0 and since U is strictly concave, we can conclude that v

and its Jacobian ∂θ c (q) = (A ∂U (Aθ(q)) A) -1 is negative definite Let us first show that the constraints Aθ c (q)≥ 0 are non binding at an optimal solution of Eq.(A.2). Assume the contrary. This means ∃q 0 ∈ Q and θ c (q 0 ) with the property that for at least one s, the s th component (Aθ c (q 0 )) s = 0. Moreover, since the optimization problem given by Eq.(A.2) is differentiable, it should also satisfy the Karush-Kuhn-Tucker conditions. So if λ 0 ≥ 0 denotes the Lagrangian multipliers, we should have:

A ∂U (Aθ c (q 0 )) -q 0 + A λ 0 = 0 (A.4) But let us now define a sequence θ n → θ c (q 0 ) such that ∀n, Aθ n 0 and construct the sequence

Since Aθ n → Aθ 0 which contains a zero component, we know, by assumption on the boundary behavior of the utility function, that ∂U (Aθ n ) → ∞. Now observe that ∂U (Aθc(qn))

∂U (Aθc(qn)) → z ≥ 0 at least for a subsequence and z belong to the unit circle of R S , i.e. with at least one strictly positive component, say, s ∈ S. Because λ 0 ≥ 0, we deduce that ∃N , ∀n > N , (y n ) s ≥ z s > 0. Let us now remember that A ≥ 0 and ∀s, ∃k, a sk > 0. This means ∀n > N at least one component of A y n , say component k, verifies (A y n ) k ≥ a sk z s > 0. Moreover q 0,k ∂U (Aθc(qn)) → 0 which means that ∀ε ∈ (0, a sk z s ), there exists N > N with the property ∀n > N (A y n ) k -q 0,k ∂U (Aθc(qn)) ≥ ε > 0. In other words, the k th condition of Eq.(A.4) cannot be satisfied at the limit, otherwise this contradicts optimality.

From the previous observation, we deduce that the necessary and sufficient condition for optimality of Eq.(A.2), is given by:

)) is negative definite and therefore of full-rank. It follows by the Implicit Function Theorem that θ c : Q → R K is differentiable and its Jacobian is:

Moreover ∂θ c (q) is the inverse of a symmetric and negative definite matrix and therefore shares this last property.

(ii) If ∀n , q n ∈ Q and q n → q 0 with q 0 ∈ bd (Q) then θ(q n ) → ∞ Assume the contrary, i.e. ∃K > 0, ∀n, θ(q n ) < K, this means for at least one subsequence, θ(q n ) → θ 0 . By continuity of the optimization problem given by Eq.(A.2), θ 0 should therefore be a solution at price q 0 . But remember that q n → q 0 with q 0 ∈ bd (Q). This means by Eq.( 20) that there exists, for q 0 , an arbitrage portfolio θ 1 with the property that Aθ 1 ≥ 0 and (q 0 ) θ 1 ≤ 0 with at least one strict inequality. It follows that the portofolio θ 2 = θ 0 + θ 1 satisfies the constraint of problem (A.2) since Aθ 2 = Aθ 0 + Aθ 1 ≥ 0 and, under the assumption that ∂U (x) 0,

which contradicts the fact that θ 0 is a solution at price q 0 .

(iii) If ∀n , q n ∈ Q and q n → ∞ then ∃s 0 ∈ S, (Aθ(q n )) s0 → 0

From the optimality condition given by Eq.(A.6), we know ∀n, q n = A ∂U (Aθ(q n )). So if q n → ∞, we can then say that ∂U (Aθ(q n )) → ∞. From our assumption on the boundary behavior of the utility function, we conclude that ∃s 0 ∈ S, (Aθ(q n )) s0 → 0.

Appendix B. Proof of Proposition 2

(i) ∂D (p) = A∂θ c (A p)A is symmetric and negative semi-definite matrix Computing ∂D (p) is a simple exercise. This matrix is symmetric since ∂θ c (q) is symmetric. But it is only negative semi-definite even if ∂θ c (q) is negative definite since dim (ker (A )) = S -K > 0. This induces that ∀h ∈ ker (A ), h ∂D (p) h = 0

++ and p n → p 0 with some p 0,s = 0 then

++ and p n → p 0 with some p 0,s = 0, we know that q n = A p n ∈ Q but at the limit

. Since θ(qn) θ(qn) ∈ S k , the unit sphere and A is of full rank, A θ(qn) θ(qn

++ and p n → ∞ then ∃s 0 ∈ S, (D (p n )) s0 → 0 Notice that when p n → ∞, then q n = A p n → ∞ since p n ≥ 0, A ≥ 0 and ∀s, ∃k, a sk > 0. This result then follows directly from (iii) of proposition 1.

Appendix C. Proof of Proposition 3

This follows directly from Eq.( 28) ad Eq.( 31). (iv) If ∀n, p n ∈ R S ++ and p n → p 0 with some p 0,s = 0, S(p n ) → S(p 0 ) ≥ 0 and finite If ∀n, p n ∈ R S ++ and p n → p 0 with some p 0,s = 0, we know that for the conventional sector lim ps→0 y s (p s ) = 0. This results in Y(p n ) → Y(p 0 ) ≥ 0 and finite. As for the intermittent sector, with some p 0,s = 0, we have I(p n ) → I(p 0 ) ≥ 0 and finite. Consequently, S(p n ) → S(p 0 ) ≥ 0 and finite.

Appendix D. Proof of Proposition 4 (i) Existence

The proof is essentially based on a homotopy argument. An intuitive presentation can be found in Eaves and Schmedders (1999) (for a more detailed argument see [START_REF] Villanacci | Differential Topology and General Equilibrium with Complete and Incomplete Markets[END_REF] ch.7 or Hirsch (1976) ch.5). Following this presentation, a complex equation system f (p) = 0, here the function f : R S ++ → R S with f (p) = S(p) -D(p), has a solution if there exists (i) a simple equation system g(p) = 0, here the function g : R S ++ → R S with g(p) = pp, p 0 given, and (ii) a homotopy H : [0, 1] × R S ++ → R S given by H(p, λ) = λf (p) + (1 -λ) g(p) with the property that :

g(p) admits a unique and regular solution. This is the case here since (i) g(p) = 0 ⇔ p = p and (ii) ∂g| p=p = I S , the identity matrix of dimension S, a matrix obviously of full rank.

0 is a regular value of H, meaning that for all (p, λ) ∈ H -1 (0), ∂H| (p,λ) is a surjection. This is for instance the case if ∂H is of full rank. Here, the sub-matrix ∂ p H of ∂H is given by:

Since ∂S(p) is positive definite (see point (ii) of proposition 3) and ∂D(p) negative semi-definite (see point (i) of proposition 2), ∂ p H is also positive definite and therefore of rank S. It follows for all (p, λ) ∈ H -1 (0), ∂H| (p,λ) is a surjection.

++

It simply remains to check this last point. Assume the contrary there exists a sequence (p n , λ n ) ∈ H -1 (0) with the property that either p n → ∞ or p n → p 0 with some p 0,s = 0. If λ n → λ 0 = 0, the only point in H -1 (0) is (p 0 , λ). So let us assume in the rest of the argument that λ 0 > 0. In the first case, we know by (iii) of proposition 2 that ∃s 0 ∈ S, (D (p n )) s0 → 0 and by (iii) of proposition 3 that ∀s ∈ S, (S (p n )) s → +∞. This implies that ∃s 0 ∈ S, (H(p n , λ n )) s0 → +∞. It therefore exists, for each K > 0, a rank N such that ∀n > N , (H (p n , λ n )) s0 > K > 0 which is the desired contradiction. In the second case, we know by (ii) of proposition 2 that D (p n ) → ∞. But remember that p n → p 0 finite, this means that S (p 0 ) as well as g(p) are finite. Hence ∃s 0 ∈ S, (H(p n , λ n )) s0 → -∞, which is again the desired contradiction.

(i) Uniqueness and let us verify that this vector satisfies definition 1 with

. First notice that by replacing ϑ by ϑ = Cθ, the budget constraints become

It follows that the new solution of (i) of definition 1 is, at price q * A , given by (θ

It is also immediate to verify that the relation between the contract and the state contingent prices are maintained since:

Finally we also notice that the electricity demand at price p * A = p * B remains the same since:

We can therefore conclude that (θ * , m * , θ * , y * , κ * , p * , q * ) A with A = BC C for all choice of C, a K dimensional invertible matrix.

(iii) directly follows from the computation given by Eq.( 35)

Appendix F. Proof of Proposition 6

This result follows directly from our identification of the First Order Conditions.

Appendix G. Proof of Proposition 7

From our discussion in section 6, we only need to verify that Eq.(40) holds. So let us consider SW (B) introduced in definition 2 and denote by (λ (B) , µ (B)), the Lagrangian multipliers associated to the constraints. In order to compute the derivative of SW (B), we adopt the following convention: we differentiate per assets (per column of B) and do this for each asset. ∂ B SW (B, g) is therefore a vector of dimension (1, (S -K) K) which satisfies by using the FOC (see Eq.( 38)):

Using the first set of constraints of Eq.(37) as an identity, we know that:

It follows that:

By using now the second set of constraints of Eq.(37) as an identity, we get after computation that:

where ⊗ denotes the tensor product. We can therefore say that:

From Eqs.(H.1) and (H.9), we finally conclude that:

Let us first consider the two particular cases given by K = S -1 and

which is obviouly a matrix of rank S -1.

Let us now move to the case 1 < K < S -1 and let us observe that the derivative of f (p, B) with respect to (b s,k ) S-K s=1 , i.e. the k -th vertical block of (S -K) columns of ∂ B f (p, B), is given by: We can now make a first observation. Since the supply S(p) is strictly positive at equilibrium, the lower part of the previous matrix is the identity of (S -K) up to multiplication by non-zero constant. So if we select the first block of (S -K) columns of ∂ B f (p, B), we have (S -K) linearly independent vectors. Now assume that (∂ xs U (S(p)) -p s )

S-K s=1 = 0. Thus, at least one term is non-zero, say the s 0 -th. Now observe that the upper part of ∂ (b s,k ) S-K s=1 f (p, B) is mostly composed of zeros except in line k and this line changes with the order number of the block. So if we select from block 2 to K the s 0 -th column, we obtain again (K -1) linear independent vectors. This shows point (ii) of the Lemma. Moreover, if at least one other component of (∂ xs U (S(p)) -p s ) S-K s=1 is non-zero, say the s 1 -th, we can add to the previously selected columns, the s 1 -th column of the second block and therefore conclude that rank (∂ B p * (B)) = S

Appendix I. Proof of Proposition 8

The proof directly follows from our discussion Appendix J. Proof of Proposition 9

Remember that the Gordan's form of Farkas' Lemma states that either (i) ∃x Ax 0 or (ii) ∃y ≥ 0, and y = 0, y A = 0. It follows: