Complementarity formulation of games with random payoffs

We consider an n-player non-cooperative game where the payoff function of each player follows a multivariate distribution. This formulation is adopted to model a zonal electricity market in which generators operate by running conventional and renewable-based plants. The players in the market compete as in a Cournot model. We formulate this problem as a chance-constrained game by defining the payoff function of each player using a chance constraint. A full empirical analysis has been conducted on the Italian electricity market to test the impact of renewable generators in the light of decarbonization of the market and the impact of the volatility of the cost of conventional plants, mainly related to the volatility of gas prices. We finally test the robustness of the chance constraint formulation with an out of sample analysis.


Background
Since the beginning of the nineties, wholesale electricity markets have been introduced to increase competitiveness among electricity companies and to enable power systems to reach higher efficiency levels and to reduce the cost of electricity for consumers (Conejo and Sioshansi 2016).In the last years, the deregulation of the European electricity markets has been accompanied by the introduction of a set of environmental policies aiming at reducing carbon emissions (see, e.g., Commission (2012b), Commission (2019), Commission (2022a)).This led to a progressive integration of renewable energy sources (RES) in the European power systems that have to be decarbonized by 2050 [see Commission (2012a), Commission (2019)].The introduction of renewable-based power production has modified the way European power systems are operated and planned, and have also impacted on the plant merit order in the day-ahead electricity markets [see Morales et al. (2014), Pérez-Arriaga and Battle (2012)].Among the conventional units, natural gas-fired power plants have also been considered as a strategic technology to reach the decarbonization targets in the European power systems (see Commission (2012a)).However, the energy crisis that Europe is currently facing [see Commission (2022b)] has made gas wholesale prices highly volatile, reaching levels never seen before on most of the European gas hubs (Commission 2022).As a consequence, electricity companies with gas-fired power plants have lost competitiveness and profitability.1

Literature review
The competitive behavior of the economic agents operating in the electricity market can be represented through a game setting.In particular, Cournot was the pioneer to study and widespread the use of the equilibrium under market conditions in 1838 (Cournot 1897).
In the fifties, Nash showed that there exists an equilibrium point for a finite strategic games, commonly called Nash equilibrium (Nash 1951).Strategic games are widely studied in the literature, despite their practical limitations (Başar and Olsder 1999;Debreu 1952;Fan 1966).The original Nash equilibrium theory was conceived for deterministic games, which makes it limited to handle real applications with random payoffs and strategy sets.Nash games can be reformulated, under suitable assumptions, by collecting the Karush-Kuhn-Tucker conditions of all players and then transforming the problem into a complementarity problem.Clearly, if one is modeling the economic behavior of electricity producers, the assumption of deterministic input parameters is unrealistic.Then, to tackle stochasticity in costs, demand, or production quantities, different methodological approaches can be used.A stream of literature endogenizes the uncertainty by introducing a set of scenarios and each player of the game has to take decisions before the state of the world is realized.In this framework, the equilibrium solution is taken as an average of the solutions of each scenario (see for all Birge and Louveaux (1997)).Other authors adopt the perspective of solving stochastic complementarity problems.For instance, De Wolf and Smeers (1997) study a stochastic Stackelberg game for the European gas market, Gabriel et al. (2009) develop scenario-reduction methods for stochastic complementarity problems; Genc et al. (2007) consider dynamic oligopolistic games under uncertainty.For all these classes of problems, numerical solution of such games is not as common as their deterministic counterparts.Firstly, the accuracy of the model increases when the number of considered scenarios increases.As a consequence, the size of the problem often renders the model intractable or NP-hard to be solved with standard solvers.For these reasons, special algorithms for the efficient computation of solutions to stochastic optimization problems have been studied (see, for instance, Gabriel and Fuller (2010)).When also including random payoffs functions, the expectation function is the most widely used tool in the literature (Ravat and Shanbhag 2011) for risk neutral cases.Conversely, the risk averse games are generally studied with the risk measure CVaR (Kannan et al. 2013;Ravat and Shanbhag 2011) and chance-constrainted programming (Singh et al. 2016;Singh and Lisser 2018).Singh et al. (2016) studied a finite strategic games where the payoff vector follows an elliptical distribution, and showed the existence of a Nash equilibrium.In Singh and Lisser (2018), the authors showed the equivalence between a Nash equilibrium of chance-constrained game (CCG for short) and the global optimal solution of a given mathematical program.In the game cited so far, the payoff functions of the players are random but their strategy sets are deterministic.However, strategy sets that contains chance constraints are considered in many real applications, mainly in electric markets where the resource constraints are stochastic.In Peng et al. (2021Peng et al. ( , 2018Peng et al. ( , 2021)), the authors studied the games with chance-constrained strategy sets.Peng et al. Peng et al. (2018) showed the existence of Nash equilibrium for the n-player general-sum games where the strategy profile set of each player is defined by a joint chance constraint, and the independent random constraint vectors follow either a normal distribution or a mixture of elliptical distributions (Peng et al. 2021).Nguyen et al. (2022) extended the results of Peng et al. (2018Peng et al. ( , 2021) ) to the general case where the payoff function is random and the strategy profile set of each player is defined by elliptically distributed dependent joint chance constraints.In the specific case where the probability distributions are not known in advance and belong to a given distributional uncertainty set, Peng et al. (2021) formulated the random constraints of each player as a distributionally robust joint chance constraint.They considered several uncertainty sets for each they showed that there exists a Nash equilibrium of a distributionally robust chance constrained game.

Paper contributions
Considering the current challenges that electricity markets are facing, in this paper, we model a zonal electricity market where power generating companies form an oligopoly and act as Nash-Cournot competitors who non-cooperatively maximize their own profits.The payoff function of each company is assumed to be stochastic, mainly related to the volatility of the generation cost for conventional units.Renewable (RES)-based power plants are also included in the formulation of the model, introducing a new source of uncertainty.In addition, the Power Exchange (PX) clears the day-ahead electricity market by maximizing the consumer's willingness to pay considering the energy balance and the network transmission constraints.While the strategic behavior of conventional and renewable producers has been intensively studied, this paper proposes an alternative stochastic market design for the electricity sector that uses chance constraints to accurately model both the uncertainty of cost parameters and uncertainty of renewable resources, starting from the theoretical results obtained by Singh et al. (2016) and Singh and Lisser (2018).
The proposed CCG models are tested on the Italian day-ahead electricity market.The considered network accounts for twelve zones that are connected with lines characterized by limited transfer capacity.The twelve zones represent the geographical zones in which Italy is subdivided, plus the foreign countries that are interconnected with the Italian zones.
To specify the contribution of this paper, we tried to answer four main research questions.The first one is related to the methodological approach and the rest to the empirical application.

Research question RQ1 Which additional insights does CCG provide vis-a-vis stochastic complementarity model and how robust are its solution?
Research question RQ2 What will be the impact of stochastic gas cost on electricity prices, production quantities and profits under different levels of risk aversion?
Research question RQ3 How will different profiles of risk aversion between Italian producers and foreign producers affect strategic production choices?
Research question RQ4 How will the combination of two different sources of uncertainty (gas cost and RES production) modify the production mix and the agents' benefits?
In addressing RQ1, from the methodological point of view, CCG models have been widely used to treat stochastic parameters in the feasible region.The chanceconstrained payoff in CCG represents the maximal threshold such that the random return/payoff is not less than the threshold with a large probability, say, 95% or 90%.Value-at-Risk (VaR) can be viewed as a special case of the chance-constrained payoff when measuring the risk of an investment loss, which can efficiently capture the tail property of the random return/payoff.Thus, in this paper, we study CCG models where we assume that each player holds a chance-constrained payoff.To the best of our knowledge, this paper provides a first attempt to use CCG in the context of energy markets for dealing with a random payoff function.Since in electricity markets one of the sources of uncertainty is related to the cost of fuels used in conventional plants, we used this new formulation of Nash game with random payoff to account for cost randomness.We reformulate the chance constraints using statistical moments of uncertain quantities, which are readily available from historical observations.This avoids the use of scenarios, which are often difficult to obtain and increase the complexity of the problem and the computational time for solving it.The robustness of the stochastic model developed is, then, tested with an out of sample analysis.The two tests conducted prove that as far as the risk aversion increases, the proposed models are able to reduce the error in predicting the total costs and in maintaining the feasibility of the optimal solution.
As for RQ2, we assume that all generators in all zones have the same risk attitude.We have found that when risk aversion increases, Italian large producers reduce electricity production from gas plants, since the expected gas cost increases.This behavior impacts on congestion in transmission lines, especially between the South of Italy and Sicily and in the Northern Italian zone that imports from France, Switzerland and Slovenia.Both welfare and generators' profits increase as soon as risk aversion decreases.This is directly connected to the increase in the corresponding prices.
In answering RQ3, we perform two different analyses.The first analysis attributes to the Italian generators the same risk aversion level, but different from the one of the foreign countries.In this case, the different risk aversion levels modify the choices on electricity production from gas-fired plants, but the behavior is similar within the Italian producers.More interesting are the results of the second sensitivity analysis, where the Italian generating companies have different risk aversion levels.In this case, we find that the market size of the company influences its attitude to be more risk neutral and consequently its power output.
In assessing RQ4, we consider different confidence levels for measuring the stochasticity of both the production cost of gas-based power plants and the electricity production of RES-based units.The results show that the inclusion of an additional source of uncertainty leads to a decrease of a total power output.Moreover, to illustrate how a stochastic RES generation affects PX's benefit and welfare, we perform a sensitivity analysis on the availability of gas-based capacity.This analysis highlights that the PX's benefit proportionally increases with a larger availability of gas generation.In contrast, generating companies' profits have an opposite trend.The impacts on welfare depend on the risk aversion level assumed by market players.
The rest of the paper is organized as follows.Section 2 presents the generic CCG model with n-players and its application to a multi-zonal electricity market.A case study referred to the Italian electricity market is described in Sect.3. The results of our analysis are given in Sect.4, Sect. 5 is devoted to test the robustness of the CCG model and the conclusions are reported in Sect.6.

The CCG model
In this section, we introduce an n-player non-cooperative game where the payoff function of each player follows a multivariate distribution.This class of games is used for modeling the Nash-Cournot behavior of a set of power generating companies that compete in the electricity market.
These companies try to maximize their own profit, when producing and then selling power in the day-ahead electricity market cleared by the Power Exchange (PX).The Nash assumption implies that each agent, when making its own decision, considers the decisions of all other agents as given.
35 Page 6 of 32 In defining their best strategies, we assume that power companies face two sources of uncertainty: (1) the production costs of conventional plants, mainly referred to natural gas price for gas-fired power plants; and (2) the volumes of electricity that can be produced with renewable power plants.Taking as reference the design of the European day-ahead electricity market, we consider a zonal configuration of the power system, where zones are interconnected by transmission lines with limited transfer capacity.Notice that, the analysis of the re-dispatching issues are out of the scope of the paper (for more details on this topic, see.e.g., Oggioni and Smeers (2012), Oggioni and Smeers (2013), and Van den Bergh et al. (2016)).We assume that in each zone of the market there are both power demand and production.These are variables of the problem and are endogenously determined.Electricity prices are defined using an inverse demand function.
In Sect.2.1, we first introduce the general formulation for this class of games, and we recall the definition of Nash equilibrium for a chance-constrained game.Then, in Sect.2.2 we present the main model with uncertainty in the production costs (random payoff) and an equivalent formulation as a quadratic programming (QP) model is stated in Sect.2.3.Finally, in Sect.2.4 the model introduced in Sect.2.2 is extended to the case of uncertainty on electricity production from wind and solar power plants.

The generic model
We consider an n-player strategic game where I = {1, 2, ⋯ , n} is the set of all players.Each player i has a finite action set A i with its generic element a i .An action profile of the game is denoted by a vector a = (a 1 , a 2 , ⋯ , a n ) .The set of all action profiles of the game is denoted by A= × n i=1 A i .Let A −i = × n j=1;j≠i A i together with its generic element a −i which is a vector of actions a j , j ≠ i .Notice that the action set A i is the set of the pure strategies of player i whilst a mixed strategy set is defined by a probability distribution over the action set.Assume a set X i of mixed strategies of player i; i ∈ X i is a mixed strategy represented by i = ( i (a i )) a i ∈A i , where i (a i ) ≥ 0 is a probability with which player i chooses action a i and ∑ a i ∈A i i (a i ) = 1 .The set of all mixed strategies profiles of the game is denoted by X= × n i=1 X i , and = ( i ) i∈I its element.Let X −i = × n j=1;j≠i X i and a −i ∈ X −i a vector of mixed strategies of all players except player i.Let ( i , −i ) be a strategy profile where player i and each player j, j ≠ i use strategies i and j , respectively.Let r i ∶ A → ℝ be a payoff function of player i when action a i is cho- sen.For a given strategy profile ∈ X the payoff of player i, i ∈ I , is defined by For these games Nash showed that there always exists a Nash equilibrium in mixed strategies (Nash 1951).In this paper, we consider the situation where the payoff vector (r i (a)) a∈A of player i, i ∈ I , follows a multivariate distribution.For a given strategy profile ∈ X , the payoff r i ( ) of player i, i ∈ I (1) is an univariate random variable.These games are generally handled by the mean of the expected value of the random variables r i ( ) , i ∈ I , ∈ X which results in an equivalent deterministic (1) game.Alternatively, the satisfying payoff criterion is widely used in the literature (Blau 1974;Cassidy et al. 1972;Charnes et al. 1968;Song 1992).In the following, we assume that at strategy profile ∈ X , each player seeks for the highest level of his payoff that can be achieved with at least a pre-specified level of confidence.The latter is known to the other players.These games are called non-cooperative chanceconstrained games due to the use of a chance constraint.Let i be the confidence level of player i and = ( i ) i∈I .For a given strategy profile ∈ X and a confidence level vector , the payoff of player i, i ∈ I , is defined by The set of best response strategies of player i, i ∈ I , against a given strategy profile The following is the definition of Nash equilibrium for chance-constrained games.
Definition 1 Singh et al. (2016) A strategy profile * ∈ X is said to be a Nash equi- librium for a given , if for all i ∈ I the following inequality holds, That is, * is a Nash equilibrium if and only if * i ∈ BR i ( * −i ) for all i ∈ I.

A CCG model for a zonal electricity market
We consider a zonal electricity market in which generating companies operate and compete in quantity, as in a Nash-Cournot model.Electricity can be produced using both conventional and intermittent renewable (wind and solar PV) power plants.
Each generator maximizes its profits taking into account the decision taken by his competitors.In this first model, we just account for uncertainty in the operating costs of gas-fired stations.Then, we compare this formulation with the one including also uncertainty in renewable power production.To complete the analysis, we also propose a model that describes the clearing of the day-ahead electricity market, in which the power companies participate.This market is operated by the PX, which maximizes consumers' willingness to pay, taking into account the transfer limits of the interconnections linking the different zones in which the power market is subdivided.The inclusion of transmission constraints when assuming Cournot competition in electricity market has been always challenging (see, e.g., Hobbs (2001), Metzler et al. (2003), Wei and Smeers (1999), Willems (2002)).In our model, we assume that generators can exercise market power in energy market where they operate but cannot consciously manipulate transmission charges (see also Farzad et al. (2023) and Tanaka (2009)).We are aware that this could be a limit of our analysis but our main focus is on the CCG model formulation.Therefore, the model proposed in the following could be considered as a "pseudo-Nash-Cournot". (2) (3) 35 Page 8 of 32 In Sect.2.2.1, we first list the notation used in this model.In Sect.2.2.2, we present the operation of generating companies in the zonal electricity market, assuming that the operating costs of the conventional units are stochastic.Section 2.2.3 describes the model of the PX that clears the day-ahead electricity markets.Finally, Sect.2.2.4 describes the solution method.

Notation
We introduce here all symbols of the model.They are ranked on the basis of their means and use.

Sets
• N: Set of zones, n = 1, … , |N|; • I: Set of generating companies i = 1, … , |I|; • N c i : Set of zones where company i ∈ I has conventional power units; • N r i : Set of zones where company i ∈ I has renewable-based power plants; • I c n : Set of companies which have conventional power units in zone n ∈ N; • I r n : Set of companies which have renewable-based power plants in zone n ∈ N.

Parameters
• a n : Intercept of consumers' affine demand functions at zone n ∈ N (€/MWh); • b n : Slope of consumers' affine demand functions at zone n ∈ N (€/MWh 2 ); • Flow n,m : Flow transfer limit from zone n ∈ N to zone m ∈ N (MW).
• C c i,n : Total available capacity of conventional power units owned by generator i ∈ I in zone n ∈ N (MW); • C r i,n : Total available capacity of renewable-based power plants owned by generator i ∈ I in zone n ∈ N (MW).

Deterministic variables
• x c i,n : Electricity produced by generator i ∈ I in zone n ∈ N using conventional power units (MWh); • x r i,n : Electricity produced by generator i ∈ I in zone n ∈ N using renewable-based power plants (MWh); • d n : Electricity consumption in zone n ∈ N (MWh); • flow n,m : Power transferred from zone n ∈ N to zone m ∈ N (MW); • P n (d n ) : Willingness to pay in zone n ∈ N (€).This term can be explicitly defined as follows: Notice that we define as the vector of the amount of electricity generated by company i ∈ I using conventional and renewable power plants, respectively.
We denote as i | the vector of the total amount of electricity generated by company i ∈ I .Moreover, we define as the vectors of the total amount of electricity produced in zone n ∈ N using conventional and renewable power plants, respectively.We denote as n | the vector of the total amount of power generated in zone n ∈ N.

Generating company i's CCG model: stochastic production costs of conventional power units
Let us consider the following random variables:

Random variables
• c c i,n ( ) : random cost variable, where c c i,n ∶ Ω → ℜ and (Ω, F, P) is a probability space.
Considering our assumption on competition among generating companies, we define the zonal electricity prices p n as follows: The electricity price p n (x n ) is a function of quantities produced in the zone n and the net flow between zones represented by the difference (flow m,n − flow n,m ) .We denote with R i (x) the generating company i's revenues.These are defined as follows: Then, for ∈ Ω the realization of the profit r i (x, ) of generating company i ∈ I is given by: where i � corresponds to the total amount of electricity produced by the generating company i and c c i,n ( )x c i,n are the production costs of conventional power plants.In particular, we assume that {c c i,n } n∈N c i are independent normal random variables, where the mean and variance of c c i,n are i,n and 2 i,n , respectively.The production costs of renewable-based power plants are assumed to (4) 35 Page 10 of 32 be equal to zero (see, e.g., Morales and Pineda (2017) and Pineda et al. (2018)).Therefore, for a given output level vector x and confidence level vector , the profit of generating company i ∈ I is given by: For each i ∈ I , we have: Therefore, for a given x and i , the payoff of firm i is given by: where −1 A best response of firm i ∈ I , for a given output level of the other generating companies, can be obtained by solving the following optimization problem: where conditions (8) and ( 9) enforce the production capacity constraints for conventional and renewable-based power plants, respectively; and (10) and ( 11) are the variable non-negativity constraints.Dual variables are reported besides each constraint with which they are associated. (5)

PX's problem
The PX clears the day-ahead electricity market by maximizing the consumers' willingness to pay (12) taking into account the zonal energy balance (13), the transmission constraints ( 14) that define the flow transfer limits among connected zones, and the non-negativity constraints on the demand variables (15).Notice that, since the PX considers the decisions of power generating companies as given in accordance with the Nash assumption, it is sufficient to state that the PX maximizes consumers' willingness to pay instead of social welfare [see Farzad et al. (2023), Tanaka (2009)].

s.t
Finally, the constraint (14) imposes that the power exchanged between zones is positive.It accounts for all power trades both in the directions (n, m) and (m, n).

Solution method
Taken together, the optimization problems of the generating companies i ∈ I and the PX lead to an equilibrium problem.Complementarity-based models offer a natural approach to construct equilibrium model when different market agents are considered (see Facchinei and Pang (2003)).Since the optimization problems of both generating companies i ∈ I, (7)-( 11) and PX ( 12)-( 15) are convex and Slat- er's conditions apply, these can be replaced by the corresponding KKT conditions.The resulting set of KKT conditions will define a Mixed Complementarity Problem (MCP) that is used to determine the solution to the equilibrium problem.We here report the set of KKT conditions for both generating companies' i ∈ I and PX's problems.A best response of generating company i ∈ I can be obtained by solving the following KKT conditions: The KKT conditions associated with the PX's problem are as follows: By concatenating KKT conditions ( 16)-( 21) for all i ∈ I and by adding KKT condi- tions of the power exchange problem ( 22)-( 25), an equilibrium of the zonal electricity market can be obtained.
From conditions ( 22) and ( 24) and taking into account the zonal electricity price in (4), we can easily derive that  d n = p n (x n ) .Moreover, if the power is exchanged between zones n and m, the condition (23 f n,m are the transmission charges (or wheeling fees) for transferring electricity between nodes n and m.From this, one can deduce that the energy price difference between two zones corresponds to the difference between the wheeling fees at those nodes.In other words, there are no arbitrage possibilities in managing transmission.Power generating companies cannot manipulate transmission congestion and the relative charges to modify electricity prices (see Farzad et al. (2023) and Tanaka (2009) for a similar approach).

Equivalent Single Optimization Problem
Following the approach proposed by Hashimoto in Hashimoto (1985), the MCP presented in Subsection 2.2.4 can be reformulated as the single quadratic programming (QP) problem ( 26)-( 33).The objective function ( 26) can be assimilated to the social welfare adjusted by the quadratic cost term ) 2 that is a proxy for measuring the firms' market power.The constraints ( 27)-( 33) are taken from the generating companies' and PX's optimization problems, respectively.

s.t
Notice that this QP problem could be also implemented using a standard solver as CPLEX.

Model with stochasticity of conventional unit costs and renewable energy production
We here extend the model presented in Sect.2.2 by considering two random variables: operating costs of conventional units and forecast of renewable energy production.

Random variables
• c c i,n ( ) : random cost variable, where c c i,n ∶ Ω → ℜ and (Ω, F, P) is a probability space. (26) 35 Page 14 of 32 • C r i ( ) : forecast on renewable energy production, random variable C r i ∶ Ξ → ℜ where (Ξ, F, P) is a probability space.
In particular, the forecast of the renewable power production from wind and solar PV units becomes a random variable.In the new formulation, constraint (9): is substituted with the following: where i ∈ [0, 1] is a given threshold.The corresponding complementarity condition can be written as: Apart from this modification, the rest of the model remains as presented in Sect.2.2.The reformulation in MCP model and in the equivalent single QP problem account for condition (35) and constraint (34), respectively.

Case study
The proposed CCG models are tested on the Italian day-ahead electricity market using 2019 data.The considered network is depicted in Fig. 1 and accounts for twelve zones ( n = 1, … , 12 ) that are connected with lines characterized by limited transfer capacity.These twelve zones are further classified into two main groups: • Geographical zones in which Italy is subdivided and are identified by North (N), Center-North (CN), Center-South (CS), South (S), Sardinia (SARD) and Sicily (SIC).These are represented in light blue in Fig. 1. • Foreign countries represented by France (FR), Switzerland (CH), Austria (AU), Slovenia (SL), Greece (GR) and Malta (MA) with which Italy is connected and exchange electricity.Each foreign country is represented by one zone.These are represented in grey in Fig. 1.
We assume that in each of the twelve zones considered, both those related to the Italian electricity market and those associated with the foreign countries, there is electricity demand and production.Even though we are aware of the fact that in Italy and in the inter-connected foreign countries electricity is produced using several conventional and renewable-based technologies, in our analysis we focus our attention only on three types of power stations in all zones: gas-fired units, wind and solar PV power plants.Among the conventional units, we select the gas-fired power plants for two main reasons: they are the most used in Italy (ARERA 2020) and they are characterized by a relatively low carbon emission factor.The stochasticity of renewable power production is well represented by the wind and solar PV plants, and therefore we do not account for hydro technologies.The assumption of accounting for a restricted portfolio of power production plants in all zones has an impact on the parameters used to estimate the inverse demand function and transmission line capacity that are calibrated on the basis of the considered installed production capacity as explained in the following.We model electricity demand by using an affine inverse demand function depending on zones.More precisely, the slope parameter b n is computed by using the defi- nition of demand elasticity which, in addition to demand elasticity, involves the zonal reference demand and the zonal reference electricity price.The intercept a n is then determined by using the equation of the inverse demand function and considering, as given, the just-computed parameter b n , the reference demand, and the refer- ence price as an input.The reference electricity price and demand data are taken from the Italian Power Exchange website 2 and from the Transparency Platform of the ENTSO-E for the Italian geographical zones and for foreign countries, respectively.We set the price elasticity equal to − 0.1 to indicate an inelastic demand in line with the literature. 3Notice that the zonal reference demand used in these computations corresponds to the residual consumption related to gas-fired, wind and solar PV plants.In other words, zonal reference demand is netted out by the power production of all those technologies available in the zones but not included in our analysis.Similarly, the transfer capacity limits of the power flows exchanged between zones are re-calibrated starting from those provided by Terna. 4 This means that, taking as reference the real data provided by Terna, the network transfer limits between zones are reduced in such a way to be proportional to the balance between demand and power that can be generated with the available capacity in a zone.Notice that, according to Terna, these transfer limits depends on the exchange directions.
As for electricity generating companies, we consider the four main power producers operating in Italy in addition to six representative firms, one per each of the foreign countries analyzed.The selection of the four Italian electricity companies has been done considering their market shares, starting from the one with the highest value, as indicated by ARERA (2020).The representative producers taken for the foreign areas, instead, collect all electricity generators in those countries.As already explained, we assume that these power producers run only gas-fired, wind and solar PV units.We discard the capacity of all the other power plants that they own.For the sake of data tractability, we suppose that each power producer operates at country level and no producers have plants in foreign countries.Moreover, for each of the four Italian power producers considered, we account for the geographical distribution of their respective plants in the different zones of the Italian power system as depicted in Fig. 1.Tables 1, 2, 3 report the installed capacities of gas, wind and solar PV power plants per generating company and zone, respectively.Capacity data for the power plants located in the Italian geographical zones are taken from Page 18 of 32 denoted as I 4 with 100, 000 GJ < I 4 < 1, 000, 000 GJ. 7 Since data on gas prices are only provided at country level, we assume that there is a unique stochastic cost of gas for Italy, identical in all geographical zones and for all the four generating companies considered.However, this differs from those applied to the other zones corresponding to the foreign countries.Taking as reference this data availability and our assumptions on installed capacity, the stochastic costs of gas are constructed imposing that the zonal mean and variance values are defined as i,n = n and 2 i,n = 2 n , respectively and assuming that Φ −1 c c i,n ( ) ( ) is a quantile function of a standard normal random variable.The values of n and 2 n are reported in Table 4.Moreover, we consider different confidence levels i as indicated in Sect. 4. As already explained, the operating costs of wind and solar PV units are assumed to be equal to 0 €/MWh.
The data used to compute the stochastic forecast of wind and solar PV production are taken from the Transparency Platform of the ENTSO-E.We consider as confidence levels i =1% and i =5%.

Results
This section is devoted to the presentation of our results obtained by considering different hypotheses on the stochastic parameters and confidence levels.In particular, Sects.4.1 and 4.2 provide the results of the application of the CCG zonal model with the stochasticity of the operating costs of the gas-fired power plants and the Power Exchange's problem (see Sects.2.2.2 and 2.2.3).Section 4.3 investigates the effects of the combined stochasticity of the cost of gas-fueled power stations and the forecast of renewable energy production by considering the models presented in Sects.2.2.3 and 2.4.
All cases have been solved using PATH 4.7.01 under GAMS 23.0.2 on a Mac-Book Pro 2.7 GHz Intel Core i7 quad-core processor with 16 GB RAM.The processing time of all runs is of the order of 1-2 s, showing the effectiveness of the approach proposed as identified by RQ1.

Uncertainty in gas cost under equal risk aversion levels for generators
We first analyze the situation where the unique source of uncertainty is represented by gas cost.In this first analysis, we assume that all generating companies, in Italy and abroad, have the same confidence level i .The aim of this study is to analyze the impact of gas cost variability on electricity production (with RES and gas-based power plants), prices, and generators' profits.To this aim, we conduct a sensitivity analysis to evaluate the different impacts on these variables.Notice that, i can be interpreted as a measure of risk aversion of the different generators.This case allows us to answer RQ2.The i values tested are reported in Table 5.
Figure 2 shows the total hourly production of electricity.Wind and solar power plants are almost used at full capacity by all generators independently of the confidence levels, while gas-based electricity production is more variable since it depends on the stochasticity of natural gas prices that affect the operating costs of the gasfired plants.Recall that this stochasticity varies according to the confidence level considered.In particular, the value of the operating costs of gas-fired plants progressively decreases along with the confidence level, meaning that the operating cost of a gas power unit with a confidence level of 99% is higher than the one applied when the confidence level is 80%.This is equivalent to say that a more risk-averse operator ( i = 0.99 ) estimates that the increase in the gas cost in the worst-case scenario is much higher than an operator with a medium risk aversion (i.e.i = 0.8 ).Fig- ure 3 illustrates the hourly gas-based electricity production per generating company.We can observe that Gen1IT, which has the largest share of gas-based units among the four Italian generators analyzed, increases its gas-based electricity production as far as the i value decreases from 99% to 80%.This also happens in Austria and in Malta, and it can be easily explained by the cheapest operating costs of the gas units with the confidence interval of 80%.However, this is not the case for the other Italian generators (Gen2IT, Gen3IT, and Gen4IT) and for Greece, which reach their largest gas power output when the confidence level is set equal to 85%.Moreover, France and Slovenia register their maximum gas-based electricity production with a confidence level of 95%.Recall that these results are obtained from the implementation of the MCP composed of conditions ( 16)-( 21) and ( 22)-( 25) regarding the power generating companies' and the PX's problems, respectively.Looking only at conditions ( 16)-( 21) and knowing that the power production costs of gas-fired plants reduce when increasing the confidence level i , one can expect to see a generalized increment of the amount of electricity produced with these units as far as the level of risk aversion decreases.However, this does not happen in all zones and for all generators because the utilization of the gas-fired units not only depends on their operating costs, but it is also influenced by their zonal locations and by the transmission capacity that regulates flow exchanges among zones.This derives from the fact that the final power output of the power units is affected by their production capacity (see conditions ( 20)-( 21)), the zonal energy balances and the network transmission constraints, i.e. conditions ( 24)-( 25).
For instance, our results point out that the Northern zone of Italy "N" always imports electricity from the four foreign countries to which it is connected.More specifically, the lines linking the North of Italy with France, Switzerland and Slovenia are always congested independently of the investigated confidence levels i .In addition to these, also the links between the Center-North and the Center-South of Italy and between the Southern zone and Greece are always congested.In contrast, the lines between the South and the Center-South zones and between the Center-North and the North zones are congested only when the confidence level is equal to 90% and 85%.In addition, the confidence levels of 99%, 95%, and 80% cause the congestion of the line between the Southern zone of Italy and Sicily.
Notice that, for values of i = 90% and i = 85% , we also register a different allo- cation of power production from gas-fired power plants compared to that observed when the other confidence levels apply.In particular, considering the plant capacity, the production costs of gas-fired units, and the network transmission limits, under the assumptions of i = 90% and i = 85% , generating companies find it more con- venient to increase their gas-based power production in the Center-South and to reduce it in the Center-North compared to the other analyzed risk aversion cases.This implies larger power exports from the North to the Center-North and from the Center-South to the South, making the respective transmission lines congested.Recall that, electricity prices are affected by the congestion costs.
This has an impact on electricity prices, which incorporate congestion costs and reflect their trend (see Fig. 4).Electricity prices are aligned for i equal to 99%, 95% and 80% but differ from those obtained by applying the confidence levels of 90% and 85% that are similar.In particular, the peak prices registered in the Center-South zone when i are set at 90% and 85% depend on the over-utilization of the South and Center-South line.Similarly, the very high prices observed in Slovenia and in Switzerland for the confidence levels of 99% and 95% indicate that the congestion charges for these two i values are higher than in the other i cases.Notice that in all cases, the electricity prices are defined by the gas-based units that are the peak technologies.As explained above, the operating costs of these plants decrease when the confidence level goes from 99% to 80%.This justifies the fact that the prices obtained for the 80% confidence levels are lower than those with i = 99% and i = 95%.Electricity prices, operating costs and electricity produced are key elements to determine generating companies' profits.Total profits increase when generators become less risk averse, namely with the progressive shift of the confidence level from i = 99% to i = 85% (see Table 6).Notice that in the case i = 80% the total profits are slightly lower than with i = 85% , but this results from the different val- ues of the electricity prices as explained above.The Power Exchange's benefit follows a similar trend and, in particular, its value in the case i = 80% is higher than with i = 85% in such a way that it overcomes the slight reduction in the generating companies' profits, leading to a higher welfare.

Uncertainty in gas cost under different risk aversion levels for generators
In this section, we still investigate the impacts of stochastic gas costs, but we assume different risk aversion profiles for power generating companies.The risk aversion is still measured by the confidence level i .This enables us to answer RQ3.In particular, we conduct two sensitivity analyses:  • Case 1: All the four generators operating in Italy have the same confidence level that differs from that applied to the power producers operating in the foreign countries.More precisely, Table 7 summarizes the analyzed four sub-cases.• Case 2: The confidence level assigned to the four generating companies operating in Italy are different, while the power producers operating in the foreign countries have the same confidence level.In particular, we analyze the four sub-cases reported in Table 8.The impacts of the application of Case 1 and Case 2 on gas-based electricity production can be summarized as follows.
Case 1 assumes that foreign generators and Italian power producers have different levels of risk aversion (the confidence interval is no longer the same).The results show that foreign generators increase their gas-production output when passing from Case 1.1 to Case 1.4; the reverse happens for the Italian power producers (see Fig. 5).This is in line with the assumptions used for the construction of Case 1 and confirms what observed in the first sensitivity analysis with equal risk aversion levels for generators (Sect.4.1), namely that gas-based electricity production increases when the level of risk aversion reduces and generating companies have a more risk neutral attitude.
Case 2 gives similar results and provides further interesting insights.In particular, the comparison between Cases 2.4 and Cases 2.1, 2.2, and 2.3 highlights that the gas-based power production can be affected not only by the confidence level but also by the size of the company (Fig. 6).The largest gas-based power output of Gen1IT, Gen2IT and Gen3IT is obtained in Case 2.4 when the confidence level assigned to these generators are 80%, 85% and 90%, respectively.The utilization of gas-fired units of Gen4IT is particular relevant in Case 2.1 and Case 2.4 when the confidence level attributed to this producer is equal to 95% (in both cases).This implies that when the power company's market share and the gas-based capacity availability are low, as it happens for Gen4IT, the generator has its highest gas-power output under a risk averse assumption.On the contrary, when a generator has a larger market share, it increases its gas-based electricity production under more risk neutral assumptions, as it happens for Gen1IT, Gen2IT and Gen3IT.In other words, the market size of the company influences its attitude to be more risk neutral and consequently its power output.

Uncertainty in gas cost and RES production under equal risk aversion levels for generators
In order to answer RQ4, we consider both the stochasticity of the operating costs of the gas-fired units and the uncertainty of renewable power production.To this scope, we assume that all generating companies, in Italy and abroad, have the same confidence levels i and i .Table 9 reports the values tested.
The results obtained are in line with those described in Sects.4.1 and 4.2. Figure 7 compares the total hourly production of electricity per technology between the cases described in Table 9 and the corresponding sub-cases presented in Table 7.In other words, we compare the situation where the stochasticity only regards the production costs of gas-fired power plants with the scenario where both these costs and the RES production are stochastic.
From this comparison, we first observe that the total power production obtained under the assumptions i = 99% & i = 1% and i = 95% & i = 5% is lower than in i = 95% and i = 99% cases, respectively.This is due to the fact that the application of the stochasticity in the wind and solar PV electricity production leads to a reduction of the power output of these technologies that it is only partially compensated by a higher utilization of the gas-fired units.Second, in i = 99% & i = 1% , and i = 95% & i = 5% cases, power generators maintain the same attitude towards risk observed in Sect.4.1 and 4.2, meaning that they produce less electricity when the confidence levels are set at i = 99% & i = 1%.
This trend is also reflected in the agents' benefit analysis.Tables 10 and 11 report the PX's benefit, the generators' profits and the welfare in the i = 99% & i = 1% and i = 95% & i = 5% cases, respectively, assuming different availability levels for gas-fired capacity.More precisely, starting from the reference gas capacity values, as described in Sect. 3 and used for analyzing the cases described in Sects.4.1 and 4.2, we first decrease and then increase them by 25% and 50%, respectively, leading to the cases "50%", "75%", "100%" (i.e. the reference values for this capacity), "125%", and "150%".The comparison between Tables 10 and 11 shows that  when the levels of risk aversion decrease passing from i = 99% & i = 1% to i = 95% & i = 5% , agents' benefits and welfare increase independently of the availability of the gas-fired plant capacity.The effects of the sensitivity analysis on the capacity of gas-fired units can be summarized as follows: the generators' profits decrease as far as the available gas-based capacity increase; the opposite happens for the PX's benefit.Mixed impacts can be observed on the welfare.These can be explained as follows: the utilization of wind and solar PV plants is not significantly affected by the different capacity availability levels of gas-fired units, since they are almost fully used independently of the assumptions considered.The reduction of gas-based power in the "50%" and in "75%" is reflected in higher electricity prices that, in turn, mirror a scarcity of this resource.Therefore, even though the amount of electricity globally produced is lower compared with the cases with a larger availability of gas-based capacity, generators' profits under the "50%" and "75%" capacity assumptions are higher than in the "100%", "125%", and "150%" cases, where electricity becomes cheaper because of the larger amount of gas-capacity available in the market.This trend in electricity prices implies an opposite impact on PX's benefit that progressively increases as far as the gas-based power production grows.This happens both with i = 99% & i = 1% and i = 95% & i = 5% assump- tions (see Tables 10 and 11).However, the implications on the welfare depend on the confidence levels adopted.With i = 99% & i = 1% , the highest and the low- est values for the welfare are reached in the "100%" and "50%" cases, respectively (see Table 10).In the other words, the welfare has an increasing trend when passing from the "50%" to the "100%" gas-capacity scenarios, but it progressively decreases when moving to the "125%" case and then to "150%" assumption.This means that when the gas capacity is scarce, as under the "50%" and "75%" capacity cases, the increase in the generators' profits does not compensate the cut in the PX's benefit and, therefore, the welfare remains lower than under the "100%" capacity assumption.Even though in the "125%" and "150%" capacity scenarios, the PX's benefits are higher than under the other assumptions, these are not sufficient to cover the cut in the generators' profits.Therefore, the welfare values in the "125%" and "150%" cases remain lower than in the "100%" scenarios, even though they are higher than in the "50%" and "75%" scenarios.In the less conservative scenario of i = 95% & i = 5% , this phenomenon persists, but in a more limited way.In fact, the welfare increases from "50%" the "125%" cases.Under the "150%" assumption, a slight cut is registered compared to the "125%" case.Again the increase in the PX's benefit does not over-compensate the cut in generators' profits.

Test on the robustness of the CCG model
In order to test the robustness of the stochastic model presented in the previous sections and to answer RQ1, two robustness analyzes have been carried out.The first analysis relies on a sensitivity on the random production cost variable for conventional units mainly related to the behavior of the natural gas price.The natural gas price has an important influence on the total profits of the companies operating in the market.Geopolitical tensions of recent periods, and the underlying uncertainty around the European security of gas supply, reinforced the price volatility on the European gas markets (see Commission ( 2022)).The model used for this robustness check is the one introduced in Section 4.2.
To check the impact of the volatility of production costs for conventional units on the total profits, 10000 out of sample scenarios have been considered by increasing the volatility of the stochastic parameter and the impact on total costs has been estimated by constructing the following indicator: Indicator (36) measures, for each out of sample scenario, the relative error on the production costs depending on the natural gas price.The numerator of this index is the difference between the total cost of a selected out of sample scenario ( total cost(out of sample) ) and the cost estimated by using each stochastic model (reference case as in Section 5 by varying i from 80% to 99%) or by using a deterministic formulation where the cost of conventional units has been fixed equal to the expected value of the stochastic variable (Model EV), denoted with total cost(⋅) .The results provided by this first analysis have been collected in Table 12.
These results show that as far as the risk aversion increases (namely, i increases) the CCG model is able to reduce the error in predicting the total costs.This implies that, using a stochastic model is preferable especially when the instability of economic conditions occur.
A second robustness check has been conducted on the model introduced in Section 4.3 where both the cost of conventional units and the renewable power production are stochastic.We have compared the solutions of the deterministic model, where both gas price and the forecast of renewable power production are set at their expected value, with the chance-constrained model setting = 5% & = 95% and  = 1% & = 99% .We have generated 10,000 out of sample scenarios and com- puted the percentage of violated constraints over the total number of considered scenarios.The results for each model are reported in Table 13.
This second analysis confirms the results of the previous check, since the EV model violates constraints up to 12% points more than the CCG model when the risk aversion is high.The results presented in this section confirm the robustness of the stochastic model adopted with respect to an equivalent deterministic model, so answering RQ1 related to the robustness of the CCG model.

Conclusions
In this paper, we present a zonal electricity market model with oligopolistic competition.Companies operating in this market can have both conventional and renewable-based power plants.Two different sources of uncertainty have been considered: uncertainty in the payoff function of the players, mainly related to the stochasticity of gas prices, and uncertainty in renewable production.A CCG model is then developed and studied to perform the empirical analysis.The case study is based on the analysis of the Italian day-ahead electricity market, where twelve zones, connected with lines characterized by limited transfer capacity, are considered.
Four research questions have, then, been investigated: the first one is a theoretical question related to the benefit that a CCR model can provide in a stochastic GNEP game, with respect to a classical complementarity problem (RQ1).First of all, to our knowledge, we point out that this is the first attempt to use a CCG model with random payoff functions to be used for an empirical application as in the formulation introduced by Singh and Lisser (2018).This formulation overcomes many computational issues related to the complexity of stochastic complementarity formulations.The robustness of the stochastic formulation is then proved with an out of sample analysis.
The other three research questions analyze how different expectations on gas cost and the uncertainty on RES-based power generation can impact the choices on electricity production and the market players' benefits.RQ2 examines the impacts of increasing risk aversion, assuming identical confidence levels i for all generators.RQ3 investigates the cases of different risk aversion profiles associated with the costs of gas-based power, depending on generators and zones.Finally, RQ4 is devoted to the impact on the production mix of two different sources of uncertainty: gas costs and RES production.The main findings of our empirical analysis show that both welfare and generators' profits increase as soon as risk aversion decrease when this is assumed to be identical for all generators (RQ2).If the risk aversion differs among Italian producers and zones, the company's market share influences the related power output (RQ3).Finally, the inclusion of the stochasticity in RES production, assuming identical confidence levels for all generators, confirms the trend in generators' profits.The impacts on welfare depend on the assumed risk aversion (RQ4).
Further development of these model could be explored by using different distributions like any elliptical symmetric distribution, with joint or individual chance constraints, or distributionally robust optimization methods.In addition, we could modify these models in order to explicitly include the cross-border Cornout transaction and the allocation of transmission capacity by the Transmission System Operator.Finally, we could also recast the problem by assuming random demand and introducing a convex risk premium for generators.

Fig. 6
Fig. 6 Gas-based electricity production per generating company in Case 2 (MWh)

Fig. 7
Fig. 7 Comparison of the total electricity production under different stochasticity assumptions (MWh) Cost error(out of sample) = total cost(out of sample) − total cost(⋅) total cost(⋅)

Table 1
Installed gas-based capacity per zone and generator (MW)

Table 5
Sensitivity analysis on i i values for all generatorsOperating in the different zones

Table 7
Sub-cases of Case 1

Table 9
Sensitivity analysis on i and i i and i values for all generatorsOperating in the different zones

Table 12
Stochasticity on conventional unit costs: Mean, standard error, minimum and maximum error on cost error with 10,000 out of sample scenarios

Table 13
Stochasticity on RES only and on both costs and RES: Percentage of violated constraints with 10,000 out of sample scenarios