# Moving from Linear to Conic Markets for Electricity

Anubhav Ratha, Pierre Pinson, Hélène Le Cadre, Ana Virag, Jalal Kazempour

► To cite this version:

Anubhav Ratha, Pierre Pinson, Hélène Le Cadre, Ana Virag, Jalal Kazempour. Moving from Linear to Conic Markets for Electricity. European Journal of Operational Research, 2023, 309 (2), pp.762-783. hal-03799767v2

HAL Id: hal-03799767

https://inria.hal.science/hal-03799767v2

Submitted on 19 Dec 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Moving from Linear to Conic Markets for Electricity

Anubhav Ratha<sup>a,b,*</sup>, Pierre Pinson<sup>c,a</sup>, Hélène Le Cadre<sup>d</sup>, Ana Virag<sup>b</sup>, Jalal Kazempour<sup>a</sup>

## Abstract

We propose a new forward electricity market framework that admits heterogeneous market participants with second-order cone strategy sets, who accurately express the nonlinearities in their costs and constraints through conic bids, and a network operator facing conic operational constraints. In contrast to the prevalent linear-programming-based electricity markets, we highlight how the inclusion of second-order cone constraints improves uncertainty-, asset-, and network-awareness of the market, which is key to the successful transition towards an electricity system based on weather-dependent renewable energy sources. We analyze our general market-clearing proposal using conic duality theory to derive efficient spatially-differentiated prices for the multiple commodities, comprised of energy and flexibility services. Under the assumption of perfect competition, we prove the equivalence of the centrally-solved market-clearing optimization problem to a competitive spatial price equilibrium involving a set of rational and self-interested participants and a price setter. Finally, under common assumptions, we prove that moving towards conic markets does not incur the loss of desirable economic properties of markets, namely market efficiency, cost recovery, and revenue adequacy. Our numerical studies focus on the specific use case of uncertainty-aware market design and demonstrate that the proposed conic market brings advantages over existing alternatives within the linear programming market framework.

**Keywords:** OR in energy, spatial equilibrium, mechanism design, electricity markets, conic economics

## 1. Introduction

The spatial price equilibrium problem, as first analyzed by Enke (1951) and Samuelson (1952), computes commodity prices and trade flows that satisfy partial equilibrium conditions over a network. In a two-sided auction framework, this problem involves price-quantity supply offers and demand bids matched by an auctioneer to maximize the social welfare, contingent on the spatial constraints. Historically, spatial price equilibrium problems rely on linear programming (LP) theory (Kantorovich, 1960) to derive the market equilibrium prices from marginal equalities. Despite the success of LP in achieving optimal market-clearing outcomes and efficient prices with satisfactory computational effort, it is potentially limiting in physical systems as it may fail to accurately represent the nonlinear operational characteristics of assets and the network. Examples of such physical systems include electricity (Bohn et al., 1984), natural gas (De Wolf and Smeers, 2000), water (Cai et al., 2001), heat (Mitridati et al., 2020), telecommunication networks (Courcoubetis

<footnote><sup>a</sup>Technical University of Denmark, Kgs. Lyngby, Denmark</footnote>

<footnote><sup>b</sup>Flemish Institute for Technological Research (VITO), Mol, Belgium</footnote>

<footnote><sup>c</sup>Imperial College London, London, United Kingdom</footnote>

<footnote><sup>d</sup>Univ. Lille, Inria, CNRS, Centrale Lille, UMR 9189 CRISTAL, Lille, France</footnote>

<footnote>* Corresponding author.</footnote>

<footnote>Email addresses: arath@dtu.dk (Anubhav Ratha), p.pinson@imperial.ac.uk (Pierre Pinson), helene.le-cadre@inria.fr (Hélène Le Cadre), ana.virag@vito.be (Ana Virag), jalal@dtu.dk (Jalal Kazempour)</footnote>
and Weber, 2003) and supply chains (Snyder et al., 2014). Even in non-physical systems facing uncertainty, the use of LP compels a linear modeling of uncertainty and potential risk preferences, which is limiting at times.

A natural question then arises, why should the market-clearing problem be confined to the LP framework? This question is pertinent since LP is the simplest mathematical framework in the convex optimization theory, while more general convex frameworks such as conic programming are available. If such frameworks enable a more accurate representation of physical assets and networks as well as uncertainty, while retaining the advantages of LP in terms of optimality, pricing, and computational ease, it is then, indeed, appealing to adopt them. Leveraging the recent mathematical and computational advances in conic programming (Alizadeh and Goldfarb, 2003; Mosek ApS, 2021), in this work, we introduce and analyze spatial price equilibrium in a market-clearing context based on the second-order cone programming (SOCP) framework, and demonstrate how it outperforms the LP-based markets. Although our theoretical results are generalizable to any market-clearing context, we choose the domain of electricity markets for exposition as it is rich in examples that worsen the adverse impacts of the limitations imposed by LP-based markets.

## 1.1. Limitations of LP-based Electricity Markets

In electricity markets, the nonlinearities arise from the costs (utilities) and constraints of producers (consumers) and the physics of power flow in the network. Currently, real-world electricity markets follow the original proposal by Bohn et al. (1984) to solve the spatial price equilibrium problem as an LP to obtain optimal production and consumption quantities and the spatially-differentiated nodal electricity prices, commonly referred to as locational marginal prices (LMPs) in the industry (Kirschen and Strbac, 2018). To reach climate change mitigation goals, electricity systems are transitioning towards a more sustainable future (Chu and Majumdar, 2012), by integrating larger shares of weather-dependent renewable energy sources such as wind and solar. This trend challenges LP-based markets on three accounts.

First, with large shares of variable and unpredictable renewable energy, electricity markets are exposed to significant uncertainty, which needs to be accounted for. Classical methods within the LP framework, such as scenario-based stochastic programs (Pritchard et al., 2010; Zavala et al., 2017) and robust optimization techniques (Bertsimas et al., 2013) are unsuitable in practical settings as they suffer from computational intractability and solution conservativism, respectively. Going beyond LP-based markets is beneficial from an uncertainty modeling perspective. For instance, chance-constrained programming (Kuang et al., 2018), which admits nonlinear yet convex, computationally tractable and analytically expressable uncertainty models, paves the way for *uncertainty-aware* electricity markets in practice.

Second, accommodating the uncertainty requires resources that provide *flexibility services* by adapting their operational status. Such flexible resources include, among others, energy storage (Kim and Powell, 2011), flexible consumers (Anjos and Gómez, 2017), upcoming power-to-x units (Varela et al., 2021) as well as the coordination with natural gas (Thompson, 2013) and district heating (Mitridati et al., 2020) sectors. Operational characteristics of such flexible resources are typically nonlinear, i.e., they incur quadratic costs and admit nonlinear feasibility sets. LP-based markets require linear or piecewise-linear approximation of such cost functions, which fail to accurately characterize the costs and deter flexible resources from offering flexibility. Cost functions aside, adopting the inner (outer) polyhedral approximation required by LP-based markets leads to the undermining (overestimation) of the amount of flexibility available. At times, ignoring the characteristics induces operational and reliability risks for the flexibility provider and the electricity system, as witnessed during the 2014 polar vortex event in Northeastern United States (PJM Interconnection, 2014) and more recently, during the cold weather event in Texas (Bushnell, 2021). The need for an *asset-aware* electricity market remains unfulfilled within the LP framework. Apart
from nonlinearities, the feasibility sets of various assets may entail non-convexity arising from in-
tegrality constraints, e.g., the commitment status of power producers (Hobbs et al., 2001). This
non-convexity is resolved in practice by solving a unit-commitment problem as a mixed-integer
linear programming (MILP) problem before the actual market clearing from which optimal prices
and quantities are derived (O'Neill et al., 2005). While considering non-convexities is beyond the
scope of this work, Remark 1 further discusses them in the context of the market design proposed.

Third, accurate operational modeling of flexible resources is valuable only if the network con-
straints are represented in sufficient detail, which is crucial as flexible resources are dispersed across
the electricity network. Conventionally, a linear approximation of electricity network constraints
is adopted to retain an LP-based market-clearing problem. With this approximation, the market-
clearing problem typically results in physical flows that are infeasible in reality (Baker, 2021).
Consequently, flexibility services are procured in a way that the network constraints may not allow
the flexibility to be delivered when needed. This is critical in the case of electricity markets as the
loss of real-time balance between the production and consumption of electricity in the system may
lead to minor, localized supply disruptions at best and a large-scale cascading blackout at worst
(Daqing et al., 2014). A network-aware procurement of flexibility services is vital for maintaining
the real-time balance.

On the above three accounts, the LP framework falls short in meeting the challenges of elec-
tricity markets of the future, necessitating a more advanced yet practical alternative.

1.2. Towards Conic Economics

Augmenting the LP-based market-clearing problem with conic constraints alleviates these lim-
itations to a great extent. A market-clearing problem that involves conic constraints leads to the
emergence of *conic economics*. Coined by Raissi (2016), conic economics was introduced in the
context of general equilibrium theory, focusing on the mitigation of financial risk. In contrast, we
argue that the inclusion of second-order cone (SOC) constraints based on the Lorentz cones into
the spatial price equilibrium problem leads to a convexity-preserving modeling of nonlinearities
within the market framework. The resulting SOCP-based market-clearing problems are efficiently
solved in polynomial time using interior-point methods (Alizadeh and Goldfarb, 2003) by several
off-the-shelf commercial solvers such as MOSEK, Gurobi, and CPLEX.

In the context of electricity markets, SOC constraints have recently gained interest in market
proposals based on chance-constrained programming (Dvorkin, 2020; Mieth et al., 2020). The
single-period stochastic market clearing proposed in Dvorkin (2020) discusses the internalization
of uncertainty in the price formation process, highlighting the advantages of chance-constrained
electricity markets over scenario-based stochastic markets in terms of potential acceptability in a
real-world implementation. The work in Mieth et al. (2020) showed that SOC reformulations of
chance constraints also enable an analytical characterization of the risk faced by electricity markets
in mitigating the uncertainty from renewable energy sources, leading to risk- and variance-aware
electricity prices. In regards to asset-awareness, Kuang et al. (2019) study quadratic costs of
deliverability in unit commitment problems, essential to modeling ramping costs while provid-
ing flexibility. Finally, towards improving network-awareness, considering the SOC relaxation of
power flows in distribution systems, pricing schemes based on conic duality were proposed in a
deterministic setting in Papavasiliou (2018), and extended in Mieth and Dvorkin (2020) to include
uncertainty modeled via chance constraints.

Previous works have primarily focused on only one of the three aspects, i.e., uncertainty-, asset-, or network-awareness of the markets, whereas integration of large shares of renewable energy in electricity markets requires a combined approach. Our work generalizes the prior works, such that heterogeneous market participants with nonlinear (and potentially inter-temporal constraints) and quadratic costs could participate in multiple commodity trades in an electricity market aimed at
harnessing flexibility in a network-aware, cost-efficient manner. Consequently, flexibility providers
take a central role in the proposed market design, transforming electricity markets from energy-
centric to flexibility-centric.

**Remark 1** (Addressing non-convexities in electricity markets). Non-convexity of market participants' strategy sets implies that the optimal quantity allocations and prices do not necessarily support social welfare-maximizing equilibrium, e.g., producers may not recover their costs (Liberopoulos and Andrianesis, 2016). This is resolved in practice by out-of-market payments, called uplift payments, which are in turn minimized by adopting a convex hull pricing scheme, see Gribik et al. (2007); Wang et al. (2016) for details. Neglecting cost recovery of participants, similar to the two-step unit commitment approach using MILP (O'Neill et al., 2005), these non-convexities can be potentially incorporated as an extension to our proposed conic market framework, rendering the problem as a mixed-integer second-order cone program (MISOCP). Commercial nonlinear programming solvers can already solve MISOCP problems, adopting a variety of algorithms (Benson and Sağlam, 2013). However, further computational advances and analysis of prices are needed prior to adoption in real-world electricity markets.

1.3. *Contributions*

As a broad contribution, our work generalizes the prevalent LP-based market-clearing problem to the SOCP framework and applies conic duality to analyze the market equilibrium prices and the economic properties of the underlying market-clearing problem<fnref n="1" />. In the following, we discuss the specific contributions of this work from three perspectives, i.e., from a market design perspective, theoretical perspective, and finally from a practitioner’s perspective.

From a market design perspective, our primary contribution is an original proposal for a *general* conic electricity market. By general, we imply a market framework that improves uncertainty-, asset- and network-awareness of electricity markets beyond the prevalent LP-based markets within the convex optimization realm. Our proposed market framework is uncertainty-aware by design, as it admits a chance-constrained market-clearing formulation. Towards an asset-aware electricity market, we enable heterogeneous market participants to accurately express SOC-representable nonlinearities in their cost (or utility) functions and constraints. Nonlinear network flow models underlying the physical delivery associated with the trades are also included in our proposal, leading to network-aware electricity markets.

From a theoretical perspective, we first formulate the market-clearing problem as a centrally-
solved optimization problem and address the challenge of *robust solvability* of SOCP problems.
Theorem 1 provides the necessary and sufficient conditions for optimality and robustness of the
market-clearing outcomes, while Theorem 2 gives an analytical expression for conic spatial prices
of the traded commodities. Connecting the centrally-solved optimization problem to a spatial equi-
librium problem involving rational and self-interested actors, Theorem 3 leverages conic duality to
prove the equivalence of the optimization to a competitive equilibrium. Under common assump-
tions, Theorem 4 proves the satisfaction of economic properties, namely efficiency, cost recovery
and revenue adequacy (Schweppe et al., 1988), in the proposed market-clearing. This analytically
supports that the move towards conic markets does not incur the loss of any economic properties
compared to the prevalent LP-based markets.

<footnote n="1">¹Beyond the SOCP framework, semidefinite programming (SDP) which operates on the cone of semi-definite matrices instead of the Lorentz cone, allows for further broadening of the scope of the market-clearing, albeit at the cost of a higher computational burden. Our theoretical results and their proofs build on Lagrangian duality involving *generalized inequalities*, which lay the foundation for an SDP-based market framework in future.</footnote>
From a practitioner's perspective, we illustrate the generality of our proposed market-clearing framework by defining a bid format for conic markets, enabling heterogeneous market participants to express their preferences. Our numerical studies highlight how the conic market encompasses an uncertainty-aware electricity market that efficiently remunerates the mitigation of uncertainty by the market participants, such that the real-time balance in the electricity system is ensured. A new class of flexibility products, called *adjustment policies*, based on linear decision rules (Holt et al., 1955) enable this. These policies are rules, agreed at the day-ahead market stage, that govern how flexibility providers respond to forecast error realizations during or close to the real-time operation. We compare the proposed SOCP-based market-clearing proposal with two LP-based uncertainty-aware benchmarks, highlighting the advantages of moving towards a conic market framework.

*Paper organization:* In §2 we introduce the market setting, illustrate the relevance of SOC constraints via examples, introduce the bidding format, and present the general conic market-clearing as an optimization problem. In §3, we analyze the spatial equilibrium underlying the optimization problem and discuss the economic properties constituting the market equilibrium. Next, §4 presents numerical results on one of the market-clearing use cases by comparing an uncertainty-aware conic market with the available alternatives within the LP domain. Finally, §5 concludes by highlighting the key findings of this work and discusses future perspectives. Appendix A provides a concise background on SOCP duality, while we prove our theoretical results in Appendix B. We provide modeling examples and present the market-clearing problems employed in numerical studies in the Supplementary Material which serves as an electronic companion to the paper.

*Notation:* The set of natural and real numbers is denoted by $\mathbb{N}$ and $\mathbb{R}$, respectively, whereas $\mathbb{R}_+$ and $\mathbb{R}_-$, respectively, denote the sets of non-negative and non-positive real numbers. Upper case alphabets with a script typeface, such as $\mathcal{A}$, represent sets, while vectors are denoted by lower case boldface and matrices by upper case boldface alphabets. For a vector $\boldsymbol{x}$, the operator $\boldsymbol{x}^\top$ denotes its transpose, $\|\boldsymbol{x}\|$ represents its Euclidean norm and $\text{diag}(\boldsymbol{x})$ returns a diagonal matrix with vector $\boldsymbol{x}$ as the leading diagonal. We retrieve the $k$-th element of the vector $\boldsymbol{x}$ as the scalar $x_k$ and use the operator $[\cdot]_k$ to retrieve the $k$-th element of a general vector expression. $\emptyset$ and $1$ are vectors of zeros and ones; arithmetic operators $\leq$, $=$, and $\geq$ on vectors are understood element-wise. For a matrix $\mathbf{M} \in \mathbb{R}^{p \times q}$, $[\mathbf{M}]_{:,k} \in \mathbb{R}^p$ retrieves its $k$-th column while $[\mathbf{M}]_{k, :} \in \mathbb{R}^{1 \times q}$ retrieves its $k$-th row. The operator $\text{tr}(\mathbf{M})$ returns the trace of the matrix $\mathbf{M}$, while the expression $\mathbf{M} \succcurlyeq 0$ indicates its positive-semidefiniteness. Lastly, the operator $\otimes$ denotes the Kronecker product.

## 2. A General Conic Market for Electricity

We discuss the setting of our conic market-clearing problem in §2.1, followed by introducing SOC constraints in a market-clearing context in §2.2. In §2.3, we discuss the equality constraints and present the conic market bids in §2.4. Lastly, we formulate the general market-clearing problem in §2.5 as an SOCP problem.

### 2.1. Market Setting

We consider a forward electricity market involving multiple discrete clearing periods within the finite time horizon of a single day. We focus on hourly electricity markets prevalent across the world and collect the hours of the day in a set $\mathcal{T} = \{1, 2, \dots, T\}$, where $T = 24$.

*Commodities:* Without loss of generality, we assume that participants in the forward market compete at the *day-ahead* stage. The hourly clearing periods at the day-ahead stage, therefore, correspond to the hours of the next day, which we collectively refer to as the *real-time operation*. The two types of commodities to be traded are (i) energy and (ii) flexibility services. Both types
of commodities are traded hourly in the day-ahead market, which is a purely financial market in the sense that the physical delivery of these commodities occurs during the real-time operation. The former commodity, i.e., energy, represents the quantity in MWh to be exchanged among the market participants during the real-time operation. The latter, i.e., flexibility services, refers to the exchanges that contribute to the supply-demand balance during the real-time operation. For instance, these exchanges could be a result of the activation of adjustment policies allocated to flexible market participants in response to an operational need that may arise during the real-time operation. A potential occurrence of an imbalance between the total production and consumption of energy in the system during the real-time operation is such an operational need. As another example, flexibility services could also be traded for mitigation of a foreseeable congestion in parts of the electricity network. We define a set $\mathcal{P} = \{1, 2, \dots, P\}$ to denote the $P$ commodities traded in the market.

**Market participants:** Our market framework admits heterogeneous competing participants buying or selling one or more commodities in the market. We introduce the notation and discuss properties applicable to all participants here, while delegating the elaboration on various kinds of participants to §2.2. Let the set $\mathcal{I} = \{1, 2, \dots, I\}$ collect $I$ participants, such that $I \ge 2$. For each participant $i \in \mathcal{I}$, let $\mathbf{q}_{it} \in \mathbb{R}^{K_i}$ denote the $K_i \ge P$ number of decision variables at hour $t$. We retrieve the $k$-th element of the decision variable at hour $t$ as $q_{itk} \in \mathbb{R}$, $\forall k \in \{1, 2, \dots, K_i\}$. To facilitate a multi-period market-clearing, we stack $\mathbf{q}_{it}$ for the $T = 24$ hours, extending each participant's decision vector to $\mathbf{q}_i \in \mathbb{R}^{K_i T}$. The first $P$ elements of the vector $\mathbf{q}_{it}$ represent contribution towards the $P$ commodities in hour $t$. For notational compactness, we introduce $\mathbf{q}_{ip} \in \mathbb{R}^T$, $\forall p \in \mathcal{P}$ as a subvector of $\mathbf{q}_i$ extracting the hourly contributions by participant $i$ towards the trades of the $p$-th commodity over the $T$ hours. Apart from the contributions towards the commodity trades, each participant may have $K_i - P$ state variables at each hour $t$, which are involved in the participant's operational constraints. Let $c_{it}(\mathbf{q}_{it}) : \mathbb{R}^{K_i} \to \mathbb{R}$ denote the participant's cost function, such that each $c_{it}(\mathbf{q}_{it})$ is increasing, convex and twice-differentiable in $\mathbf{q}_{it}$ and satisfies $c_{it}(\mathbf{0}) = 0$. We adopt a sign convention that $c_{it}(\mathbf{q}_{it}) > 0$ applies for injection into the network and $c_{it}(\mathbf{q}_{it}) < 0$ for withdrawal, thereby representing the convex cost of injection and concave benefit of withdrawal. The temporally-separable structure of the cost function ensures its convexity while accommodating participants such as firms owning energy storage units, who toggle between being producers (discharging) and consumers (charging).

**Electricity network:** We represent the electricity network as a directed graph $(\mathcal{N}, \mathcal{L})$ formed by a set of nodes $\mathcal{N} = \{1, 2, \dots, N\}$, each potentially hosting multiple market participants, and a set of lines $\mathcal{L}$ comprised of pairs of nodes $(n, n')$ that are connected. We define $\mathcal{I}_n \subseteq \mathcal{I}$, $\forall n \in \mathcal{N}$ as the set of market participants connected to node $n$. The quantity of power flowing over each line and the direction of the flow is governed by nonlinear and non-convex power flow equations during the real-time operation. Moreover, the flow across the network is limited by a maximum flow quantity in each line, known as the thermal limit or rated capacity of a power line.

**System operator:** A system operator ensures that (i) optimal market-clearing outcomes and efficient prices are achieved, and (ii) a continuous balance between consumption and generation is maintained during the real-time operation, while satisfying the transport limits of the underlying electricity network. Evidently, these roles correspond to the tasks of operating the market and operating the network, respectively. In this paper, we assume that the system operator is responsible for both the day-ahead market-clearing and the real-time operation, which is consistent with the prevalent organization in the United States.

**Competition and timeline:** For the simplicity of exposition, this work assumes that no market participant acts strategically to exercise market power. Moreover, we overcome the non-convexity
arising from integrality constraints by accepting offers (bids) from participants already committed to producing (consuming). In our market setting, the committed market participants submit their day-ahead supply offers and demand bids to the central system operator, before a predefined gate closure time, without any knowledge of the bids and offers from other participants. Thereafter, the market is cleared by the system operator matching the offers with the bids, while ensuring the feasibility of network constraints. Finally, cleared prices and quantities for all the commodities are publicly disclosed.

*Payment mechanism:* As in majority of electricity markets worldwide, we adopt a *uniform pricing* scheme for pricing of energy, implying that all accepted supply offers and demand bids are cleared with a common price at a given location and time. Alternative payment mechanisms, e.g., pay-as-bid and Vickrey-Clarke-Groves pricing in a single commodity setting (Vickrey, 1961) are other possibilities and our market-clearing problem is generalizable to admit them.

## 2.2. SOC Constraints in a Market-Clearing Problem

Our general market framework admits heterogeneous market participants of four kinds. First, we consider conventional power producers such as firms that own coal-fired, gas-fired, nuclear, and hydro power plants. These producers are *dispatchable* at the day-ahead stage, i.e., they are able to plan their production during real-time operation with a high degree of certainty. Some are flexible, e.g., gas-fired and hydro, meaning that their planned production quantities can be modified during the real-time operation, if needed. On the contrary, some producers are relatively less flexible, e.g., coal-fired and nuclear power producers. Second, we consider firms owning weather-dependent renewable power production sources such as wind and solar power plants. These producers are *non-dispatchable* and inflexible. Third, we consider energy consumers such as small-scale end-consumers or large industries. Some of these consumers may be flexible and can be counted as flexible resources. Last, we consider additional types of flexibility providers, which may not necessarily be conventional power producers or flexible consumers, for instance, firms owning energy storage units.

SOC constraints applicable to these market participants are derived from a second-order cone, which is a convex set and is alternatively referred to as Lorentz cone or ice-cream cone. For the variable $q_i$ of participant $i$, $\forall i \in \mathcal{I}$, an SOC constraint in its general form is given by

$$ \| \mathbf{A}_i q_i + \mathbf{b}_i \| \le \mathbf{d}_i^\top q_i + e_i \quad \Leftrightarrow \quad \begin{bmatrix} \mathbf{A}_i \\ \mathbf{d}_i^\top \end{bmatrix} q_i + \begin{bmatrix} \mathbf{b}_i \\ e_i \end{bmatrix} \in C_i \subseteq \mathbb{R}^{m_i+1}, \quad (1) $$

where $C_i$ is a second-order cone of dimension $m_i + 1$, where $m_i \in \mathbb{N}$. The dimensions $m_i + 1$ of the cone reflect the relationship within the decision variables. Considering the heterogeneous mix of market participants involved, the dimensions of the cone in the SOC constraints are not necessarily identical among the various participants or even among the constraints of each participant. Parameters $\mathbf{A}_i \in \mathbb{R}^{m_i \times K_i T}$, $\mathbf{b}_i \in \mathbb{R}^{m_i}$, $\mathbf{d}_i \in \mathbb{R}^{K_i T}$ and $e_i \in \mathbb{R}$ embody the structural and geometrical information for each constraint. We use the two equivalent forms in (1) interchangeably, preferring the form with Euclidean norm while discussing the modeling of participant constraints and the conic form in the analytical proofs.

*Linear constraints:* Any single-period or multi-period linear constraint arising from the operation of physical assets owned by a participant $i$ is represented by (1) with appropriate choice of parameters. Linear constraints are represented by the SOC constraint (1), provided that $\mathbf{A}_i$ is a null matrix or the cone is dimensioned such that $m_i = 0$. In the former case, (1) reduces to the linear constraint $0 \le \mathbf{d}_i^\top q_i + e_i$, which denotes a halfspace. Whereas in the latter case, (1) reformulates into a linear constraint $0 \le \mathbf{d}_i^\top q_i + e'_i$, where $e'_i = e_i - \|\mathbf{b}_i\|$. For power producers, such constraints are, e.g., minimum or maximum production limits and ramping rate constraints that limit production change over subsequent hours.
**Quadratic constraints:** While linear constraints are admissible in LP-based electricity markets, convex quadratic constraints are not. However, any convex quadratic operational constraint related to the assets of participant i can be represented by (1) if $d_i = 0$ and $e_i \ge 0$. Example EC.1 in the Supplementary Material illustrates the conic reformulation of such a quadratic constraint.

**Other nonlinear constraints:** In a more general sense, beyond linear and convex quadratic constraints, (1) captures the relationship among the $K_iT$ number of decision variables for each market participant, contributing towards asset-awareness of the market-clearing problem. For instance, such nonlinear constraints arise in the coordination between the electricity system and natural gas system, wherein the operational constraints of the natural gas system become relevant to the day-ahead electricity market-clearing problem, as discussed in the following.

**Example 1 (Electricity and gas system coordination).** The interdependence between electricity and natural gas systems primarily arises due to the significant role played by gas-fired power plants in providing flexibility to the electricity system facing uncertainty. Congestion in the gas network during the real-time operation of the electricity system jeopardizes the availability of fuel for gas-fired power plants and therefore, adversely impacts the flexibility provision (Byeon and Van Hentenryck, 2020). One of the crucial operational constraints of the gas system is the relation between gas flows and nodal pressures in the network. The steady-state flow of gas in the pipelines is represented by a non-convex quadratic equality constraint that relates the squared flow magnitude with the difference in squared pressures at the terminal nodes. A convex relaxation of this non-convex equality takes the form of SOC constraints, as illustrated in the following.

Let $\varphi \in \mathbb{R}_+$ denote the flow of gas along a gas pipeline connecting two terminal nodes, a sending node s and a receiving node r with nodal pressures denoted by $\pi_s \in \mathbb{R}_+$ and $\pi_r \in \mathbb{R}_+$, respectively. Proposed by Borraz-Sánchez et al. (2016), the convex relaxation for the non-convex equality between the flow along a pipeline and the pressures at the terminal nodes is expressed as

$$ \varphi^2 \le \beta^2 (\pi_s^2 - \pi_r^2), \qquad (2) $$

where $\beta \in \mathbb{R}_+$ is a constant encoding the friction coefficient and geometry of pipelines. Ignoring all other pipelines and considering the gas network operator as an electricity market participant, we can denote its decision vector as $q_{\text{GN}} = [\varphi \ \pi_r \ \pi_s]^\top$ and can represent the constraint (2) as an SOC constraint of the form (1) with parameters

$$ \mathbf{A} = \begin{bmatrix} \frac{1}{\beta} & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}, \quad \mathbf{b} = \mathbf{0}_2, \quad \mathbf{d} = \begin{bmatrix} 0 & 0 & 1 \end{bmatrix}^\top \quad \text{and} \quad e = 0, $$

which is a three-dimensional SOC constraint, i.e., $m_i = 2$. Similar SOC constraints are included for other pipelines in the gas network and over various hours, therefore enabling the consideration of gas network operational constraints within the conic electricity market-clearing problem.

Coordination aside, the increased coupling leads to uncertainty propagation from the electricity system to the gas side. This implies that operational constraints involving state variables in the gas system are challenged by uncertain gas withdrawals from gas-fired power plants responding to uncertainty in the electricity system. Accurately modeling and controlling the variance of state variables entails the use of SOC constraints, as studied in Dvorkin et al. (2022).

Lastly, beyond asset-awareness, SOC constraints in their general form enable an uncertainty-aware market-clearing problem. Specifically, chance constraints enable endogenous modeling of uncertainty and risk faced by market participants and are analytically reformulated as SOC constraints under some mild conditions (Nemirovski and Shapiro, 2007), see Example 2 below.
**Example 2 (Chance Constraints).** Consider a market-clearing problem wherein, in addition to the nominal production quantities, a flexibility service is contracted from the flexibility providers in the market. A traded flexibility service is organized as an adjustment policy. As mentioned in §2.1, these adjustment policies allow mitigation of the uncertainty realized during the real-time operation, while look-ahead decisions are made by the system operator at the day-ahead market-clearing stage. Such uncertainty could, for example, arise from imperfect forecasts for the production from weather-dependent renewable energy sources or from imperfect load forecasts for consumers. Assuming a single-period market-clearing problem for notational simplicity, let the set $W = \{1, 2, \dots, W\}$ collect the $W$ independent sources of uncertainty in the electricity system and vector $\xi \in \mathbb{R}^W$ denote the random forecast errors representing this uncertainty. Assume that $\xi$ follows a probability distribution $P_\xi$, parameterized by the moments, mean $\mu \in \mathbb{R}^W$ and covariance $\Sigma \in \mathbb{R}^{W \times W}$, which are estimated by the system operator with access to a finite number of historical measurements. Under the chance-constrained optimization framework, the system operator allocates adjustment policies to flexible producers while allowing them to violate their operational constraints with a small probability $\hat{\varepsilon} \in [0, 1]$. Assume again that participant $i$ has $K_i = 2$ decision variables such that $q_{i1} = [\hat{q}_{i1} \ \alpha_{i1}]^\top \in \mathbb{R}^2$, where $\hat{q}_{i1}$ and $\alpha_{i1}$ are, respectively, the nominal production quantity and the adjustment policy. A chance constraint limiting the total production, i.e., the sum of nominal and adjustment, of the participant to its upper limit $\bar{Q}_i$ is written as

$$P_{\xi} \left( \left[ \mathbf{1} \ \mathbf{1}^{\top} \boldsymbol{\xi} \right] \begin{bmatrix} \hat{q}_{i1} \\ \alpha_{i1} \end{bmatrix} \le \bar{Q}_i \right) \ge (1 - \hat{\varepsilon}), \quad (3a)$$

where the uncertainty is characterized by the total forecast error $\mathbf{1}^{\top} \boldsymbol{\xi} \in \mathbb{R}$. This probabilistic constraint reformulates to its analytic equivalent, based on Nemirovski and Shapiro (2007), as

$$r_{\hat{\varepsilon}} \| \mathbf{X} \mathbf{1} \alpha_{i1} \| \le \bar{Q}_i - \hat{q}_{i1} - \mathbf{1}^{\top} \boldsymbol{\mu} \alpha_{i1}, \quad (3b)$$

where all vectors of ones are $\mathbf{1} \in \mathbb{R}^W$, and $\mathbf{X} \in \mathbb{R}^{W \times W}$ denotes a factorization of the covariance matrix such that $\boldsymbol{\Sigma} = \mathbf{X}\mathbf{X}^\top$. For instance, since $\boldsymbol{\Sigma} \succcurlyeq 0$ from the definition of covariance matrices, such a factorization can be obtained in a computationally efficient manner using Cholesky decomposition, resulting in $\mathbf{X}$ having a lower-triangular structure. This decomposition is uniquely determined for covariance matrices that are full rank, i.e., all uncertainty sources are linearly independent, as assumed. The parameter $r_{\hat{\varepsilon}} \in \mathbb{R}_+$ is a safety parameter chosen by the system operator relying on the knowledge of the distribution $P_\xi$, such that $r_{\hat{\varepsilon}}$ increases as $\hat{\varepsilon}$ reduces$^2$. Constraint (3b) is represented by the general SOC constraint (1) with parameters

$$\mathbf{A} = [\mathbf{0} \ \mathbf{X} \mathbf{1}], \quad \mathbf{b} = \mathbf{0}, \quad \mathbf{d} = -1/r_{\hat{\varepsilon}} [\mathbf{1}^{\top} \boldsymbol{\mu}]^\top \quad \text{and} \quad e = \bar{Q}_i/r_{\hat{\varepsilon}},$$

thereby resulting in an SOC constraint of dimension $W+1$. Further modeling details showcasing the analytical reformulation of more complicated constraints, such as inter-temporal chance constraints of market participants, are covered in the Supplementary Material.

<footnote>$^2$When the random forecast errors $\xi$ are assumed to be normally distributed, the safety parameter $r_{\hat{\varepsilon}}$ is given by the inverse cumulative distribution function of the standard Gaussian distribution evaluated at $(1 - \hat{\varepsilon})$-quantile (Nemirovski and Shapiro, 2007). Dropping the assumption of normality, a more conservative choice of $r_{\hat{\varepsilon}}$ is obtained based on the so-called moment-based distributionally-robust chance constraints (Wagner, 2008), which considers the distribution $P_\xi$ to lie inside an ambiguity set of all probability distributions characterized by the empirically-estimated moments $\boldsymbol{\mu}$ and $\boldsymbol{\Sigma}$. In that case, the safety parameter $r_{\hat{\varepsilon}} = \sqrt{\frac{1-\hat{\varepsilon}}{\hat{\varepsilon}}}$. A further generalization that considers even the moments of distribution $P_\xi$ to lie in well-defined uncertainty sets such as ellipsoids (Delage and Ye, 2010), lead to a semidefinite constraint instead of the SOC constraint in (3b), leading to a SDP-based market-clearing problem.</footnote>
Finally, accounting for the potentially multiple SOC constraints faced by participant i, we introduce a set $\mathcal{J}_i = \{1, 2, \dots, J_i\}$ collecting the $J_i$ constraints that extend (1) as

$$ \|\mathbf{A}_{ij}\mathbf{q}_i + \mathbf{b}_{ij}\| \le \mathbf{d}_{ij}^{\top}\mathbf{q}_i + e_{ij}, \forall j \in \mathcal{J}_i, \quad (4) $$

where each constraint with parameters $\mathbf{A}_{ij} \in \mathbb{R}^{m_{ij} \times K_i T}$, $\mathbf{b}_{ij} \in \mathbb{R}^{m_{ij}}$, $\mathbf{d}_{ij} \in \mathbb{R}^{K_i T}$ and $e_{ij} \in \mathbb{R}$ corresponds to a second-order cone $C \subseteq \mathbb{R}^{m_{ij}+1}$. The feasibility region for (4) is formed by the Cartesian product of $J_i$ second-order cones $C_i = \prod_{j \in \mathcal{J}_i} C_{ij} = C_{i1} \times \dots \times C_{iJ_i}$, which is convex.

## 2.3. Equality Constraints

Each participant may be involved in trades corresponding to the P commodities, subject to equality constraints that arise while considering temporal and spatial dynamics underlying their asset models. We model the equality constraints on the decision variable $\mathbf{q}_i$ of participant i as $\mathbf{F}_i \mathbf{q}_i = \mathbf{h}_i$, where $\mathbf{F}_i \in \mathbb{R}^{R_i \times K_i T}$ and $\mathbf{h}_i \in \mathbb{R}^{R_i}$ are parameters encoding the $R_i$ equality constraints on $\mathbf{q}_i$, such that $R_i \le K_i T$ and $\mathbf{F}_i$ has full row rank.

The market-clearing conditions are also modeled as marginal equalities coupling the decisions of the participants such that supply-demand balance is ensured for each of the P commodities traded in the market. Modeling these conditions, given the heterogeneous mix of market participants in our framework, requires the following definition.

**Definition 1** (Physical Fulfillment of Commodity Trades). For participant $i \in \mathcal{I}$, the hourly injection or withdrawal towards commodity p is given by $\mathbf{G}_{ip} \mathbf{q}_{ip} \in \mathbb{R}^T$, where $\mathbf{G}_{ip} \in \mathbb{R}^{T \times T}$ is a coupling matrix formed by elements encoding the injection or withdrawal coefficients.

We now elaborate on this definition. The contribution by a dispatchable producer (either flexible or inflexible) towards the commodity representing energy is $\mathbf{q}_{ip} \in \mathbb{R}_+^T$, whereas for inflexible consumers, the contribution is $\mathbf{q}_{ip} \in \mathbb{R}_-^T$. For both kinds of market participants, the coupling matrices $\mathbf{G}_{ip}$ are identity matrices, i.e., $\mathbf{G}_{ip} = \text{diag}(1)$. Meanwhile, the contribution from energy storage units $\mathbf{q}_{ip}$ to the commodity corresponding to energy adopts different signs in the various hours depending on whether the storage unit is discharging (injection) or charging (withdrawal). Information on the conversion factors for participants from other sectors such as natural gas or district heating is also encoded within the entries of the matrix $\mathbf{G}_{ip}$. Finally, in addition to those traded system-wide, the market-clearing problem may entail commodities traded among a subset of all participants and thereby, reflect the agreements among that subset. $\mathbf{G}_{ip}$ may thus be null matrices for some commodities and for some participants.

## 2.4. Bid Format in the Conic Electricity Market

For the sake of generality, we adopt a common bid format for the supply offers and demand bids, referring to them as supply and demand bids, respectively and define them in the following.

**Definition 2** (Conic Market Bids). Let $\mathcal{B}_i$ denote a bid submitted by the market participant i to the system operator. The bid $\mathcal{B}_i$ is a tuple defined as

$$ \mathcal{B}_i := (n_i, \{\mathbf{A}_{ij}, \mathbf{b}_{ij}, \mathbf{d}_{ij}, e_{ij}\}_{j \in \mathcal{J}_i}, \mathbf{F}_i, \mathbf{h}_i, \{\mathbf{G}_{ip}\}_{p \in \mathcal{P}}, \{\mathbf{c}_{it}^Q, \mathbf{c}_{it}^L\}_{t \in \mathcal{T}}), $$

where $n_i \in \mathcal{N}$ is the electricity network node at which the participant i is located. Parameters $\mathbf{A}_{ij}, \mathbf{b}_{ij}, \mathbf{d}_{ij}, e_{ij}, \forall j \in \mathcal{J}_i$ are linked to the $J_i$ SOC constraints; $\mathbf{G}_{ip}, \forall p \in \mathcal{P}$ correspond to the coupling matrices for the P commodities; $\mathbf{F}_i$ and $\mathbf{h}_i$ correspond to the $R_i$ equality constraints; and lastly, $\mathbf{c}_{it}^Q, \mathbf{c}_{it}^L, \forall t \in \mathcal{T}$ denote the temporally-separated quadratic and linear bid prices.
**Remark 2** (Conic Market Bids vs. Price-Quantity Bids). The bids $B_i$ are a generalization of the classical price-quantity bids that form the backbone of various orders placed in currently-operational LP-based electricity markets, see Nord Pool (2021) for example. As the name indicates, in addition to the participant's locational information, a price-quantity bid comprises a bid price representing the bidder's willingness-to-pay or willingness-to-receive for the associated quantity. In the proposed conic market bids, the quantities are formed by the parameters of the j-th SOC constraint {$A_{ij}, b_{ij}, d_{ij}, e_{ij}$} admitting the simple linear characterization of quantities $q_i$ when $A_{ij}$ is a null matrix or when $m_{ij} = 0$, while more intricate representations of the operational constraints are covered by a suitable choice of the SOC constraint parameters, as discussed in §2.2. In contrast to price-quantity bids, the SOC constraint parameters enable market participants to explicitly reflect the SOC-representable nonlinearities in their costs and operational constraints. Furthermore, market participation in terms of supply (or demand) quantity $q_{ip}$ towards a specific commodity $p \in P$ is decoupled from the potential costs and constraints with associated with the state variables of the participants comprising $q_i$. However, the proposed bid format requires a more complex exchange of information between the market participants and the market operator. In practice, a simple bid transformation software layer could convert the standard price-quantity bids by participants into the conic bid format, before the market is cleared.

## 2.5. Market-Clearing as an SOCP Problem

**Network constraints:** An accurate modeling of the physics of power flows in the electricity network introduces nonlinearities and non-convexities. Convexification of these power flow equations have utilized SOCP (Kocuk et al., 2016) and SDP (Lavaei and Low, 2012) relaxations to ensure optimality while solving electricity system-related optimization problems. However, electricity market-clearing problems across the world adopt a linearized approximation of the power flow equations, relying on a number of assumptions (Cain et al., 2012). Consistent with current practice and for simplicity of exposition, our formulation adopts a variation of linearized power flow equations that leverages the so-called Power Transfer Distribution Factor (PTDF) matrix. Example EC.2 in Supplementary Material illustrates an extension to the market-clearing problem formulated in this work to include SOC-based convex relaxation of the non-convex AC power flow equations.

**Definition 3** (Power flows using PTDF). With the set $\mathcal{I}_n \subseteq \mathcal{I}$ collecting market participants located at node $n$, the power flow $s^a_\ell$ along a line $\ell = (n, n')$ at hour $t$ is given by

$$s^a_\ell = \sum_{n \in \mathcal{N}} [\Psi]_{(\ell, n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \mathbf{q}_{ip}]_t \right),$$

where $\Psi \in \mathbb{R}^{L \times N}$ denotes the PTDF matrix of the electricity network. Derived from the physical parameters of power lines comprising the network, entries of the PTDF matrix are the sensitivity of changes in the flow in any line to a unit injection at a given node. The expression $\sum_{i \in \mathcal{I}_n} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \mathbf{q}_{ip}]_t \in \mathbb{R}$ computes the algebraic sum of injections or withdrawals of all participants located at node $n$ towards the $P$ commodities at hour $t$.

**Remark 3.** All $P$ commodities share the common physical network for fulfillment of the trades, as reflected by the summation in the expression for power flows in Definition 3. Alternative formulations can be envisioned such that not all commodity trades rely on the physical network for fulfillment. For instance, flexibility services may include purely financial instruments to hedge risk in electricity markets (Philpott et al., 2016; Mieth et al., 2021).
Conic market-clearing problem, $\mathcal{M}^c$: Without loss of generality, we assume that the participants have quadratic cost functions which satisfy the conditions in §2.1. In the interest of computational and analytical simplicity, we reformulate the quadratic costs as SOC constraints following the approach in Example EC.1. Auxiliary decision variables $z_i \in \mathbb{R}^T, \forall i$ are introduced, representing the participants' hourly quadratic cost components. The market-clearing problem, hereafter referred to as $\mathcal{M}^c$, is formulated as

$$ \min_{q_i, z_i} \sum_{i \in \mathcal{I}} \sum_{t \in \mathcal{T}} (z_{it} + c_{it}^{\mathrm{T}} q_{it}) \qquad (5a) $$

$$ \text{s.t.} \quad \left\| \mathbf{C}_{it}^{\mathrm{Q}} \mathbf{q}_{it} \right\|^2 \le z_{it}, \forall t, \forall i \qquad : (\boldsymbol{\mu}_{it}^{\mathrm{Q}}, \kappa_{it}^{\mathrm{Q}}, \nu_{it}^{\mathrm{Q}}) \qquad (5b) $$

$$ \| \mathbf{A}_{ij} \mathbf{q}_i + \mathbf{b}_{ij} \| \le \mathbf{d}_{ij}^{\mathrm{T}} \mathbf{q}_i + e_{ij}, \forall j \in \mathcal{J}_i, \forall i \qquad : (\boldsymbol{\mu}_{ij}, \nu_{ij}) \qquad (5c) $$

$$ \mathbf{F}_i \mathbf{q}_i = \mathbf{h}_i, \forall i \qquad : (\gamma_i) \qquad (5d) $$

$$ \sum_{i \in \mathcal{I}} \mathbf{G}_{ip} \mathbf{q}_{ip} = \mathbf{0}_T, \forall p, \qquad : (\lambda_p) \qquad (5e) $$

$$ \left| \sum_{n \in \mathcal{N}} [\mathbf{\Psi}]_{(\cdot, n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \mathbf{q}_{ip}]_t \right) \right| \le \bar{s}, \forall t, \qquad : (\underline{\mathbf{q}}_t, \bar{\mathbf{q}}_t) \qquad (5f) $$

where the objective (5a) minimizes social disutility (or maximizes social welfare) of the market-clearing problem over the time horizon, $t \in \mathcal{T}$. Recall that $\mathbf{q}_{it} \in \mathbb{R}^{K_i}$ and $\mathbf{q}_{ip} \in \mathbb{R}^T$ are subsets of the $i$-th participant's decision vector $\mathbf{q}_i \in \mathbb{R}^{K_i T}$. The Lagrange multipliers associated with the constraints are shown in parentheses next to them. The constraint parameters, in their order of appearance, are $\mathbf{A}_{ij} \in \mathbb{R}^{m_{ij} \times K_i T}, \mathbf{b}_{ij} \in \mathbb{R}^{m_{ij}}, \mathbf{d}_{ij} \in \mathbb{R}^{K_i T}, e_{ij} \in \mathbb{R}, \mathbf{F}_i \in \mathbb{R}^{R_i \times K_i T}, \mathbf{h}_i \in \mathbb{R}^{R_i}, \mathbf{G}_{ip} \in \mathbb{R}^{T \times T}, [\mathbf{\Psi}]_{(\cdot, n)} \in \mathbb{R}^L \text{ and } \bar{s} \in \mathbb{R}^L$. The index $j \in \mathcal{J}_i$ refers to the $J_i$ SOC constraints of participant $i$ as discussed in §2.2, while the index $p \in \mathcal{P}$ refers to the $P$ commodities traded among the participants. Constraints (5b)-(5d) are participant-specific, while (5e)-(5f) are related to the commodities exchanged in the market.

The temporally-separable quadratic and linear bid prices of participant $i$ are given by $c_{it}^Q, c_{it}^L \in \mathbb{R}^{K_i}$ and $C_{it}^Q \in \mathbb{R}^{K_i \times K_i}$ is a factorization of the quadratic cost matrix such that $\mathrm{diag}(c_{it}^Q) = C_{it}^{Q\top} C_{it}^Q$. Lagrange multipliers $\boldsymbol{\mu}_{it}^Q \in \mathbb{R}^{K_i}, \kappa_{it}^Q \in \mathbb{R}_+^\top$ and $\nu_{it}^Q \in \mathbb{R}_+^\top, \forall t, \forall i$, are participant-specific dual variables associated with the rotated SOC constraints (5b) which are satisfied with equality at the optimal solution to problem $\mathcal{M}^c$. Constraints (5c) model the SOC constraints applicable to the market participants that enable asset- and uncertainty-awareness of the market-clearing problem. The tuple of dual variables associated with the SOC constraints (5c) are $(\boldsymbol{\mu}_{ij}, \nu_{ij})$, where $\boldsymbol{\mu}_{ij} \in \mathbb{R}^{m_{ij}}$ and $\nu_{ij} \in \mathbb{R}_+^\top$. Unlike linear scalar inequalities which admit a single non-negative dual variable, SOC constraints (5b)-(5c) admit tuples of dual variables, as shown while obtaining dual formulations for the SOC constraints in Appendix A.1. Lastly, the dual variable $\gamma_i \in \mathbb{R}^{R_i}$ associates with the $R_i$ equality constraints for the participant $i$, see §2.3.

Constraints (5e) are the system-wide balance constraints that couple the decisions of the market participants for each of the $P$ commodities traded in the market, such that the Lagrange multipliers associated with these constraints $\lambda_p \in \mathbb{R}^T$ are interpretable as commodity prices. For instance, the Lagrange multiplier associated with the balance between electricity production and consumption is the nodal price of electricity. Lastly, constraints (5f) limit the magnitude of power flow in the lines to their rated capacity, $\bar{s}$, as given by Definition 3. Given the element-wise absolute value operator in this constraint, we associate a pair of non-negative dual variables $\underline{\mathbf{q}}_t, \bar{\mathbf{q}}_t \in \mathbb{R}_+^L$ with it. Naturally, constraints (5f) can be altered to include asymmetric limits, i.e., the limits which depend on the direction of flow in the power lines, without significant change to the analytical results that follow. Further, note that instead of the chosen PTDF-based formulation, implementing an SOCP
relaxation for the formulation of power flow equations affects the constraint (5f). However, the overall market-clearing problem $\mathcal{M}^c$ remains within the SOCP framework. Finally, adopting the SOC relaxation for the non-convex AC power flow equations (Example EC.2 in Supplementary Material), constraints (5f) are replaced by SOC constraints while additional state variables are introduced to model the electricity network parameters. In that case, while (5) remains an SOCP problem, the pricing of commodities under such conic network constraints (presented in §3) merits further investigation.

**Remark 4 (Strict Convexity).** Observe that the optimization problem $\mathcal{M}^c$ has a strictly convex objective function (5a) provided every market participant incurs a non-zero quadratic cost at all hours for each of its $K_i$ variables. To see that, we recall that every positive semidefinite matrix is the Gram matrix for some set of vectors. For the quadratic cost matrix $\mathrm{diag}(c_{it}^Q) \succ 0$,

$$ q_{it}^{\top} \mathrm{diag}(c_{it}^Q) q_{it} = q_{it}^{\top} C_{it}^{\top} C_{it} C_{it} q_{it} = \| C_{it}^Q q_{it} \|^2, \forall t, \forall i, $$

such that strict convexity is guaranteed only if the quadratic cost matrix is positive definite, i.e., $\mathrm{diag}(c_{it}^Q) \succ 0$, which requires $c_{itk}^Q \neq 0, \forall k = 1, 2, \dots, K_i, \forall t, \forall i$.

### 3. Economic Interpretation and Equilibrium Analysis

We discuss the price formation process for the $P$ commodities traded in the market in §3.1, followed by the theoretical results that characterize the spatial price equilibrium underlying the centrally-solved market-clearing problem $\mathcal{M}^c$ in §3.2.

#### 3.1. Conic Spatial Prices for Commodities

Deriving optimal market-clearing prices for the problem $\mathcal{M}^c$ is not straightforward, since strong duality is not trivial to establish for an SOCP problem (Ben-Tal and Nemirovski, 2001). Unlike their LP counterparts where strong duality is guaranteed merely by the feasibility of the primal and dual problems as formulated in Farkas' lemma, strong duality in SOCP problems derives from the existence of *strictly feasible* solutions to both the primal and dual problems (Alizadeh and Goldfarb, 2003, Theorem 13). Conventionally, ensuring the strict feasibility or even merely the feasibility of market-clearing problem is considered at a market design stage and is not of high relevance for the market operator. However, in the interest of generality and wider acceptance of a conic market-clearing framework, we address this crucial issue in our analytical results.

Following Slater's constraint qualification for convex optimization problems, strict feasibility refers to the existence of points within the feasibility set of the primal problem where all inequalities - SOC and linear - are strictly satisfied. Additionally, a refinement to Slater's constraint qualification yields the so-called *essentially strict feasibility* of an SOCP problem.

**Definition 4 (Essentially Strict Feasibility).** The market-clearing problem $\mathcal{M}^c$ is essentially strictly feasible, if there exists a feasible solution tuple denoted by $(q_i, z_i), \forall i$ such that

$$ \begin{aligned} \| C_{it}^Q q_{it} \|^2 &< z_{it}, \forall t, \forall i, \\ \| A_{ij} q_i + b_{ij} \| &< d_{ij}^\top q_i + e_{ij}, \forall j \in \mathcal{J}_i, \forall i. \end{aligned} $$

Observe that essentially strict feasibility is a weaker requirement as compared to strict feasibility. However, it is necessary and sufficient for strong duality to hold for $\mathcal{M}^c$ since other inequalities (5f) are linear in decision variables (Boyd and Vandenberghe, 2004, §5.2.3). We now provide the analytical results crucial to deriving optimal prices from the market-clearing problem $\mathcal{M}^c$.
**Theorem 1** (Strong Duality). Let $\mathcal{D}^c$ denote the dual problem to the market-clearing problem $\mathcal{M}^c$. If the set of feasible solutions to the primal problem $\mathcal{M}^c$ is non-empty, then both the primal problem $\mathcal{M}^c$ and dual problem $\mathcal{D}^c$ are essentially strictly feasible, and consequently, strong duality holds for the primal-dual pair of problems $\mathcal{M}^c$ and $\mathcal{D}^c$.

Conditioned on feasibility of the primal market-clearing problem $\mathcal{M}^c$, Theorem 1 enables economic interpretations of the market-clearing outcomes. Relying on classical Lagrangian duality theory, we provide an analytical expression for the optimal, spatially-differentiated nodal prices of the $P$ commodities in the following theorem.

**Theorem 2** (Conic Spatial Prices). The solution to the conic market-clearing problem $\mathcal{M}^c$ results in optimal contributions $q_{ip}^*$, $\forall i \in \mathcal{I}$ for the $p \in \mathcal{P}$ commodities and the market clears with optimal prices $\Pi_p^* \in \mathbb{R}^{N \times T}$ for the $p$-th commodity given by

$$ \Pi_p^* = \Lambda_p^* - \Psi^\top(\bar{\rho}^* - \underline{\rho}^*), \quad \forall p \in \mathcal{P}, \qquad (6) $$

where $\underline{\rho}^*$, $\bar{\rho}^* \in \mathbb{R}^{L \times T}$ and $\Lambda_p^* \in \mathbb{R}^{N \times T}$ are variables with stacked columns of optimal dual variables $\underline{\rho}_t^*$, $\bar{\rho}_t^*$, $\forall t$ and $\lambda_p^*$, $\forall n$, respectively, over the $T$ market-clearing hours, i.e.,

$$ \bar{\rho}^* = [\underline{\rho}_1^* \cdots \underline{\rho}_T^*], \quad \underline{\rho}^* = [\underline{\rho}_1^* \cdots \underline{\rho}_T^*], \quad \text{and} \quad \Lambda_p^* := \mathbb{1}_N^\top \otimes \lambda_p^*. $$

The commodity prices given by Theorem 2 are analogous in structure to the LMPs resulting from the prevalent LP-based electricity market-clearing frameworks. Specifically, the optimal prices $\Pi_p^*$ comprise of a nodal price component for each commodity $\Lambda_p^*$ and a network price component which is non-zero only if congestion arises in the network as a consequence of the power flows along the lines to fulfill the trades.

### 3.2. $\mathcal{M}^c$ as a Spatial Equilibrium Problem

First, we show the equivalence of the optimization problem $\mathcal{M}^c$ to a spatial equilibrium problem. Referring to the two roles played by the system operator discussed in §1, consider a virtual separation of the system operator into a *market operator* and a *network operator*. First, the market operator, acting as a *price setter*, collects the conic market bids from market participants and is responsible for clearing the day-ahead market and for the real-time operation of the system. Second, the network operator, responsible for the physical fulfillment of the commodities, acts as a *spatial arbitrager* to collect a non-zero revenue, *congestion rent*, whenever the trades lead to congestion in the network.

Consider an equilibrium problem $\mathcal{E}^c$ comprised of a set of individual optimization problems of the $i \in \mathcal{I}$ market participants, the network operator and the market-clearing conditions. For market participant $i$ located at node $n_i \in \mathcal{N}$, let $\mathbf{W}_{ip} \in \mathbb{R}^{N \times T}$ denote the quantities of the commodity $p \in \mathcal{P}$ transacted (bought or sold) over the $N$ nodes at the $T$ hours. Under the perfect competition assumption, the commodity prices $\Pi_p$, $\forall p$ are exogenous to the participants' optimization problem. Therefore, participant $i$ maximizes her profit by deciding the optimal contributions $q_{ip}$, $\forall p \in \mathcal{P}$
commodities traded in the market, subject to her operational constraints, by solving the problem

$$ \max_{\mathbf{q}_i, z_i, \mathbf{W}_{ip}} \sum_{p \in \mathcal{P}} \mathrm{tr}(\mathbf{\Pi}_p^\top \mathbf{W}_{ip}) - \sum_{t \in \mathcal{T}} (z_{it} + \mathbf{c}_{it}^{\mathrm{T}} \mathbf{q}_{it}) - \sum_{t \in \mathcal{T}} \omega_t^\top (\sum_{p \in \mathcal{P}} ([\mathbf{W}_{ip}]_{(\cdot,t)} - \mathbb{1}_{n_i}[\mathbf{G}_{ip} \mathbf{q}_{ip}]_t)) \quad (7a) $$

$$ \text{s.t.} \quad \| \mathbf{C}_{it}^{\mathrm{Q}} \mathbf{q}_{it} \|^2 \le z_{it}, \forall t \qquad : (\mu_{it}^{\mathrm{Q}}, \kappa_{it}^{\mathrm{Q}}, \nu_{it}^{\mathrm{Q}}) \quad (7b) $$

$$ \| \mathbf{A}_{ij} \mathbf{q}_i + \mathbf{b}_{ij} \| \le \mathbf{d}_{ij}^{\mathrm{T}} \mathbf{q}_i + e_{ij}, \forall j \in \mathcal{J}_i \qquad : (\mu_{ij}, \nu_{ij}) \quad (7c) $$

$$ \mathbf{F}_i \mathbf{q}_i = \mathbf{h}_i \qquad : (\gamma_i) \quad (7d) $$

$$ \mathbf{W}_{ip}^{\mathrm{T}} \mathbb{1} = \mathbf{G}_{ip} \mathbf{q}_{ip}, \forall p \in \mathcal{P}, \qquad : (\hat{\lambda}_{ip}) \quad (7e) $$

where the three terms comprising the objective function (7a) are the revenues generated by the transactions, the cost (utility) of production (consumption) and the third term is the transport cost for the physical fulfillment of the transactions at the nodes where they are delivered. Here, the indicator vector $\mathbb{1}_{n_i} \in \mathbb{R}^N$ contains the element corresponding to the location of participant $i$ as 1, while all other elements are 0. Constraints (7e) ensure a balance of the commodity transactions with the contributions towards the trades as given by Definition 1. Variables $\hat{\lambda}_{ip} \in \mathbb{R}^T$ are the Lagrange multipliers associated with these constraints. Note that the nodal commodity prices $\mathbf{\Pi}_p$ and the price of transmitting power $\omega_t \in \mathbb{R}^N$, $\forall t$ are set by the market operator and, as such, are considered as fixed by the participant.

Next, the network operator maximizes congestion rent, while fulfilling the trades of all the commodities in the market. Let $\mathbf{y}_t \in \mathbb{R}^N$, $\forall t$ denote the net power injection comprising of all commodities and all market participants at the $N$ nodes at each hour. The network operator solves the following maximization problem subject to the network limits

$$ \max_{\mathbf{y}_t} \sum_{t \in \mathcal{T}} \omega_t^\top \mathbf{y}_t \quad \text{s.t.} \quad -\bar{s} \le \Psi \mathbf{y}_t \le \bar{s}, \quad : (\underline{\mathbf{q}}_t, \bar{\mathbf{q}}_t), \quad (8) $$

where $\omega_t$ are variables exogenous to the network operator and the constraints limit the power flows along the lines to their rated capacity in both directions.

Lastly, the market operator clears the market based on the following equalities

$$ \sum_{p \in \mathcal{P}} [\mathbf{Q}_p^{\mathrm{inj}}]_{(\cdot,t)} = \mathbf{y}_t, \forall t \qquad : (\omega_t) \quad (9a) $$

$$ \sum_{i \in \mathcal{I}} \mathbf{G}_{ip} \mathbf{q}_{ip} = \mathbf{0}, \forall p \in \mathcal{P}, \qquad : (\lambda_p) \quad (9b) $$

where the auxiliary variable $\mathbf{Q}_p^{\mathrm{inj}} \in \mathbb{R}^{N \times T}$ denotes the commodity-specific net nodal injections

$$ \mathbf{Q}_p^{\mathrm{inj}} := \left[ \sum_{i \in \mathcal{I}_1} (\mathbf{G}_{ip} \mathbf{q}_{ip})^{\mathrm{T}} \quad \sum_{i \in \mathcal{I}_2} (\mathbf{G}_{ip} \mathbf{q}_{ip})^{\mathrm{T}} \quad \dots \quad \sum_{i \in \mathcal{I}_N} (\mathbf{G}_{ip} \mathbf{q}_{ip})^{\mathrm{T}} \right]^{\mathrm{T}}. \quad (10) $$

The market-clearing equalities (9a) ensure the net injection at each of the nodes of the network is balanced by the transport service provided by the network operator. The shadow price of this constraint, $\omega_t$, appears as a parameter in the network operator's maximization (8) and is interpreted as the price of transmitting power from an arbitrary hub to the each of the nodes. As discussed previously, (9b) ensure the system-wide balance of traded commodities.

**Theorem 3 (Competitive Spatial Equilibrium).** The convex market-clearing problem $\mathcal{M}^c$ solved centrally by the system operator is equivalent to a competitive spatial equilibrium $\mathcal{E}^c$ comprised of
market participants, $i \in \mathcal{I}$ each solving the profit maximization (7), the network operator solving the congestion rent maximization (8) and the market operator clearing the market by enforcing the equalities (9).

The proof for Theorem 3 relies on the equivalence of the Karush-Kuhn-Tucker (KKT) optimality conditions of the two problems.

**Corollary 1 (Existence and Uniqueness).** The solution to the competitive spatial price equilibrium problem $\mathcal{E}^c$ exists and is unique in allocations $q_i^*$, provided all market participants bid with non-zero quadratic price components, i.e., $c_{itk}^Q \neq 0, \forall k = 1, 2, \dots, K_i, \forall t, \forall i \in \mathcal{I}$.

While Corollary 1 yields uniqueness of allocations $q_i^*$, conditioned on the strict convexity of the objective function (5a), no such guarantees on the uniqueness of the prices $\Pi_p^*$ can be given since the dual problem to (5) (formulated in Appendix A.2) does not admit a strictly convex objective function. The conditions on the uniqueness of the allocations at equilibrium closely correspond to those in prevalent LP-based markets<fnref n="3" />. Next, we analyze the desired economic properties underlying the equilibrium $\mathcal{E}^c$.

**Theorem 4 (Economic Properties).** The market-clearing problem $\mathcal{M}^c$ and its equivalent competitive spatial equilibrium $\mathcal{E}^c$ result in optimal allocations $q_i^*$, $\forall i \in \mathcal{I}$ and spatial commodity prices $\Pi_p^*$, $\forall p \in \mathcal{P}$ such that the following economic properties are attained at optimality:

(i) **Market efficiency:** Under the perfect competition assumption, social welfare is maximized, such that no participant desires to unilaterally deviate from the market-clearing outcomes.

(ii) **Cost recovery:** Let the market bids $B_i$ for each market participant $i \in \mathcal{I}$ be such that $e_{ij} \ge \|b_{ij}\|, \forall j \in \mathcal{J}_i$ and $b_i = 0$. Then, the optimal allocations $q_i^*$, $\forall i \in \mathcal{I}$ and optimal spatial commodity prices $\Pi_p^*$, $\forall p \in \mathcal{P}$ ensure cost recovery for the market participants.

(iii) **Revenue adequacy:** The market operator does not incur financial deficit at the end of the market-clearing horizon, i.e.,

$$ \sum_{p \in \mathcal{P}} \sum_{i \in \mathcal{I}} \mathrm{tr}(\Pi_p^\top \mathbf{W}_{ip}^*) - \sum_{t \in \mathcal{T}} \omega_t^\top \mathbf{y}_t^* \ge 0. $$

Theorem 4 characterizes the economic properties underlying the market-clearing outcomes from the conic market-clearing $\mathcal{M}^c$. While market efficiency is guaranteed under the perfect competition assumption, cost recovery is ensured for all participants under two conditions, which we elaborate in the following. First, as shown in the modeling examples in the Supplementary Material, the condition $e_{ij} \ge \|b_{ij}\|$ holds true for all participants in most practical settings, with the notable exception of market participants having a non-zero lower bound on their decision variables. The practical issue of non-guarantee of cost recovery for such market participants also prevails in currently-operational LP-based electricity markets. The second condition relates to the homogeneity of the linear equality constraints (5d), i.e., $q_i = 0, \forall i$ is a feasible solution to the market-clearing problem. Observe that, the feasibility of a zero-allocation solution, i.e., $q_i = 0, \forall i$ also satisfies the first condition, thereby indicating that these two conditions are equivalent. Lastly, the condition for revenue adequacy for the market operator requires that the net payments received from the market participants $i \in \mathcal{I}$ less the payments made by the market operator to the network operator towards transmission service is non-negative.

<footnote n="3">³Recently, Krebs et al. (2018) provided conditions on network connectivity, PTDF matrix parameters, and the specific structure of participants’ cost functions under which unique allocations are obtained at market equilibrium with linear constraints. Further research in similar directions is needed to study such conditions for the proposed SOCP-based market.</footnote>
**Remark 5** (Incentive Compatibility). The incentive for actors to deviate from price-taking, perfectly-competitive behavior decreases to zero as the number of actors goes to infinity Roberts and Postlewaite (1976). Thus, assuming a very large number of market participants, the conic market-clearing proposal tends towards incentive compatibility, i.e., at the limit participants bid according to their true preferences. The conditions under which incentive compatibility is satisfied by $M^c$ is akin to the prevalent LP-based electricity markets, thereby preserving this desired economic property in the move towards an SOCP-based market-clearing framework.

Beyond the desired economic properties discussed so-far, we analyze the robustness of the market-clearing outcomes resulting from $M^c$ against small changes in parameters. Strong duality aside, in the context of a market-clearing problem, this property is crucial to be studied for SOCP problems. Robust solvability refers to the property of an SOCP problem such that it remains solvable and obtains the optimal solution even when the problem parameters are changed by arbitrary small perturbations. Proposition 1.4.6 in Ben-Tal and Nemirovski (2001) establishes that robust solvability is guaranteed by the strict feasibility of both primal and dual problems. The following corollary to Theorem 1 formalizes robust solvability of the conic market-clearing problem.

**Corollary 2** (Robust Solvability of $M^c$). The market-clearing problem $M^c$ is robust solvable, i.e., for the $p \in P$ commodities traded in the market, both the optimal contributions $q_{ip}^*$, $\forall i$ and the optimal prices $\Pi_p^*$ obtained, are robust against small perturbations in the parameters comprising the bids $B_i$, $\forall i \in I$.

The proof to Corollary 2 is a direct consequence of Theorem 1. This result ensures robust outcomes from a large-scale market-clearing problem admitting hundreds (possibly thousands) of market participants and their SOC constraints. Robust solvability status of the market-clearing problem implies that numerical pathologies arising from approximations, e.g., rounding-off errors, estimation of uncertain parameters, etc. do not cause solvability-related issues.

## 4. Numerical Studies

We perform numerical experiments on a 24-node electricity system wherein the various market participants, comprising of 6 wind power producers, 9 flexible and 3 inflexible power producers (PPs), 3 identical energy storage units (ESUs) owners, and 17 inflexible consumers, are connected at the nodes as shown in Figure 2(a). The system data is adapted from Conejo et al. (2010) to include the wind farms and ESUs. We study the market-clearing outcomes under various renewable energy share (RES) paradigms$^4$, ranging from 10% to 60% of the total energy demand from consumers met by the wind power producers. The wind power producers bid at zero prices to ensure acceptance of bids, and ESU owners bid at prices lower than the cheapest flexible PP. We assume that the inflexible loads exhibit perfect inelasticity of demand, rendering the social welfare maximization problem equivalent to finding cost-minimal dispatch, in expectation, for PPs and ESUs to provide energy and flexibility services needed to meet the net demand. Here, net demand refers to the energy demand from inelastic loads reduced by the production from wind farms during the real-time operation. There is no uncertainty in the inelastic demand. The expected net demand based on the day-ahead wind power production forecasts for the 50% RES paradigm is shown in Figure 2(b). Naturally, the market operator faces high uncertainty in the hours with smaller net

<footnote>$^4$These paradigms are derived by suitably varying the installed capacity of the wind farms while dimensioning the ESUs such that the total available charging/discharging capacity remains fixed at 12.5% of the total wind farm installed capacity. Such dynamic dimensioning of storage-related flexibility is crucial to ensure market-clearing feasibility for the high RES paradigms.</footnote>
<figure><img src="image_2.png" /><figcaption>Figure 1: Illustration of commodities traded in an uncertainty-aware electricity market</figcaption></figure>

demand due to the high share of weather-dependent renewable energy. To highlight the impact of network congestion on spatial prices and quantities, we consider two network configurations: (i) without any network bottlenecks and (ii) with network bottlenecks induced by reducing capacities of three transmission lines of the network, shown in blue in Figure 2(a). Based on this setup, §4.1 demonstrates the uncertainty-awareness of our market-clearing proposal, followed by an analysis of the market-clearing outcomes and conic spatial equilibrium prices. In §4.2, we compare the proposed SOCP market-clearing problem with two uncertainty-aware alternatives within the LP domain. While we discuss our numerical results solely in the context of an uncertainty-aware market framework in this section, the examples provided in the Supplementary Material can be used to extend the market-clearing problem to include asset- and/or network-awareness.

## 4.1. SOCP-based Uncertainty-aware Energy and Flexibility Market

Recalling Example 2, we consider a chance-constrained electricity market-clearing problem wherein two commodities, energy and adjustment policies, are cleared by the system operator. Figure 1 illustrates such a two-commodity market, highlighting the day-ahead clearing and the activities during the real-time operation. The commodities are traded such that an uncertainty-aware spatial price equilibrium is achieved.

**Adjustment policies as a flexibility service:** Optimal adjustment policies allocated to flexibility providers enable the mitigation of uncertainty realized during the real-time operation, while look-ahead decisions are made by the system operator at the day-ahead market-clearing stage. Activated during the real-time operation, these policies are in *per unit* and imply the contribution of each flexibility provider towards mitigating the potential real-time imbalance in the system. For example, a flexibility provider may, in the day-ahead market, be allocated a policy corresponding to 10% adjustment, implying that it contributes to mitigating 10% of any type of imbalance (either over- or under-supply) during the real-time operation. Contrary to the prevalent capacity-based reserves (González et al., 2014), further discussed in §4.2, such adjustment policies when considered in a two-commodity market clearing setup, tightly couple the flexibility provider's actual operational constraints with the delivery of the flexibility service. Consequently, the flexibility procured is dimensioned optimally and can be priced dynamically, consistent with the actual flexibility needs in the electricity system (Ratha et al., 2019). First proposed by Warrington et al. (2013) within a robust optimization framework, such policies are preferable over capacity-based reserves since they are temporally coupled and therefore, potentially exploit the spatio-temporal correlation of forecast errors. This is highly relevant in a multi-period market setting with flexibility providers facing temporally-coupled constraints. Finally, from a practical standpoint, adopting these policies implies that in addition to payments for energy, flexibility providers are paid for their flexibility service upfront, i.e., at the day-ahead stage.

**Optimal policies in a chance-constrained market:** Employing chance-constrained stochastic programs to optimize the adjustment policies in contrast to scenario-based or robust stochastic programs is beneficial from an economic interpretation point of view. First, chance-constrained stochastic programs can be safely approximated by deterministic programs under mild conditions,
e.g., the feasibility region formed by the inequalities is polyhedral and the adjustment policies are
affine in random variables (Nemirovski, 2012). Computational tractability aside, such a problem
reformulation is particularly suitable for market settings since the clearing outcomes (commodity
quantities and prices) are deterministic, analytically expressable, and therefore, more acceptable to
market participants. Furthermore, the convex approximations become exact when the uncertainty
follows a Gaussian distribution. Second, the economic properties of the market equilibrium, dis-
cussed in §3, hold not only for the expected allocations obtained but also for every realization drawn
from the probability distribution underlying the system operator’s uncertainty model. Referring
to Example 2, this implies that, for a given choice of $r_\epsilon$, Theorem 4 holds for the expected value
and every realization $\hat{\xi}$ drawn from the distribution $P_\xi$ characterized by mean $\mu$ and $\Sigma$ (Dvorkin,
2020). These advantages make chance-constrained optimization a suitable framework to incorpo-
rate uncertainty in electricity markets<fnref n="5" />. Considering the novelty of admitting adjustment policies
as opposed to the conventional flexible capacity to meet the uncertain net demand, we provide
insights into the endogenous consideration of uncertainty and quantify the flexibility payments in
the following. The modeling of market participants, chance-constrained market-clearing problem
and its SOCP reformulation (which we refer to hereafter as $M^{cc}$) is provided in the Supplementary
Material.

*Impact of congestion and uncertainty on prices:* The density plot in Figure 2(a) visualizes the im-
pact of network bottlenecks on the day-ahead energy prices for hour 23 under the 50% renewable
energy share paradigm. Figures 2(c) and 2(d) show the commodity prices for the network config-
uration without bottlenecks for the various RES paradigms. Observe that with higher shares of
renewable energy, the payment made by the market operator towards flexibility increases, comple-
mentary to the gradual reduction in the energy price due to wind farms bidding with zero prices.
Overall, increasing uncertainty faced at the day-ahead market-clearing stage leads to lower energy
prices while the payments towards flexibility services increase, thereby resulting in the right market
signals for investments in flexibility over the long run. Note that, since the adjustment polices are
quantified in per unit, the hourly flexibility payments shown in Figure 2(d) correspond to total
payments made by the market operator towards flexibility, adopting an allocation determined by
the adjustment policies of individual flexibility providers and as such, following a *differentiated
pricing* scheme. We now discuss the allocation of adjustment policies and provide further insights
into the pricing of flexibility.

*Flexibility allocation and payments:* For the 50% RES paradigm, Figures 3(a)-3(f) show the optimal allocation of dispatch and adjustment policies to the PPs ($f_1, f_2, \dots, f_{12}$) and to the ESUs ($s_1, s_2, s_3$) for selected hours of the day for both network configurations. First, observe that non-zero adjustment policies are only allocated to flexibility providers that are also dispatched for the commodity energy, which is consistent with the requirement that both over- and under-supply imbalances during the real-time operation are mitigated by the flexibility delivered. Second, the network configuration with bottlenecks mandates the allocation of adjustment policies to more number of flexible power producers, as network congestion is expected to impact the flexibility

<footnote n="5">⁵In addition to the assumption that distributional knowledge is available to the system operator (or can be estimated from historical data), the modeling of chance constraints adopted in this paper is agnostic to the degree of constraint violations. Future modeling extensions can be made to provide bounds on the cost of expected constraint violations, e.g., adopting the approach by Chen et al. (2010) which remains within the SOCP framework. Finally, beyond the fully stochastic optimization frameworks, quasi-stochastic market-clearing approaches such as Mays (2021), have recently been proposed to alleviate the adverse impacts of decisions made under uncertainty in day-ahead electricity markets. Although formulated as LP (or MILP) problems, such approaches attempt to approximate the fully stochastic market equilibrium relying on parameters exogenous to the market, e.g., administrative choices made by system operators, outcomes from stochastic reliability problems solved ahead of the day-ahead market, etc.</footnote>
<figure><img src="image_3.png" /><figcaption>Figure 2: (a) 24-node electricity network showing a visualization of spatial prices of energy for the network configuration with bottlenecks, (b) expected net demand for the 50% RES paradigm, (c) system-wide prices for energy and (d) the total hourly flexibility payments for various RES paradigms</figcaption></figure>

delivery during real-time operation. However, note that ESUs are not allocated adjustment policies in this configuration. This is explained by (i) the availability of flexible PPs in favorable locations of the network with respect to congested power lines, and (ii) the inter-temporal constraints and end-of-day energy balance requirement for ESUs (see Supplementary Material). Indeed, for the paradigm with 60% RES (not shown in the Figure), ESUs in the case with network bottlenecks are allocated non-zero adjustment policies to contribute towards flexibility provision, with the market-clearing problem choosing a more expensive flexibility allocation, offset by the reduced cost of energy provision. Finally, observe in Figure 3(b) that the adjustment policies may take negative values, implying that the action (increasing/decreasing) production by power producers may be in opposition to the system requirement (under-/over-supply), provided it leads to cost-optimal flexibility provision under congested network conditions.

Figures 3(g)-3(h) show the flexibility payments made to flexibility providers under the two network configurations. Flexibility payments are, in general, higher for the case with network bottlenecks as compared to the case without any bottlenecks. Moreover, as previously-discussed in reference to Figure 2(d), flexibility payments are higher for hours with high production from wind farms. In the short run, this incentivizes market participants to bid their flexibility in these hours. To further analyze how flexibility is valued and paid for by the market operator, we introduce an ex-post parameter called flexibility payment rate (FPR). Defined for each flexibility provider i, FPR is the rate in $/MWh at which it is paid for the flexibility service:

$$FPR_{it} = \frac{[\Pi_{p}^{*}]_{(n_{i},t)} \times \alpha_{it}^{*}}{|\hat{q}_{it} - \bar{q}_{it}|}, \quad (11)$$
<figure><img src="image_4.png" /><figcaption>Figure 3: Market-clearing outcomes in hours 4-12: (a)-(b) show the adjustment policies, (c)-(f) show the nominal dispatch of power producers (PPs) and energy storage units (ESUs) for both the network configurations, and (g)-(h) show the flexibility payments and (i)-(j) show the flexibility payment rates (FPRs)</figcaption></figure>
<figure><img src="image_5.png" /><figcaption>Figure 4: Illustration of the SOCP market-clearing and the LP-based reference problems</figcaption></figure>

where $[\Pi_p^*]_{(n_i,t)}$ retrieves the price of the commodity flexibility service at the node $n_i$ where the participant $i$ is located, $\hat{q}_{it}^*$ and $\alpha_{it}^*$ denote the nominal dispatch and adjustment policy allocated to the participant $i$, respectively. The quantity $\bar{q}_{it}$ is the dispatch under the perfect forecast case, i.e., when the day-ahead market-clearing is deterministic. We obtain $\bar{q}_{it}$ by solving the market-clearing problem $\mathcal{M}^{cc}$ assuming day-ahead forecasts are realized perfectly during the real-time operation, such that all adjustment policies are set to zero, i.e., $\alpha_{it} = 0, \forall t, \forall i \in \mathcal{I}$. Figures 3(i) - 3(j) show the FPRs for the various participants for the two network configurations. Observe that, equal segments within each bar indicate equal FPRs for all flexibility providers for a given hour. First, we note that, in general, more flexibility providers being allocated non-zero adjustment policies in the network configuration with bottlenecks leads to lower FPRs for the flexibility providers contrary to the one without bottlenecks. A notable exception is hour 7 in the case without bottlenecks, wherein ESUs are paid for the flexibility at very high rate. This is a consequence of two contributing factors: (i) ESUs are dispatched with small nominal quantities in the hours 7 and 8 (see Figure 3(e)) which implies that their ability to provide both charging and discharging flexibility is valued highly, and (ii) the net demand follows a steep rise in the hours 6-8 (see Figure 2(b)) and as a result the market-clearing problem faces a scarcity of not only flexible capacity, but also the ramping ability needed to meet this change in uncertainty. In contrast, in hour 8, while the ESUs are still nominally dispatched close to zero, the flexibility is no longer scarce in the system as the net demand rises sufficiently enough to lead to the nominal dispatch of power producer $f1$, thereby homogenizing the FPRs again. Overall, the FPR for a flexibility provider depends on a number of factors, including the level of uncertainty perceived by the system (quantified by the forecast error covariance matrix as well as the day-ahead forecasts), the location of the flexibility provider, congestion in the network and whether other flexibility providers are available.

## 4.2. Comparison with LP-based Uncertainty-aware Benchmarks

Next, using numerical simulations corresponding to realizations of the uncertain wind power production, we compare the market-clearing outcomes and performance of the proposed SOCP-based uncertainty-aware market-clearing problem $\mathcal{M}^{cc}$ to alternatives within the LP-domain.

We consider two LP-based market-clearing problems as benchmarks: $\mathcal{R}1$ and $\mathcal{R}2$. While it is most closely related to the currently-operational electricity markets, the deterministic market-clearing problem $\mathcal{R}1$ considers uncertainty during the day-ahead clearing stage by commissioning flexibility in the form of reserve capacity. The procured capacity is subsequently activated in real-time electricity markets, cleared closer to physical delivery. To ensure a cost-optimal allocation of the reserve capacity, the market operator enforces a *exogenously-determined* minimum reserve requirement to procure flexible capacity from flexibility providers. Market-clearing problem $\mathcal{R}2$ considers uncertainty based on day-ahead scenarios for realizations of uncertain renewable energy production. The market operator seeks to maximize the expected social welfare under uncertainty, resulting in a day-ahead schedule which is then adjusted during real-time operation for each of
<figure><img src="image_6.png" /><figcaption>Figure 5: In-sample market-clearing cost in the various RES paradigms considered</figcaption></figure>

the foreseen scenarios. Similarly to $\mathcal{M}^{cc}$, this approach considers uncertainty endogenously as parameterized by the scenarios considered while solving the market-clearing problem. However, leaving aside the fundamental question of trusting the scenario-generating agent, this approach mandates a large number of scenarios to appropriately represent the uncertainty, thereby, limiting its practical adoption from a computational perspective. Figure 4 illustrates the market-clearing activities, starting with pre-market processing of forecast error samples to generate statistical moments (mean and covariance), to dimension the reserve requirement and to generate scenarios, for $\mathcal{M}^{cc}$, $R1$ and $R2$, respectively. In our numerical studies, we impose a minimum reserve requirement such that the probability of demand curtailment, due to unavailability of flexible capacity to be dispatched during the real-time operation, is less than 5% for the forecast error samples considered. Moreover, observe that the real-time operation in $\mathcal{M}^{cc}$ does not involve pricing and can be done without re-optimization provided uncertainty bounds defined by statistical moments are reliable, whereas both $R1$ and $R2$ involve real-time markets, whose outcomes are used to price flexibility services. As with $\mathcal{M}^{cc}$, the market-clearing formulations and further details on the two reference problems $R1$ and $R2$ are provided in the Supplementary Material.

*In-sample market-clearing results:* First, we study the in-sample performance of the market-clearing problems. In-sample refers to the forecast samples used in the pre-market stage to obtain the parameters and scenarios for the market-clearing problems $\mathcal{M}^{cc}$ and the benchmarks $R1$ and $R2$, see Figure 4. For the 6 wind farms in the network, we consider 100 forecast error samples drawn from a multivariate Gaussian distribution having zero mean and a standard deviation of 10% of the nominal day-ahead forecast values. Consequently, the safety parameter $r_{\varepsilon}$ is the inverse cumulative distribution function of the standard Gaussian distribution evaluated at $(1 - \varepsilon)$-quantile. For $\mathcal{M}^{cc}$, we fix the system operator's constraint violation probability at $\varepsilon = 0.05$. Figure 5 shows a comparison of the expected day-ahead market-clearing cost for the three market-clearing problems under the two network configurations in the various RES paradigms. Observe that, with increasing share of renewable energy, due to its exogenous consideration of uncertainty, market-clearing problem $R1$ performs increasingly worse compared to the other problems for both the network configurations, leading to infeasibility of market-clearing problem at 60% renewable energy share for the case with network bottlenecks. Furthermore, market-clearing problems $\mathcal{M}^{cc}$ and $R2$ result in comparable in-sample expected cost. However, it is worth noting that, contrary to $\mathcal{M}^{cc}$, $R2$ does not provide any guarantees on the feasibility of market-clearing problem when faced with scenarios beyond those considered as in-sample$^6$. We discuss the out-of-sample performance further in the

<footnote>$^6$Depending on the constraint violation probability $\varepsilon$ and the number of decision variables, (Alamo et al., 2015, Theorem 4) provides an analytical expression for the number of scenarios that must be considered while solving $\mathcal{R}2$ to obtain the same probabilistic feasibility guarantee as $\mathcal{M}^{cc}$. For the network considered in this numerical study, this evaluates to > 80,000 scenarios, thereby rendering problem $\mathcal{R}2$ unable to provide such a guarantee while being cleared within the desired day-ahead market-clearing solve times (typically, about 1-2 hours).</footnote>
<table><caption>Table 1: In-sample and out-of-sample performance of market-clearing problems for the 50% RES paradigm</caption><thead><tr><th rowspan="2">Parameter</th><th rowspan="2">Unit</th><th colspan="3">No network bottlenecks</th><th colspan="3">With network bottlenecks</th></tr><tr><th>M<sup>cc</sup></th><th>R1</th><th>R2</th><th>M<sup>cc</sup></th><th>R1</th><th>R2</th></tr></thead><tbody><tr><td>In-sample expected cost</td><td>$1000</td><td>221.85</td><td>257.85</td><td>216.49</td><td>256.62</td><td>377.56</td><td>235.16</td></tr><tr><td>Market-clearing computation time</td><td>s</td><td>2.08</td><td>0.22</td><td>178.23</td><td>2.38</td><td>0.27</td><td>215.5</td></tr><tr><td>Out-of-sample expected cost</td><td>$1000</td><td>221.76</td><td>259.57</td><td>224.29</td><td>256.51</td><td>396.86</td><td>244.28</td></tr><tr><td>Out-of-sample infeasibility</td><td>%</td><td>0.2</td><td>3.2</td><td>0</td><td>0.2</td><td>0.6</td><td>8.8</td></tr><tr><td>Load shedding probability</td><td>%</td><td>0</td><td>0</td><td>0</td><td>0</td><td>1.0</td><td>0.4</td></tr><tr><td>Wind curtailment probability</td><td>%</td><td>0</td><td>0</td><td>46.0</td><td>0</td><td>0</td><td>50.8</td></tr></tbody></table>

<figure><img src="image_7.png" /><figcaption>Figure 6: Out-of-sample market-clearing cost comparison in the 50% RES paradigm</figcaption></figure>

following. The first two rows in Table 1 provide a comparison for the cost and computation times of the various market-clearing problems in the 50% RES paradigm.

*Out-of-sample performance:* To examine the out-of-sample performance, we perform a deterministic real-time market clearing such that the day-ahead decisions made for each of the market-clearing problems are fixed while adjustments are made in real-time to meet the uncertainty realization. For the market-clearing problem $M^{cc}$, this implies that the flexible market participants adjust their production in real-time strictly in accordance to the adjustment policies assigned at the day-ahead market-clearing stage. On the other hand, for the LP-based reference market-clearing problems $R1$ and $R2$, the adjustments in real-time are allowed up to the flexible capacity limits obtained at the day-ahead stage. Consistent with the prevalent practice on handling real-time adjustments in electricity markets, we introduce a 10% premium over the bid prices in the day-ahead market-clearing stage to incentivize the market participants to adjust their schedule during real-time operation. Since some wind forecast scenarios may lead to infeasibility of the market-clearing problem due to unavailability of flexibility during the real-time operation, we introduce contingency actions in the market-clearing that correspond to load shedding and wind curtailment respectively. Variables corresponding to these contingency actions are penalized in the market-clearing objective such that they are the last resort in ensuring supply-demand balance.

We prepare a test dataset comprised of 500 wind forecast scenarios, distinct from those used for in-sample simulations, drawn from the same multivariate Gaussian distribution. The box and whiskers plots in Figure 6 show the distribution of the resulting out-of-sample cost for the market-clearing problems under the 50% RES paradigm. For each box, the central line indicates the median, whereas the ends denote the 25th and 75th percentiles. The whiskers extend upto 1.5 times the inter-quartile range, while remaining values are shown as outliers in the form of rings. The second part of Table 1 provides the results from the out-of-sample simulations. First, referring to Figure 6, observe that the ordering in terms of expected cost is preserved from the in-sample simulations, i.e., $R1$ leads to higher costs. We note that market-clearing problem $R2$ results in highly variable out-of-sample costs compared to the SOCP market-clearing problem $M^{cc}$. Second, the out-of-sample expected cost for $M^{cc}$ is close to the in-sample case, mentioned in Table 1. On
<figure><img src="image_8.png" /><figcaption>Figure 7: Day-ahead market-clearing outcome for various problems: (a) hourly system-level energy price, (b) hourly flexibility payment, (c) dispatch of power producers (PPs) and (d) dispatch of energy storage units (ESUs)</figcaption></figure>

the other hand, market-clearing problem $R1$ exhibits an increase in cost of 0.75% and 5.34% over their in-sample values for the network configurations with and without bottlenecks, respectively. Similarly, problem $R2$ results in out-of-sample expected cost which exceeds that in-sample expected cost by 3.54% and 4.1%, respectively for the network configurations with and without bottlenecks. Finally, both the LP-based market-clearing problems endure load shedding or wind curtailment when faced with unknown forecast samples. These results highlight how the proposed SOCP-based uncertainty-aware market-clearing problem outperforms the prevalent LP-based alternatives. Next, we provide comparative insights on the day-ahead market-clearing outcomes for the three problems.

*Day ahead-market-clearing outcomes:* For the 50% RES paradigm, Figure 7 compares the day-ahead market-clearing outcomes among the three problems for the network configuration without any bottlenecks. Observe that, as expected, the energy price in Figure 7(a) closely follows the swings in net demand, shown in Figure 2(b). Figure 7(b) compares the flexibility payment at the day-ahead market-clearing stage for the problems $M^{cc}$ and $R1$. In contrast to $M^{cc}$ wherein flexibility payments are a result of the dual solution to the market-clearing problem, flexibility payments in $R1$ correspond to the primal solution, i.e., the payments made towards the reserve capacity to meet the minimum reserve requirement. The difference in hourly flexibility payments illustrate the challenge in dimensioning the capacity-based reserves properly. Note that, in absence of any specific capacity reservation or a meaningful flexibility balance at the day-ahead clearing stage, $R2$ mandates the real-time markets for pricing of flexibility services and is therefore omitted from the comparison$^7$. Figures 7(c) and 7(d) show the scheduled dispatch of PPs and ESUs, respectively, for a selection of hours of the day. On account of the minimum reserve requirement associated with market-clearing problem $R1$, in contrast with the other two problems which consider uncertainty endogenously, the dispatch involves higher generation in hours 7 through 12. The excess generation, which partly explains the higher market-clearing cost associated with $R1$, is used to charge

<footnote>$^7$A real-time balance is indeed enforced in $R2$, such that real-time adjustments in each scenario is aligned with the supply-demand balance. However, the price convergence between day-ahead energy prices and real-time prices is a desired property to maximize welfare, as discussed in Zavala et al. (2017). This price convergence is in fact a characteristic of our implementation $R2$, but it limits the ability to explicitly extract values corresponding to flexibility payment either from the primal or dual solutions to the market-clearing problem.</footnote>
the ESUs in the network such that sufficient flexible capacity is available to meet the minimum
reserve requirement. This effect further underscores the importance of endogenous consideration
of uncertainty within the market-clearing framework.

5. Concluding Remarks

We proposed and analyzed a new conic formulation for forward markets, which we applied to the specific case of electricity markets. Our contribution is threefold. From a market design perspective, we revisited the spatial price equilibrium problem beyond the LP framework by formulating the market-clearing problem within an SOCP framework. From a theoretical perspective, we relied on Lagrangian duality theory for SOCP problems to characterize the solution to the spatial price equilibrium problem involving rational and self-interested market participants in terms of optimality and robustness to parameter perturbation. We derived analytical expressions for conic spatial prices of the traded commodities and provided analytical proofs to demonstrate that moving towards conic markets for electricity does not incur the loss of any desired economic properties, i.e., the proposed conic market retains market efficiency, cost recovery and revenue adequacy, under common assumptions also applicable to LP-based markets. Finally, from a practitioner's perspective, we illustrated the generality of our proposed market-clearing framework by defining a bid format for conic markets.

Our conic market proposal admits SOC-representable nonlinearities underlying the costs and constraints of market participants and the system operator to enable an uncertainty-, asset- and network-aware market-clearing problem. This step in the evolution of electricity markets is crucial for the successful transition of electricity systems worldwide from dispatchable, fossil fuel-based system towards a weather-dependent, renewable energy-based system, supported by a heterogeneous mix of energy and flexibility providers. Our numerical studies leverage in-sample and out-of-sample simulations to showcase the benefits of the proposed SOCP-based market-clearing problem over the LP-based benchmarks in terms of social welfare and its invariance, endogenous representation of uncertainty, appropriate dimensioning of flexibility need, and guarantees on the feasibility of the market-clearing problem. We provide insights into payments associated with the flexibility procurement based on adjustment policies, which are central to our uncertainty-aware SOCP-based market-clearing proposal.

This paper opens up a variety of important directions for future work. First, considering
the generality of the proposal, it is potentially interesting to model market-clearing use cases
that involve one or more of the attributes related to uncertainty-, asset- and network-awareness.
For instance, the modeling examples and the theoretical results developed in this work can be
used to study the coordination between the transmission and distribution system operators in an
uncertainty- and network-aware setting. This enables the flexibility available at the distribution
level to be appropriately harnessed and priced within the market framework while considering a
physically-accurate network constraint representation. Along similar lines is the use case studying
the market-based coupling of the electricity and natural gas sectors. Here, the focus of the analysis
potentially broadens from merely an optimal network- and asset-aware flexibility procurement to
one that designs well-aligned incentives and risk measures to ensure a reliable and resilient system
operation in both the interdependent sectors. Second, the conic market bids introduced in §2.4
merit further evaluation in terms of acceptance by market participants, alignment with market
regulatory agencies as well as adaptations needed in the prevalent market-clearing algorithms to
adopt them. Intended to accelerate their practical adoption, such evaluations could take shape
as market simulations and participant-specific sensitivity studies to systematically quantify the
costs and benefits of moving towards conic electricity markets. Third, the theoretical results
discussed in the paper can be extended to include market participants that act strategically. One
can then leverage conic complementarity programs to investigate how exercising market power
influences the market-clearing outcomes, specifically in the context of the flexibility payments involved in uncertainty-aware use case analyzed in §4, and more generally regarding the satisfaction of desired economic properties. Further, beyond the operational economic properties analyzed in this work, it is of interest to evaluate the satisfaction of long-run equilibrium properties, such as long-run cost recovery of participants. Another important direction to pursue is the extension of the analytical results we derived on the Lorentz cone to the cone of semidefinite matrices, which results in an SDP-based market-clearing framework. Further generalization over the LP framework aside, such an extension could potentially give rise to markets that consider uncertainty under the paradigm of distributionally-robust chance-constrained optimization and that admit an SDP-based convexification approach for non-convex power flows in the electricity network. Finally, beyond the electricity system, the theoretical results in this work are of potential interest in competitive settings involving physical or non-physical systems wherein cost- and constraint-based nonlinearities currently mandate the use of approximation techniques via linearization.

# Appendix A. Lagrangian Duality for SOCP Problems

In Appendix A.1, we provide a concise theoretical background of SOCP duality, while directing interested readers to Lobo et al. (1998), Ben-Tal and Nemirovski (2001) and Alizadeh and Goldfarb (2003) for details. The dual problem to market-clearing problem $\mathcal{M}^c$ is provided in Appendix A.2.

## Appendix A.1. Preliminaries

Consider an arbitrary SOCP problem in variable $\mathbf{x} \in \mathbb{R}^N$ of the form

$$ \min_{\mathbf{x}} \mathbf{c}^{\top} \mathbf{x} \quad \text{s.t.} \quad \|\mathbf{A}_j \mathbf{x} + \mathbf{b}_j\| \le \mathbf{d}_j^{\top} \mathbf{x} + e_j, \quad \forall j = 1, 2, \dots, J, \qquad (A.1) $$

with parameters $\mathbf{c} \in \mathbb{R}^N$, $\mathbf{A}_j \in \mathbb{R}^{k_j \times N}$, $\mathbf{b}_j \in \mathbb{R}^{k_j}$, $\mathbf{d}_j \in \mathbb{R}^N$ and $e_j \in \mathbb{R}$. Based on (1), the SOC constraint in problem (A.1) may be expressed as

$$ \left[ \begin{matrix} \mathbf{A}_j \\ \mathbf{d}_j^{\top} \end{matrix} \right] \mathbf{x} + \left[ \begin{matrix} \mathbf{b}_j \\ e_j \end{matrix} \right] \in \mathcal{C}_j \Leftrightarrow - \left[ \begin{matrix} \mathbf{A}_j \mathbf{x} + \mathbf{b}_j \\ \mathbf{d}_j^{\top} \mathbf{x} + e_j \end{matrix} \right] \le \mathcal{C}_j 0, $$

where $\mathcal{C}_j \subseteq \mathbb{R}^{k_j+1}$ is the standard second-order cone and generalized inequality $\le \mathcal{C}_j$ denotes a partial ordering over the cone $\mathcal{C}_j$. The Lagrangian function for (A.1) writes as

$$ \Theta(\mathbf{x}, \boldsymbol{\lambda}_1, \dots, \boldsymbol{\lambda}_J) = \mathbf{c}^{\top} \mathbf{x} - \sum_{j=1}^{J} \boldsymbol{\lambda}_j^{\top} \left( \left[ \begin{matrix} \mathbf{A}_j \\ \mathbf{d}_j^{\top} \end{matrix} \right] \mathbf{x} + \left[ \begin{matrix} \mathbf{b}_j \\ e_j \end{matrix} \right] \right), $$

where $\boldsymbol{\lambda}_j \in \mathbb{R}^{k_j+1}$ for $j = 1, 2, \dots, J$ are Lagrange multipliers. The dual function is given by

$$ g(\boldsymbol{\lambda}_1, \dots, \boldsymbol{\lambda}_J) = \begin{cases} - \sum_{j=1}^{J} \boldsymbol{\lambda}_j^{\top} \left[ \begin{matrix} \mathbf{b}_j \\ e_j \end{matrix} \right], & \mathbf{c} = \sum_{j=1}^{J} \left[ \begin{matrix} \mathbf{A}_j \\ \mathbf{d}_j^{\top} \end{matrix} \right]^{\top} \boldsymbol{\lambda}_j, \\ -\infty, & \text{otherwise.} \end{cases} $$

Lastly, the dual problem to (A.1) after substituting $\boldsymbol{\lambda}_j = [\boldsymbol{\mu}_j^\top \ \nu_j]^\top$, such that $\boldsymbol{\mu}_j \in \mathbb{R}^{k_j}$ and $\nu_j \in \mathbb{R}_+$ are auxiliary dual variables, can be written as

$$ \max_{\boldsymbol{\mu}_j, \nu_j} - \sum_{j=1}^{J} (\mathbf{b}_j^{\top} \boldsymbol{\mu}_j + e_j \nu_j) \qquad (A.2a) $$

$$ \text{s.t.} \quad \sum_{j=1}^{J} (\mathbf{A}_j^{\top} \boldsymbol{\mu}_j + \mathbf{d}_j \nu_j) = \mathbf{c} \qquad (A.2b) $$

$$ \|\boldsymbol{\mu}_j\| \le \nu_j, \quad \forall j = 1, 2, \dots, J. \qquad (A.2c) $$
Similarly, we write an arbitrary SOCP problem with rotated SOC constraints as

$$ \min_{\mathbf{x}} \mathbf{c}^{\top} \mathbf{x} \quad \text{s.t.} \quad \|\mathbf{A}_j \mathbf{x} + \mathbf{b}_j\|^2 \leq \mathbf{d}_j^{\top} \mathbf{x} + e_j, \quad \forall j = 1, 2, \dots, J. \qquad (A.3) $$

From the definition of a rotated second-order cone (Mosek ApS, 2021), we have the equivalence

$$ \|\mathbf{A}_j \mathbf{x} + \mathbf{b}_j\|^2 \leq \mathbf{d}_j^{\top} \mathbf{x} + e_j \Leftrightarrow -\begin{bmatrix} \mathbf{A}_j \mathbf{x} + \mathbf{b}_j \\ \mathbf{d}_j^{\top} \mathbf{x} + e_j \end{bmatrix} \leq c_j^{\mathrm{R}} 0, $$

where $C_j^{\mathrm{R}} \subseteq \mathbb{R}^{k_j+2}$ denotes the rotated second-order cone. As before, defining Lagrange multipliers $\lambda_j = [\boldsymbol{\mu}_j^\top \quad \nu_j \quad \kappa_j]^\top \in \mathbb{R}^{k_j+2}$ for $j = 1, 2, \dots, J$, such that $\boldsymbol{\mu}_j \in \mathbb{R}^{k_j}$, $\nu_j \in \mathbb{R}_+$ and $\kappa_j \in \mathbb{R}_+$, the Lagrangian function for the problem (A.3) can be written as

$$ \Theta(\mathbf{x}, \boldsymbol{\mu}_1, \dots, \boldsymbol{\mu}_J, \nu_1, \dots, \nu_J, \kappa_1, \dots, \kappa_J) = \mathbf{c}^{\top} \mathbf{x} - \sum_{j=1}^{J} (\boldsymbol{\mu}_j^{\top} \mathbf{A}_j \mathbf{x} + \boldsymbol{\mu}_j^{\top} \mathbf{b}_j + \frac{1}{2} \kappa_j + \nu_j \mathbf{d}_j^{\top} \mathbf{x} + \nu_j e_j), $$

from which the dual problem is derived as

$$ \max_{\boldsymbol{\mu}_j, \nu_j, \kappa_j} - \sum_{j=1}^{J} (\mathbf{b}_j^{\top} \boldsymbol{\mu}_j + e_j \nu_j + \frac{1}{2} \kappa_j) \qquad (A.4a) $$

$$ \text{s.t.} \quad \sum_{j=1}^{J} (\mathbf{A}_j^{\top} \boldsymbol{\mu}_j + \mathbf{d}_j \nu_j) = \mathbf{c} \qquad (A.4b) $$

$$ \|\boldsymbol{\mu}_j\|^2 \leq \kappa_j \nu_j, \quad \forall j = 1, 2, \dots, J. \qquad (A.4c) $$

## Appendix A.2. Dual Problem to Problem $\mathcal{M}^c$

Let $\mathcal{D}^c$ denote the dual problem to the market-clearing problem $\mathcal{M}^c$. We now derive $\mathcal{D}^c$ relying on the dualization approach in Appendix A.1. Let $\Theta(\boldsymbol{q}_i, \boldsymbol{z}_i, \boldsymbol{\mu}_{it}^Q, \kappa_{it}^Q, \nu_{it}^Q, \boldsymbol{\mu}_{ij}, \nu_{ij}, \boldsymbol{\gamma}_i, \boldsymbol{\lambda}_p, \underline{\boldsymbol{\rho}}_t, \bar{\boldsymbol{\rho}}_t)$ denote the Lagrangian function of $\mathcal{M}^c$ given by

$$ \Theta = \sum_{i \in \mathcal{I}} \sum_{t \in \mathcal{T}} (z_{it} + \mathbf{c}_{it}^{\mathrm{T}} \boldsymbol{q}_{it}) - \sum_{i \in \mathcal{I}} \sum_{t \in \mathcal{T}} \left( \boldsymbol{\mu}_{it}^{\mathrm{Q}}^{\mathrm{T}} \mathbf{C}_{it}^{\mathrm{Q}} \boldsymbol{q}_{it} + \frac{1}{2} \kappa_{it}^{\mathrm{Q}} + \nu_{it}^{\mathrm{Q}} z_{it} \right) \\ - \sum_{i \in \mathcal{I}} \sum_{j \in \mathcal{J}_i} \left( \boldsymbol{\mu}_{ij}^{\mathrm{T}} (\mathbf{A}_{ij} \boldsymbol{q}_i + \mathbf{b}_{ij}) + \nu_{ij} (\mathbf{d}_{ij}^{\mathrm{T}} \boldsymbol{q}_i + e_{ij}) \right) + \boldsymbol{\gamma}^{\mathrm{T}} (\mathbf{F}_i \boldsymbol{q}_i - \mathbf{h}_i) - \sum_{p \in \mathcal{P}} \boldsymbol{\lambda}_p^{\mathrm{T}} \sum_{i \in \mathcal{I}} \mathbf{G}_{ip} \boldsymbol{q}_{ip} \\ + \sum_{t \in \mathcal{T}} \left( \bar{\boldsymbol{\rho}}_t^{\mathrm{T}} \left( \sum_{n \in \mathcal{N}} [\boldsymbol{\Psi}]_{(:,n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \boldsymbol{q}_{ip}]_t \right) - \bar{s} \right) - \underline{\boldsymbol{\rho}}_t^{\mathrm{T}} \left( \sum_{n \in \mathcal{N}} [\boldsymbol{\Psi}]_{(:,n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \boldsymbol{q}_{ip}]_t \right) + \bar{s} \right) \right). $$

For notational convenience, let cost vectors for various hours be stacked to obtain $\mathbf{c}_i^L \in \mathbb{R}^{K_i T}$ and a block diagonal matrix $\mathbf{C}_i^Q = \mathbf{C}_{i1}^Q \oplus \dots \oplus \mathbf{C}_{iT}^Q \in \mathbb{R}^{K_i T \times K_i T}$. Let $\boldsymbol{\mu}_i^Q \in \mathbb{R}^{K_i T}$ and $\boldsymbol{\nu}_i^Q \in \mathbb{R}^T$ denote the stacked dual variables $\boldsymbol{\mu}_i^Q$ and $\boldsymbol{\nu}_i^Q$, respectively. Let $\hat{\boldsymbol{\lambda}}_i \in \mathbb{R}^{K_i T}$ denote the stacked version of an auxiliary dual variable $\hat{\boldsymbol{\lambda}}_{it} \in \mathbb{R}^{K_i}$ for each market participant $i$ with its $k$-th element given by

$$ \hat{\boldsymbol{\lambda}}_{itk} = \begin{cases} [\mathbf{G}_{ip} \boldsymbol{\lambda}_p]_t, & \text{if } k = p, \\ 0, & \text{otherwise.} \end{cases} \qquad (A.5) $$

This auxiliary dual variable represents the contribution of each market participant towards the trades of the $P$ commodities in the market. Finally, we define an auxiliary variable representing the $i$-th participant's contribution towards network congestion, denoted as $\hat{\boldsymbol{\rho}}_it \in \mathbb{R}^{K_i}$, given by

$$ \hat{\boldsymbol{\rho}}_{itk} = \begin{cases} \mathbb{1}^{\mathrm{T}} [\mathbf{G}_{ip}]_{(:,t)} \mathbb{1}_{n_i} \boldsymbol{\Psi}^{\mathrm{T}} (\underline{\boldsymbol{\rho}}_t - \underline{\boldsymbol{\rho}}_t), & \text{if } k = p, \\ 0, & \text{otherwise,} \end{cases} \qquad (A.6) $$
where $1 \in \mathbb{R}^T$ and $\mathbb{1}_{n_i} \in \mathbb{R}^N$ is an indicator vector having the element corresponding to the node $n_i \in \mathbb{N}$ where participant $i$ is located as 1, while all other elements are zero. The variables $\hat{\boldsymbol{\varrho}}_{it}$ are then stacked to obtain $\hat{\boldsymbol{\varrho}}_i \in \mathbb{R}^{K_i T}$. With these substitutions, we write the dual problem $\mathcal{D}^c$ as

$$ \max_{\Xi} - \sum_{i \in \mathcal{I}} \sum_{j \in \mathcal{J}_i} (\mathbf{b}_{ij}^{\top} \boldsymbol{\mu}_{ij} + e_{ij} \nu_{ij}) - \sum_{i \in \mathcal{I}} \sum_{t \in \mathcal{T}} \frac{1}{2} \kappa_{it}^{\mathrm{Q}} - \sum_{t \in \mathcal{T}} \bar{\mathbf{s}}^{\top} (\underline{\boldsymbol{\varrho}}_t + \bar{\boldsymbol{\varrho}}_t) \quad (\text{A.7a}) $$

$$ \text{s.t.} \quad 1 - \boldsymbol{\nu}_i^Q = 0, \forall i \qquad (\text{A.7b}) $$

$$ \mathbf{c}_i^L - \mathbf{C}_i^Q \boldsymbol{\mu}_i^Q - \sum_{j \in \mathcal{J}_i} (\mathbf{A}_{ij}^\top \boldsymbol{\mu}_{ij} + \mathbf{d}_{ij} \nu_{ij}) + \mathbf{F}_i^\top \boldsymbol{\gamma}_i - \hat{\boldsymbol{\lambda}}_i + \hat{\boldsymbol{\varrho}}_i = \mathbf{0}, \forall i \qquad (\text{A.7c}) $$

$$ \|\boldsymbol{\mu}_{it}^Q\|^2 \leq \kappa_{it}^Q \nu_{it}^Q, \forall t, \forall i \qquad (\text{A.7d}) $$

$$ \|\boldsymbol{\mu}_{ij}\| \leq \nu_{ij}, \forall j \in \mathcal{J}_i, \forall i. \qquad (\text{A.7e}) $$

$$ (\text{A.5}) - (\text{A.6}), \forall k = 1, 2, \dots, K_i, \forall t, \forall i, \qquad (\text{A.7f}) $$

which is an SOCP problem in variables $\Xi = \{\boldsymbol{\mu}_i^Q, \kappa_{it}^Q, \boldsymbol{\nu}_i^Q, \boldsymbol{\mu}_{ij}, \nu_{ij}, \boldsymbol{\gamma}_i, \boldsymbol{\lambda}_p, \hat{\boldsymbol{\lambda}}_i, \underline{\boldsymbol{\varrho}}_t, \bar{\boldsymbol{\varrho}}_t, \hat{\boldsymbol{\varrho}}_i\}$.

# Appendix B. Proofs

## Proof of Theorem 1

First, we prove the existence of essentially strictly feasible solutions to the market-clearing problem $\mathcal{M}^c$ and its dual $\mathcal{D}^c$, inspired by the theory in Lobo et al. (1998). From Definition 4, finding strictly feasible solutions to the primal market-clearing problem $\mathcal{M}^c$ reduces to finding tuples $(\mathbf{q}_i, \mathbf{z}_i)$, $\forall i$, which strictly satisfy the SOC constraints (5b)-(5c). Likewise, proving strict dual feasibility reduces to finding tuples $(\boldsymbol{\mu}_{it}^Q, \kappa_{it}^Q, \nu_{it}^Q)$, $\forall t, \forall i$ and $(\boldsymbol{\mu}_{ij}, \nu_{ij})$, $\forall j \in \mathcal{J}_i, \forall i$ that strictly satisfy the SOC constraints (A.7d)-(A.7e), respectively. Relying on a variant of the big-M method widely applied to LP problems (Fortuny-Amat and McCarl, 1981), we require the following auxiliary result to find strictly feasible solutions to $\mathcal{D}^c$.

**Lemma 1.** Given the feasibility of the market-clearing problem $\mathcal{M}^c$, for each market participant $i \in \mathcal{I}$, there exists a large enough finite scalar bound $\bar{D}_i^Q \in \mathbb{R}$ on the Euclidean norm of $\mathbf{q}_i$ given by $\|\mathbf{q}_i\| \leq \bar{D}_i^Q$, such that the optimal solution to $\mathcal{M}^c$, denoted by $(\mathbf{q}_i^*, \mathbf{z}_i^*)$, is unchanged with addition of the norm bounds.

*Proof.* For each participant $i \in \mathcal{I}$, the $K_i$ number of decision variables at each hour $t$ constituting $\mathbf{q}_{it}$ are either the commodity contributions $[\mathbf{q}_{ip}]_t$ for the $p \in \mathcal{P}$ physical commodities discussed in §2.1 or any physical state variables pertaining to the participants. Hence, $\mathbf{q}_{it}$, $\forall t$ are finite and both bounded above and below. Observe that, a bounded $\mathbf{q}_{it}$ results in a bounded $z_{it}$ due to (5b). Given feasible points $\mathbf{q}_i$, $\forall i$, one could arbitrarily choose scalars $\bar{D}_i^Q$ such that $\bar{D}_i^Q \geq \|\mathbf{q}_i\|$, $\forall i$ and iteratively solve $\mathcal{M}^c$ for values of $\bar{D}_i^Q$ large enough such that the optimal solution $(\mathbf{q}_i^*, \mathbf{z}_i^*)$, $\forall i$ no longer changes over the subsequent iterations. Such an iterative scheme would result in the norm bounds $\bar{D}_i^Q, \forall i$, thereby completing the proof. $\square$

Due to Definition 4 and Lemma 1, we write a reduced form of market-clearing problem $\mathcal{M}^c$
while retaining only the SOC constraints with additional norm bound constraints

$$ \min_{\mathbf{q}_i, \mathbf{z}_i} \sum_{i \in \mathcal{I}} \sum_{t \in \mathcal{T}} (z_{it} + \mathbf{c}_{it}^{\top} \mathbf{q}_{it}) \qquad (B.1a) $$

$$ \text{s.t.} \quad \|\mathbf{C}_{it}^{\mathrm{Q}} \mathbf{q}_{it}\|^2 \le z_{it}, \forall t, \forall i \qquad (\mu_{it}^{\mathrm{Q}}, \kappa_{it}^{\mathrm{Q}}, \nu_{it}^{\mathrm{Q}}) \qquad (B.1b) $$

$$ \|\mathbf{A}_{ij}\mathbf{q}_i + \mathbf{b}_{ij}\| \le \mathbf{d}_{ij}^{\top}\mathbf{q}_i + e_{ij}, \forall j \in \mathcal{J}_i, \forall i \qquad (\mu_{ij}, \nu_{ij}) \qquad (B.1c) $$

$$ \|\mathbf{q}_i\| \le \bar{D}_i^Q, \forall i, \qquad (\bar{\mu}_i, \bar{\nu}_i) \qquad (B.1d) $$

where Lagrangian multipliers $\bar{\mu}_i \in \mathbb{R}^{K_i T}$ and $\bar{\nu}_i \in \mathbb{R}_+$ are associated with the norm bound constraints. Following the approach in Appendix A.1, the dual problem to (B.1) in variables $\Xi^R = \{\mu_i^Q, \kappa_{it}^Q, \nu_i^Q, \mu_{ij}, \nu_{ij}, \bar{\mu}_i, \bar{\nu}_i\}$ writes as

$$ \max_{\Xi^R} - \sum_{i \in \mathcal{I}} \sum_{j \in \mathcal{J}_i} (\mathbf{b}_{ij}^{\top} \boldsymbol{\mu}_{ij} + e_{ij} \nu_{ij}) - \sum_{i \in \mathcal{I}} \sum_{t \in \mathcal{T}} \frac{1}{2} \kappa_{it}^Q - \sum_{i \in \mathcal{I}} \bar{D}_i^Q \bar{\nu}_i \qquad (B.2a) $$

$$ \text{s.t.} \quad 1 - \nu_i^Q = 0, \forall i \qquad (B.2b) $$

$$ \mathbf{c}_i^L - \mathbf{C}_i^Q \boldsymbol{\mu}_i^Q - \sum_{j=1}^{J_i} (\mathbf{A}_{ij}^{\top} \boldsymbol{\mu}_{ij} + \mathbf{d}_{ij} \nu_{ij}) + \bar{\boldsymbol{\mu}}_i = \mathbf{0}, \forall i \qquad (B.2c) $$

$$ \|\boldsymbol{\mu}_{it}^{\mathrm{Q}}\|^2 \le \kappa_{it}^{\mathrm{Q}} \nu_{it}^{\mathrm{Q}}, \forall t, \forall i \qquad (B.2d) $$

$$ \|\boldsymbol{\mu}_{ij}\| \le \nu_{ij}, \forall j \in \mathcal{J}_i, \forall i \qquad (B.2e) $$

$$ \|\bar{\boldsymbol{\mu}}_i\| \le \bar{\nu}_i, \forall i. \qquad (B.2f) $$

Proving the existence of strictly feasible points for (B.2) is straightforward. Choosing any arbitrary vectors $\boldsymbol{\mu}_{ij}, \forall j \in \mathcal{J}_i, \forall i$ and $\boldsymbol{\mu}_{it}^Q, \forall t, \forall i$, we can compute the values of $\nu_{ij} > \|\boldsymbol{\mu}_{ij}\|$ and $\kappa_{it}^Q > \|\boldsymbol{\mu}_{it}^Q\|$, while $\nu_{it}^Q = 1$ from (B.2b). Now, the variable $\bar{\boldsymbol{\mu}}_i$ follows from the equality (B.2c) and consequently, $\bar{\nu}_i$ can be any number larger than $\|\bar{\boldsymbol{\mu}}_i\|$. Hence, we have found at least one strictly feasible solution to (B.2), which proves essentially strict feasibility of the dual problem $\mathcal{D}^c$, given that Lemma 1 holds.

Next, we prove essentially strict feasibility of the primal market-clearing problem $\mathcal{M}^c$ employing the so-called Phase-I method, discussed in Boyd and Vandenberghe (2004, §11.4). Consider an SOCP problem in variables $(\mathbf{q}_i, \mathbf{z}_i, x_i, x_i^Q)$ where $x_i \in \mathbb{R}$ and $x_i^Q \in \mathbb{R}$ are arbitrary slack variables

$$ \min_{\mathbf{q}_i, \mathbf{z}_i, x_i, x_i^Q} \sum_{i \in \mathcal{I}} \sum_{t \in \mathcal{T}} (z_{it} + \mathbf{c}_{it}^{\top} \mathbf{q}_{it}) + \sum_{i \in \mathcal{I}} (x_i + x_i^Q) \qquad (B.3a) $$

$$ \text{s.t.} \quad \|\mathbf{C}_{it}^{\mathrm{Q}} \mathbf{q}_{it}\|^2 \le z_{it} + x_i^Q, \forall t, \forall i \qquad (B.3b) $$

$$ \|\mathbf{A}_{ij}\mathbf{q}_i + \mathbf{b}_{ij}\| \le \mathbf{d}_{ij}^{\top}\mathbf{q}_i + e_{ij} + x_i, \forall j \in \mathcal{J}_i, \forall i. \qquad (B.3c) $$

Observe that, obtaining strictly solutions to the primal problem (B.3) and its dual problem is straightforward. For instance, choosing

$$ \mathbf{q}_i = \mathbf{0}, x_i > \max_{j \in \mathcal{J}_i} \|b_{ij}\| - e_{ij}, \forall i, \qquad (B.4a) $$

$$ \text{any } \mathbf{z}_i \in \mathbb{R}_+^T \text{ and } x_i^Q > \max_{t \in \mathcal{T}} -z_{it}, \forall i, \qquad (B.4b) $$

gives a strictly feasible primal solution to (B.3). Likewise, a strictly feasible solution for the dual problem to (B.3) can be found by an approach (omitted from presentation, for the sake of brevity)
discussed above, i.e., by adding non-binding upper bound constraints on the primal variables $(x_i, x_i^Q)$, $\forall i$. Consequently, Alizadeh and Goldfarb (2003, Theorem 13) establishes strong duality for (B.3) due to strict primal and dual feasibility. We now provide an auxiliary result relating the augmented problem (B.3) to the primal market-clearing problem $\mathcal{M}^c$.

**Lemma 2.** For the tuple $(\mathbf{q}_i^*, \mathbf{z}_i^*, x_i^*, x_i^{Q*})$, $\forall i$ denoting the optimal solution to problem (B.3), only one of the following conditions holds:

(i) if $x_i^* < 0$, $\forall i$ and $x_i^{Q*} < 0$, $\forall i$, then $(\mathbf{q}_i^*, \mathbf{z}_i^*)$, $\forall i$ is strictly feasible for the problem $\mathcal{M}^c$, or

(ii) if for any participant $i$, $x_i^* = 0$ or $x_i^{Q*} = 0$, then for that participant $(\mathbf{q}_i^*, \mathbf{z}_i^*)$ is strictly feasible for problem $\mathcal{M}^c$, provided $e_{ij} > \|\mathbf{b}_{ij}\|$, $\forall j \in \mathcal{J}_i$ and the quadratic cost components $\mathbf{c}_{it}^Q \neq \mathbf{0}$, $\forall t$.

*Proof.* First, observe that if the tuple of optimal solution solution $(\mathbf{q}_i^*, \mathbf{z}_i^*, x_i^*, x_i^{Q*})$, $\forall i$ to problem (B.3) is such that for any $i$, $x_i^* > 0$ or $x_i^{Q*} > 0$, then it implies that problem $\mathcal{M}^c$ is infeasible, which contradicts our assumption in Theorem 1. Hence, for feasibility of the problem (B.3), we have $x_i \le 0$, $\forall i$ and $x_i^Q \le 0$, $\forall i$. Now, from (B.3b) and (B.3c), it is clear that if both $x_i^* < 0$, $\forall i$ and $x_i^{Q*} < 0$, $\forall i$ hold, we have found $(\mathbf{q}_i^*, \mathbf{z}_i^*)$, $\forall i$ which strictly satisfy the SOC inequalities in $\mathcal{M}^c$, i.e., (5b) and (5c). Conversely, if the optimal solution is obtained such that for any $i$, $x_i^* = 0$ or $x_i^{Q*} = 0$, then $(\mathbf{q}_i^*, \mathbf{z}_i^*)$ strictly satisfies the SOC inequalities corresponding to the $i$-th participant in $\mathcal{M}^c$ under some mild conditions derived from (B.4). Note that $x_i^{Q*} = 0 > \max_{t} - z_{it}$ holds true only if $z_{it} > 0$, $\forall t$. This is ensured by non-zero quadratic cost components of the market participant $i$ at all hours, i.e., $\mathbf{c}_{it}^Q \neq \mathbf{0}$, $\forall t$. Moreover if any $\mathbf{c}_{it}^Q = \mathbf{0}$, then the constraint (5b) corresponding to that hour is trivially satisfied and therefore, can be possibly eliminated. Lastly, from $x_i^* = 0 > \max_{j \in \mathcal{J}_i} \|b_{ij}\| - e_{ij}$, we obtain $\|b_{ij}\| - e_{ij} < 0$, $\forall j \in \mathcal{J}_i$, which is then a requirement for $\mathbf{q}_i^* = \mathbf{0}$ from (B.4a) to be strictly feasible for (5c). This completes the proof. $\square$

From Lemma 2, solving problem (B.3) leads to $(\mathbf{q}_i, \mathbf{z}_i)$, $\forall i$ that are essentially strictly feasible for $\mathcal{M}^c$ under some mild conditions. Evident from the Examples and formulations in the Supplementary Material, these conditions are met in the practical implementations of $\mathcal{M}^c$. We have now proved that an essentially strictly feasible solution to primal problem $\mathcal{M}^c$ exists.

Essentially strict feasibility of the primal and dual problems is necessary and sufficient for strong duality to hold for the primal-dual pair of problems $\mathcal{M}^c$ and $\mathcal{D}^c$ (Ben-Tal and Nemirovski, 2001, Theorem 1.4.4), thereby completing the proof.

*Proof of Theorem 2*

The proof follows from the partial Lagrangian function of $\mathcal{M}^c$, obtained by keeping the constraints (5b)-(5d) and relaxing the others, which we write as

$$ \hat{\Theta} = - \sum_{p \in \mathcal{P}} \lambda_p^\top \sum_{i \in \mathcal{I}} \mathbf{G}_{ip} \mathbf{q}_{ip} + \sum_{t \in \mathcal{T}} \bar{\mathbf{\Omega}}_t^\top \left( \sum_{n \in \mathcal{N}} [\Psi]_{(\cdot, n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \mathbf{q}_{ip}]_t \right) - \bar{\mathbf{s}} \right) \\ - \sum_{t \in \mathcal{T}} \underline{\mathbf{\Omega}}_t^\top \left( \sum_{n \in \mathcal{N}} [\Psi]_{(\cdot, n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \mathbf{q}_{ip}]_t \right) + \bar{\mathbf{s}} \right). $$
With the substitution of the auxiliary variable $Q_p^{\text{inj}}$, $\forall p \in \mathcal{P}$ defined in (10) followed by a rearrangement of terms, the partial Lagrangian equivalently writes as follows

$$ \hat{\Theta} = -\underbrace{\sum_{p \in \mathcal{P}} \lambda_p^\top Q_p^{\text{inj}} \top 1}_{\text{System-wide balance}} + \underbrace{\sum_{t \in \mathcal{T}} \bar{\varrho}_t^\top \left( \sum_{p \in \mathcal{P}} \Psi [Q_p^{\text{inj}}]_{(\cdot,t)} \right) - \sum_{t \in \mathcal{T}} \bar{\varrho}_t^\top \bar{s} - \sum_{t \in \mathcal{T}} \varrho_t^\top \left( \sum_{p \in \mathcal{P}} \Psi [Q_p^{\text{inj}}]_{(\cdot,t)} \right) - \sum_{t \in \mathcal{T}} \varrho_t^\top \bar{s}}_{\text{Line flow limits}} \quad (B.5) $$

where the vector of ones $1 \in \mathbb{R}^N$. Here, the partial Lagrangian comprises of terms corresponding to the system-wide balance equalities and the line flow limit inequalities, as indicated. In the sense of Bohn et al. (1984), the spot price of electricity for consumers at a given hour is analytically expressed as the sum of shadow price of the system balance constraint and the sensitivity of changes in the demand to the flow in the capacity-constrained transmission lines. We denote these optimal prices $\Pi_p \in \mathbb{R}^{N \times T}$ for the p-th commodity and provide an analytical expression in the following. We derive an expression for the spot price of commodities as the negative sensitivity of the partial Lagrangian (B.5) to the nodal injections as

$$ \frac{\partial \hat{\Theta}}{\partial [Q_p^{\text{inj}}]_{(\cdot,t)}} = -(1[\lambda_p]_t + \Psi^\top(\bar{\varrho}_t - \underline{\varrho}_t)), \forall p, \forall t, \quad (B.6) $$

where the negative sign originates from the sign convention adopted in this work, such that the consumption (withdrawals) are given by $q_{ip} \in \mathbb{R}^T$. For compactness of expression, we extend (B.6) to all hours by defining auxiliary variables $\underline{\rho}$, $\bar{\rho} \in \mathbb{R}^{L \times T}$ and $\Lambda_p \in \mathbb{R}^{N \times T}$, such that $\bar{\rho} = [\underline{\rho}_1 \cdots \underline{\rho}_T]$, $\underline{\rho} = [\underline{\rho}_1 \cdots \underline{\rho}_T]$ and $\Lambda_p = 1^\top \otimes \lambda_p$. Lastly, we express the spatial prices as

$$ \Pi_p = \Lambda_p - \Psi^\top(\bar{\rho} - \underline{\rho}), \forall p, \quad (B.7) $$

which are analogous in structure to conventional LMPs prevalent in LP-based market-clearing problems. Theorem 1 proves strong duality for the market-clearing problem $\mathcal{M}^c$, thereby ensuring the optimality of the spatial prices when the dual variables in (B.7) are replaced by their values at the optimal solution.

### Proof of Theorem 3.

To prove the equivalence of the optimization problem $\mathcal{M}^c$ with the equilibrium $\mathcal{E}^c$, we show that the KKT conditions of the equilibrium problem are identical to those of the optimization. First, for the network operator's congestion rent maximization problem (8), let $\Theta_{\text{NO}}$ denote the Lagrangian function of the problem (8). We write the KKT conditions defining the optimal solution as

* Stationarity condition:

$$ \frac{\partial \Theta_{\text{NO}}}{\partial y_t} = \omega_t + \Psi^\top(\bar{\rho}_t - \underline{\rho}_t) = 0, \forall t \quad (B.8a) $$

* Primal feasibility, dual feasibility and complementarity conditions:

$$ -\Psi y_t \le \bar{s}; \quad \underline{\rho}_t \ge 0; \quad \underline{\rho}_t \odot (\Psi y_t + \bar{s}) = 0 \quad (B.8b) $$

$$ \Psi y_t \le \bar{s}; \quad \bar{\rho}_t \ge 0; \quad \bar{\rho}_t \odot (\Psi y_t - \bar{s}) = 0, \quad (B.8c) $$

where $\odot$ denotes the Hadamard (element-wise) product operator.
For each participant $i \in \mathcal{I}$, let $\Theta_i(\mathbf{q}_i, \mathbf{z}_i, \boldsymbol{\mu}_{it}^Q, \kappa_{it}^Q, \nu_{it}^Q, \boldsymbol{\mu}_{ij}, \nu_{ij}, \gamma_i, \hat{\boldsymbol{\lambda}}_{ip})$ denote the Lagrangian function for problem (7) given by

$$ \Theta_i = \sum_{p \in \mathcal{P}} \mathrm{tr}(\mathbf{\Pi}_p^\top \mathbf{W}_{ip}) - \sum_{t \in \mathcal{T}} (z_{it} + \mathbf{c}_{it}^{\mathrm{L}\top} \mathbf{q}_{it}) - \sum_{t \in \mathcal{T}} \omega_t^\top (\sum_{p \in \mathcal{P}} [\mathbf{W}_{ip}]_{:,t}) + \sum_{t \in \mathcal{T}} \omega_t^\top (\sum_{p \in \mathcal{P}} \mathbb{1}_{n_i}[\mathbf{G}_{ip} \mathbf{q}_{ip}]_t) \\ + \sum_{t \in \mathcal{T}} (\boldsymbol{\mu}_{it}^Q \mathbf{C}_{it}^Q \mathbf{q}_{it} + \frac{1}{2} \kappa_{it}^Q + \nu_{it}^Q z_{it}) + \sum_{j \in \mathcal{J}_i} (\boldsymbol{\mu}_{ij}^\top (\mathbf{A}_{ij} \mathbf{q}_i + \mathbf{b}_{ij}) + \nu_{ij} (\mathbf{d}_{ij}^\top \mathbf{q}_i + e_{ij})) \\ - \boldsymbol{\gamma}_i^\top (\mathbf{F}_i \mathbf{q}_i - \mathbf{h}_i) + \hat{\boldsymbol{\lambda}}_{ip}^\top (\mathbf{G}_{ip} \mathbf{q}_{ip} - \mathbf{W}_{ip}^\top \mathbb{1}) \quad (B.9) $$

Using the auxiliary dual variables $\boldsymbol{\mu}_i^Q, \boldsymbol{\nu}_i$ and parameters $\mathbf{c}_i^L, \mathbf{C}_i^Q$ defined previously in Appendix A.2, we write the KKT optimality conditions for a participant $i \in \mathcal{I}$ as

* Stationarity conditions:

$$ \frac{\partial \Theta_i}{\partial \mathbf{q}_i} = -\mathbf{c}_i^L + \mathbf{C}_i^Q \boldsymbol{\mu}_i^Q + \sum_{j \in \mathcal{J}_i} (\mathbf{A}_{ij}^\top \boldsymbol{\mu}_{ij} + \mathbf{d}_{ij} \nu_{ij}) - \mathbf{F}_i^\top \boldsymbol{\gamma}_i + \frac{\partial}{\partial \mathbf{q}_i} (\hat{\boldsymbol{\lambda}}_{ip}^\top (\mathbf{G}_{ip} \mathbf{q}_{ip})) \\ + \frac{\partial}{\partial \mathbf{q}_i} \left( \sum_{t \in \mathcal{T}} \omega_t^\top (\mathbb{1}_{n_i} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \mathbf{q}_{ip}]_t) \right) = 0 \quad (B.10a) $$

$$ \frac{\partial \Theta_i}{\partial \mathbf{W}_{ip}} = \mathbf{\Pi}_p - \hat{\boldsymbol{\lambda}}_{ip} \mathbb{1}^\top - \boldsymbol{\Omega} = \mathbf{0}, \quad \forall p \in \mathcal{P}, \quad (B.10b) $$

$$ \frac{\partial \Theta_i}{\partial \mathbf{z}_i} = \mathbb{1} - \boldsymbol{\nu}_i = \mathbf{0} \quad (B.10c) $$

where $\boldsymbol{\Omega} \in \mathbb{R}^{N \times T} := [\boldsymbol{\omega}_1 \ \boldsymbol{\omega}_2 \ \dots \ \boldsymbol{\omega}_T]$, such that the term $\sum_{t \in \mathcal{T}} \boldsymbol{\omega}_t^\top (\sum_{p \in \mathcal{P}} [\mathbf{W}_{ip}]_{:,t})$ in the Lagrangian (B.9) reduces to $\mathrm{tr}(\boldsymbol{\Omega}^\top \mathbf{W}_{ip})$. Furthermore, from (B.8a), we have $\boldsymbol{\omega}_t = -\boldsymbol{\Psi}^\top (\bar{\boldsymbol{\rho}}_t - \boldsymbol{\rho}_t)$ at the optimal solution. With this and from the definitions of $\hat{\boldsymbol{\lambda}}_i$ and $\hat{\boldsymbol{\rho}}_i$ in (A.5) and (A.6), respectively, (B.10a) reduces to

$$ \frac{\partial \Theta_i}{\partial \mathbf{q}_i} = -\mathbf{c}_i^L + \mathbf{C}_i^Q \boldsymbol{\mu}_i^Q + \sum_{j \in \mathcal{J}_i} (\mathbf{A}_{ij}^\top \boldsymbol{\mu}_{ij} + \mathbf{d}_{ij}) - \mathbf{F}_i^\top \boldsymbol{\gamma}_i + \hat{\boldsymbol{\lambda}}_i - \hat{\boldsymbol{\rho}}_i = \mathbf{0} \quad (B.10d) $$

Similarly, the stationarity condition (B.10b) reduces to

$$ \frac{\partial \Theta_i}{\partial \mathbf{W}_{ip}} = \mathbf{\Pi}_p - \hat{\boldsymbol{\lambda}}_{ip} \mathbb{1}^\top + \boldsymbol{\Psi}^\top (\bar{\boldsymbol{\rho}} - \boldsymbol{\rho}) = \mathbf{0}, \quad \forall p \in \mathcal{P}, \quad (B.10e) $$

following the definitions of auxiliary dual variables $\bar{\boldsymbol{\rho}}$ and $\boldsymbol{\rho}$ in Theorem 2.

* Primal feasibility, dual feasibility and complementarity conditions:

$$ \|\mathbf{C}_{it}^Q \mathbf{q}_{it}\|^2 \le z_{it}; \quad \|\boldsymbol{\mu}_{it}^Q\|^2 \le \kappa_{it}^Q \nu_{it}^Q, \quad \kappa_{it}^Q \ge 0, \nu_{it}^Q \ge 0; \quad [\boldsymbol{\mu}_{it}^\top \ \nu_{it}^Q \ \kappa_{it}^Q] \begin{bmatrix} \mathbf{C}_{it}^Q \mathbf{q}_{it} \\ z_{it} \end{bmatrix} = 0, \quad \forall t \quad (B.10f) $$

$$ \|\mathbf{A}_{ij} \mathbf{q}_i + \mathbf{b}_{ij}\| \le \mathbf{d}_{ij}^\top \mathbf{q}_i + e_{ij}; \quad \|\boldsymbol{\mu}_{ij}\| \le \nu_{ij}, \quad \nu_{ij} \ge 0; \quad [\boldsymbol{\mu}_{ij}^\top \ \nu_{ij}] \begin{bmatrix} \mathbf{A}_{ij} \\ \mathbf{d}_{ij}^\top \end{bmatrix} \mathbf{q}_i + \begin{bmatrix} \mathbf{b}_{ij} \\ e_{ij} \end{bmatrix} = 0, \quad \forall j \in \mathcal{J}_i \quad (B.10g) $$

$$ \mathbf{F}_i \mathbf{q}_i = \mathbf{h}_i; \quad \gamma_i \text{ free} \quad (B.10h) $$

$$ (A.5) - (A.6), \quad \forall k = 1, 2, \dots, K_i, \forall t, \forall i. \quad (B.10i) $$
Equations (B.8), (B.10c)-(B.10i), $\forall i \in \mathcal{I}$ and (9) form the KKT optimality conditions for the equilibrium problem $\mathcal{E}^c$. Observe that, in addition to the primal and dual feasibility involving SOC constraints, (B.10f)-(B.10g) ensure the conic complementarity condition is met at the optimal solution (Alizadeh and Goldfarb, 2003, Theorem 16).

To see that the KKT optimality conditions for the optimization problem $\mathcal{M}^c$ are identical to those of the equilibrium, observe that at the optimal solution:

(i) $\hat{\lambda}_{ip}^*, \forall i \in \mathcal{I}$ appearing in (B.10e) are attained such that $\hat{\lambda}_{ip}^* = \lambda_p^*, \forall p \in \mathcal{P}, \forall i \in \mathcal{I}$, where $\lambda_p^*, \forall p \in \mathcal{P}$ corresponds to the system-wide price of the commodities. Therefore, (B.10e) provides the analytical expression for conic spatial prices as formulated in Theorem 2, and

(ii) $\mathbf{y}_t^*, \forall t$ appearing in (B.8b)-(B.8c) are obtained such that $\mathbf{y}_t^* = \sum_{p \in \mathcal{P}} [\mathbf{Q}_p^{\text{inj}*}]_{(\cdot,t)}$, $\forall t$. This follows from the market-clearing condition (9a). Note that the auxiliary variable $\mathbf{Q}_p^{\text{inj}}$ appears in the partial Lagrangian of problem $\mathcal{M}^c$, as shown (B.5).

This establishes the equivalence of the KKT optimality conditions for the centrally-solved optimization problem $\mathcal{M}^c$ and the equilibrium problem $\mathcal{E}^c$, thereby completing the proof.

### Proof of Corollary 1

To prove existence of solutions to the competitive spatial price equilibrium problem $\mathcal{E}^c$, we recall Rosen (1965, Theorem 1) which provides an existence result for solutions to equilibrium problems conditioned on the convexity and compactness of each participant's strategy sets and the continuity of their payoff functions. For the market participants $i \in \mathcal{I}$, while convexity and closure of the strategy sets are given by the feasibility region defined by equalities and non-strict inequalities (7b)-(7e), Lemma 1 proves that $(\mathbf{q}_i, \mathbf{z}_i)$, $\forall i$ are bounded. Note that the quantities bought or sold by the $i$-th participant $\mathbf{W}_{ip}$, $\forall p$ are bounded, conditioned on the boundedness of $\mathbf{q}_i$ due to (7e). Consequently, the strategy sets of the participants are convex as well as closed and bounded, thereby satisfying the convexity and compactness conditions. Further, each participant's cost function (7a) is continuous in the decision variables. For the network operator, convexity and compactness of the strategy set is given due to the network limits and continuity of the payoff function is satisfied by the linear objective function in (8). Therefore, from Rosen (1965, Theorem 1), this proves that at least one solution exists for the spatial price equilibrium problem $\mathcal{E}^c$. To derive conditions under which at most one solution exists to problem $\mathcal{E}^c$, we refer to the equivalence of equilibrium problem $\mathcal{E}^c$ to the convex market-clearing optimization problem $\mathcal{M}^c$ established by Theorem 3. From this equivalence, the uniqueness of allocations $\mathbf{q}_i^*$, $\forall i$ at the equilibrium relies on the strict convexity of the problem $\mathcal{M}^c$, which we characterize in Remark 4. However, observe that, the uniqueness of solutions to the dual market-clearing problem $\mathcal{D}^c$ is not given due to lack of the strict convexity property of the dual objective (A.7a). Therefore, uniqueness of spatially-differentiated conic prices $\Pi_p^*$, $\forall p$ given by (6) is not guaranteed. This completes the proof.

### Proof of Theorem 4

(i) **Market efficiency:** An efficient market maximizes social welfare, such that no participant unilaterally deviates from the market-clearing outcomes since each participant maximizes her profit at the optimal allocations $\mathbf{q}_i^*$ and prices $\Pi_p^*$, $\forall p$. Under the assumption of perfectly competitive market participants, this is given if the KKT optimality conditions of the centrally-solved optimization problem $\mathcal{M}^c$ and equilibrium problem $\mathcal{E}^c$ involving rational and self-interested actors are identical, which we have established in Proof of Theorem 3.
(ii) **Cost recovery:** Mathematically, the non-negativity of payoff for the market participants holds true, if at the optimal solution

$$ \sum_{p \in \mathcal{P}} \mathrm{tr}(\mathbf{\Pi}_p^\top \mathbf{W}_{ip}^\star) - \sum_{t \in \mathcal{T}} (z_{it}^\star + \mathbf{c}_{it}^\mathrm{L}^\top \mathbf{q}_{it}^\star) - \sum_{t \in \mathcal{T}} \omega_t^\star \top \left( \sum_{p \in \mathcal{P}} (|\mathbf{W}_{ip}^\star|_{:,t} - \mathbb{1}_{n_i}[\mathbf{G}_{ip}\mathbf{q}_{ip}^\star]_t) \right) \geq 0, \forall i \in \mathcal{I}. \quad (B.11) $$

To prove that (B.11) holds, we derive dual problems to each participant's profit maximization problem (7). The dual problem in variables $\Xi_i = \{\mu_i^Q, \kappa_{it}^Q, \nu_i^Q, \mu_{ij}, \nu_{ij}, \gamma_i\}$ writes as

$$ \forall i \in \mathcal{I} \left\{ \begin{array}{ll} \min_{\Xi_i} & \sum_{j \in \mathcal{J}_i} (\mathbf{b}_{ij}^\top \boldsymbol{\mu}_{ij} + e_{ij} \nu_{ij}) + \sum_{t \in \mathcal{T}} \frac{1}{2} \kappa_{it}^Q + \gamma_i^\top \mathbf{h}_i \\ \text{s.t.} & (\text{B.10c}) - (\text{B.10e}) \\ & \|\boldsymbol{\mu}_{it}^Q\|^2 \le \kappa_{it}^Q \nu_{it}^Q, \forall t \\ & \|\boldsymbol{\mu}_{ij}\| \le \nu_{ij}, \forall j \in \mathcal{J}_i \\ & \kappa_{it}^Q \ge 0, \nu_{it}^Q \ge 0, \end{array} \right. \quad (B.12) $$

Using Lemmas 1 and 2 provided in the Proof of Theorem 1, existence of strictly feasible primal-dual solutions to the participant's profit maximization problem (7) and its dual (B.12) is established (omitted from presentation, for the sake of brevity). Consequently, from Theorem 1, strong duality holds for this primal-dual pair, thereby enforcing the primal problem (7) and its dual (B.12) to attain identical objective function values at the optimal solution. Condition (B.11) is equivalent to the non-negativity of the dual objective in (B.12) at the optimal solution, which we now analyze in the following.

Observe that, the second term of the objective function of the dual problem (B.12) is non-negative from the primal feasibility condition $\kappa_{it} \ge 0, \forall i$. The first term, enclosed in parenthesis, is non-negative if $e_{ij} \ge \|\mathbf{b}_{ij}\|, \forall j \in \mathcal{J}_i$. This stems from the Cauchy-Schwarz Inequality, i.e., we have

$$ |\mathbf{b}_{ij}^\top \boldsymbol{\mu}_{ij}| \le \|\mathbf{b}_{ij}\| \|\boldsymbol{\mu}_{ij}\| \le \|\mathbf{b}_{ij}\| \nu_{ij}, \forall j \in \mathcal{J}_i, $$

where the last inequality is due to the primal feasibility condition $\|\boldsymbol{\mu}_{ij}\| \le \nu_{ij}, \forall j \in \mathcal{J}_i$. With the condition $e_{ij} \ge \|\mathbf{b}_{ij}\|, \forall j \in \mathcal{J}_i$, we have $|\mathbf{b}_{ij}^\top \boldsymbol{\mu}_{ij}| \le e_{ij} \nu_{ij}, \forall j \in \mathcal{J}_i$. Under the condition $e_{ij} \ge \|\mathbf{b}_{ij}\|, e_{ij} \nu_{ij} \ge 0, \forall j \in \mathcal{J}_i$; therefore, the first term in the objective is bounded below by 0. The variable $\gamma_i$ is free, therefore the third term in the objective is guaranteed to be non-negative if $\mathbf{h}_i = \mathbf{0}$. This completes the proof of cost recovery for the market participants $i \in \mathcal{I}$ under the conditions: (i) $e_{ij} \ge \|\mathbf{b}_{ij}\|, \forall j \in \mathcal{J}_i, \forall i$ and (ii) $\mathbf{h}_i = \mathbf{0}, \forall i$.

(iii) **Revenue adequacy:** Mathematically, the market operator is revenue adequate if

$$ \underbrace{\sum_{p \in \mathcal{P}} \sum_{i \in \mathcal{I}} \mathrm{tr}(\mathbf{\Pi}_p^\top \mathbf{W}_{ip}^\star)}_{\text{Term A}} - \underbrace{\sum_{t \in \mathcal{T}} \omega_t^\star \top \mathbf{y}_t^\star}_{\text{Term B}} \geq 0, \quad (B.13) $$

where Term A refers to the net payments received from the $i \in \mathcal{I}$ market participants for the $p \in \mathcal{P}$ commodities and Term B refers to the payments made to the network operator towards transmission service. To reduce notational complexity, we drop the superscript $\star$ denoting optimal values in the proof that follows, yet they are always implied. Using (B.6), we expand
Term A and rearrange the summation operators to reflect the dependence of variables

$$
\begin{align}
\sum_{p \in \mathcal{P}} \sum_{i \in \mathcal{I}} \mathrm{tr}(\mathbf{\Pi}_p^\top \mathbf{W}_{ip}) &= \sum_{p \in \mathcal{P}} \sum_{i \in \mathcal{I}} \sum_{t \in \mathcal{T}} \left( \left( \mathbb{1}[\lambda_p]_t - \mathbf{\Psi}^\top(\bar{\mathbf{\Omega}}_t - \underline{\mathbf{\Omega}}_t) \right)^\top [\mathbf{W}_{ip}]_{(\cdot,t)} \right) \nonumber \\
&= \sum_{p \in \mathcal{P}} \sum_{i \in \mathcal{I}} \sum_{t \in \mathcal{T}} \left( [\lambda_p]_t \mathbb{1}^\top [\mathbf{W}_{ip}]_{(\cdot,t)} \right) - \sum_{t \in \mathcal{T}} \left( \left( \mathbf{\Psi}^\top(\bar{\mathbf{\Omega}}_t - \underline{\mathbf{\Omega}}_t) \right)^\top \sum_{p \in \mathcal{P}} \sum_{i \in \mathcal{I}} [\mathbf{W}_{ip}]_{(\cdot,t)} \right). \tag{B.14}
\end{align}
$$

Gathering the equalities (7e) representing the transaction quantities with the injections (or withdrawals) for the I participants, we have $\mathbf{W}_{ip}^\top \mathbb{1} = \mathbf{G}_{ip} \mathbf{q}_{ip}$, $\forall i$. Since this equality holds individually for each participant, we can add them for all participants to get $\sum_{i \in \mathcal{I}} \mathbb{1}^\top \mathbf{W}_{ip} = \sum_{i \in \mathcal{I}} (\mathbf{G}_{ip} \mathbf{q}_{ip})^\top$, such that

$$ \sum_{i \in \mathcal{I}} \mathbb{1}^{\top} [\mathbf{W}_{ip}]_{(\cdot,t)} = \sum_{i \in \mathcal{I}} [\mathbf{G}_{ip} \mathbf{q}_{ip}]_t = 0, \quad \forall t, \qquad (B.15) $$

where the second equality results from the market-clearing condition (9b) that holds at optimality. Hence, the first term in (B.14) vanishes. The second term in (B.14) is non-zero only if there is a congestion in the grid, i.e., any $\bar{\mathbf{\Omega}}_t \neq 0$ or $\underline{\mathbf{\Omega}}_t \neq 0$. Next, we expand Term B in (B.13), using the stationarity condition (B.8a) and the market-clearing condition (9a), as

$$ - \sum_{t \in \mathcal{T}} \omega_t^\top \mathbf{y}_t = \sum_{t \in \mathcal{T}} \left( \mathbf{\Psi}^\top (\bar{\mathbf{\Omega}}_t - \underline{\mathbf{\Omega}}_t) \right)^\top \sum_{p \in \mathcal{P}} [\mathbf{Q}_p^{\mathrm{inj}}]_{(\cdot,t)} \qquad (B.16) $$

which is non-zero only if there is congestion in the network, i.e., the network operator earns congestion rent. We remove the summation over the hours by using the expression for the conic spatial prices given by Theorem 2 and the auxiliary variables defined therein, to rewrite Term B of (B.13) as

$$
\begin{align}
-\sum_{t \in \mathcal{T}} \omega_t^\top \mathbf{y}_t &= \sum_{t \in \mathcal{T}} \left( \mathbf{\Psi}^\top (\bar{\mathbf{\Omega}}_t - \underline{\mathbf{\Omega}}_t) \right)^\top \sum_{p \in \mathcal{P}} [\mathbf{Q}_p^{\mathrm{inj}}]_{(\cdot,t)} \nonumber \\
&= \sum_{p \in \mathcal{P}} \mathrm{tr} \left( (\mathbf{\Psi}^\top (\bar{\mathbf{\rho}} - \underline{\mathbf{\rho}}))^\top \mathbf{Q}_p^{\mathrm{inj}} \right) = \sum_{p \in \mathcal{P}} \mathrm{tr} \left( (\mathbf{\Lambda}_p - \mathbf{\Pi}_p)^\top \mathbf{Q}_p^{\mathrm{inj}} \right). \tag{B.17}
\end{align}
$$

Similarly, using (B.15), we rewrite Term A of (B.13) after rearrangement as

$$
\begin{align}
\sum_{p \in \mathcal{P}} \sum_{i \in \mathcal{I}} \mathrm{tr}(\mathbf{\Pi}_p^\top \mathbf{W}_{ip}) &= -\sum_{t \in \mathcal{T}} \left( \left( \mathbf{\Psi}^\top (\bar{\mathbf{\Omega}}_t - \underline{\mathbf{\Omega}}_t) \right)^\top \sum_{p \in \mathcal{P}} \sum_{i \in \mathcal{I}} [\mathbf{W}_{ip}]_{(\cdot,t)} \right) \nonumber \\
&= -\sum_{p \in \mathcal{P}} \mathrm{tr} \left( (\mathbf{\Lambda}_p - \mathbf{\Pi}_p)^\top \left( \sum_{i \in \mathcal{I}} \mathbf{W}_{ip} \right) \right). \tag{B.18}
\end{align}
$$

Observe that $\sum_{i \in \mathcal{I}} \mathbf{W}_{ip}$ sums the transaction quantities over the nodes and periods for all participants for a given commodity $p$, which is indeed equal to the commodity-specific net nodal injections given by (10), i.e., $\mathbf{Q}_p^{\mathrm{inj}} = \sum_{i \in \mathcal{I}} \mathbf{W}_{ip}$, $\forall p$. Therefore, the terms in (B.17) and (B.18) cancel each other out, thereby satisfying the revenue adequacy condition for the market operator at the optimal solution. As a result, we have shown that there exists a budget balance for the market operator under the proposed conic market framework, i.e., the market-operator does not accrue any surplus revenue.
References

Alamo, T., Tempo, R., Luque, A., Ramirez, D.R., 2015. Randomized methods for design of uncertain systems: Sample complexity and sequential algorithms. Automatica 52, 160–172.

Alizadeh, F., Goldfarb, D., 2003. Second-order cone programming. Mathematical Programming 95, 3–51.

Anjos, M.F., Gómez, J.A., 2017. Operations Research Approaches for Building Demand Response in a Smart Grid. INFORMS TutORials in Operations Research. chapter 7. pp. 131–152.

Baker, K., 2021. Solutions of DC OPF are never AC feasible, in: The Twelfth ACM International Conference on Future Energy Systems (e-Energy '21), New York, USA. p. 264–268.

Ben-Tal, A., Nemirovski, A., 2001. Lectures on Modern Convex Optimization. Society for Industrial and Applied Mathematics, Philadelphia. chapter 1.

Benson, H.Y., Sağlam, U., 2013. Mixed-integer second-order cone programming: A survey, in: Theory Driven by Influential Applications. INFORMS TutORials in Operations Research. chapter 2, pp. 13–36.

Bertsimas, D., Litvinov, E., Sun, X.A., Zhao, J., Zheng, T., 2013. Adaptive robust optimization for the security constrained unit commitment problem. IEEE Transactions on Power Systems 28, 52–63.

Bohn, R.E., Caramanis, M.C., Schweppe, F.C., 1984. Optimal pricing in electrical networks over space and time. The RAND Journal of Economics 15, 360–376.

Borraz-Sánchez, C., Bent, R., Backhaus, S., Hijazi, H., Hentenryck, P.V., 2016. Convex relaxations for gas expansion planning. INFORMS Journal on Computing 28, 645–656.

Boyd, S., Vandenberghe, L., 2004. Convex Optimization. Cambridge University Press.

Bushnell, J., 2021. To fix the power market, first fix the natural gas market. Energy Institute Blog, UC Berkeley. Last accessed: 30 June 2021. https://energyathaas.wordpress.com/2021/03/01/to-fix-the-power-market-first-fix-the-natural-gas-market/.

Byeon, G., Van Hentenryck, P., 2020. Unit commitment with gas network awareness. IEEE Transactions on Power Systems 35, 1327–1339.

Cai, X., McKinney, D.C., Lasdon, L.S., Watkins, D.W., 2001. Solving large nonconvex water resources management models using generalized benders decomposition. Operations Research 49, 235–245.

Cain, M.B., O'Neill, R.P., Castillo, A., 2012. History of Optimal Power Flows and Formulations. Federal Energy Regulatory Commission (FERC).

Chen, W., Sim, M., Sun, J., Teo, C.P., 2010. From cvar to uncertainty set: Implications in joint chance-constrained optimization. Operations Research 58, 470–485.

Chu, S., Majumdar, A., 2012. Opportunities and challenges for a sustainable energy future. Nature 488, 294–303.

Conejo, A.J., Carrión, M., Morales, J.M., 2010. Decision making under uncertainty in electricity markets. Springer US, New York. volume 153. chapter App. B.

Courcoubetis, C., Weber, R., 2003. Pricing Communication Networks. John Wiley & Sons, Ltd, West Sussex, England. chapter 9. pp. 219–233.

Daqing, L., Yinan, J., Rui, K., Havlin, S., 2014. Spatial correlation analysis of cascading failures: Congestions and blackouts. Scientific Reports 4, 5381.

De Wolf, D., Smeers, Y., 2000. The gas transmission problem solved by an extension of the simplex algorithm. Management Science 46, 1454–1465.

Delage, E., Ye, Y., 2010. Distributionally robust optimization under moment uncertainty with application to data-driven problems. Operations Research 58, 595–612.

Dvorkin, V., Ratha, A., Pinson, P., Kazempour, J., 2022. Stochastic control and pricing for natural gas networks. IEEE Transactions on Control of Network Systems 9, 450–462.

Dvorkin, Y., 2020. A chance-constrained stochastic electricity market. IEEE Transactions on Power Systems 35, 2993–3003.

Enke, S., 1951. Equilibrium among spatially separated markets: Solution by electric analogue. Econometrica 19, 40–47.

Fortuny-Amat, J., McCarl, B., 1981. A representation and economic interpretation of a two-level programming problem. The Journal of the Operational Research Society 32, 783–792.

González, P., Villar, J., Díaz, C.A., Campos, F.A., 2014. Joint energy and reserve markets: Current implementations and modeling trends. Electric Power Systems Research 109, 101–111.

Gribik, P., Hogan, W.W., Pope, S., 2007. Market-clearing electricity prices and energy uplift, Harvard Univ., Cambridge, MA, USA, working paper.

Hobbs, B.F., et al., 2001. Why this book? New capabilities and new needs for unit commitment modeling, in: The Next Generation of Electric Power Unit Commitment Models. Springer US, Boston, MA, pp. 1–14.

Holt, C.C., Modigliani, F., Simon, H.A., 1955. A linear decision rule for production and employment scheduling. Management Science 2, 1–30.

Kantorovich, L.V., 1960. Mathematical methods of organizing and planning production. Management Science 6, 366–422.
Kim, J.H., Powell, W.B., 2011. Optimal energy commitments with storage and intermittent supply. Operations Research 59, 1347-1360.

Kirschen, D., Strbac, G., 2018. Fundamentals of Power System Economics, 2nd Edition. John Wiley & Sons, Ltd, US. chapter 3. pp. 51–88.

Kocuk, B., Dey, S.S., Sun, X.A., 2016. Strong SOCP relaxations for the optimal power flow problem. Operations Research 64, 1177–1196.

Krebs, V., Schewe, L., Schmidt, M., 2018. Uniqueness and multiplicity of market equilibria on DC power flow networks. European Journal of Operational Research 271, 165–178.

Kuang, X., Dvorkin, Y., Lamadrid, A.J., Ortega-Vazquez, M.A., Zuluaga, L.F., 2018. Pricing chance constraints in electricity markets. IEEE Transactions on Power Systems 33, 4634–4636.

Kuang, X., Lamadrid, A.J., Zuluaga, L.F., 2019. Pricing in non-convex markets with quadratic deliverability costs. Energy Economics 80, 123 – 131.

Lavaei, J., Low, S.H., 2012. Zero duality gap in optimal power flow problem. IEEE Transactions on Power Systems 27, 92–107.

Liberopoulos, G., Andrianesis, P., 2016. Critical review of pricing schemes in markets with non-convex costs. Operations Research 64, 17–31.

Lobo, M.S., Vandenberghe, L., Boyd, S., Lebret, H., 1998. Applications of second-order cone programming. Linear Algebra and its Applications 284, 193 – 228.

Mays, J., 2021. Quasi-stochastic electricity markets. INFORMS Journal on Optimization 3, 350–372.

Mieth, R., Dvorkin, Y., 2020. Distribution electricity pricing under uncertainty. IEEE Transactions on Power Systems 35, 2325–2338.

Mieth, R., Kim, J., Dvorkin, Y., 2020. Risk- and variance-aware electricity pricing. Electric Power Systems Research 189, 106804.

Mieth, R., Roveto, M., Dvorkin, Y., 2021. Risk trading in a chance-constrained stochastic electricity market. IEEE Control Systems Letters 5, 199–204. doi:10.1109/LCSYS.2020.3000188.

Mitridati, L., Kazempour, J., Pinson, P., 2020. Heat and electricity market coordination: A scalable complementarity approach. European Journal of Operational Research 283, 1107–1123.

Mosek ApS, 2021. MOSEK Modeling Cookbook 3.2.3. Last accessed: 30 June 2021. https://docs.mosek.com/modeling-cookbook/index.html.

Nemirovski, A., 2012. On safe tractable approximations of chance constraints. European Journal of Operational Research 219, 707–718.

Nemirovski, A., Shapiro, A., 2007. Convex approximations of chance constrained programs. SIAM Journal on Optimization 17, 969–996.

Nord Pool, 2021. Nord Pool Day-ahead Trading. Last accessed: 30 June 2021. https://www.nordpoolgroup.com/trading/Day-ahead-trading/.

O'Neill, R.P., et al., 2005. Efficient market-clearing prices in markets with nonconvexities. European Journal of Operational Research 164, 269–285.

Papavasiliou, A., 2018. Analysis of distribution locational marginal prices. IEEE Transactions on Smart Grid 9, 4872–4882.

Philpott, A., Ferris, M., Wets, R., 2016. Equilibrium, uncertainty and risk in hydro-thermal electricity systems. Mathematical Programming 157, 483–513.

PJM Interconnection, 2014. Analysis of operational events and market impacts during the January 2014 cold weather events.

Pritchard, G., Zakeri, G., Philpott, A., 2010. A single-settlement, energy-only electric power market for unpredictable and intermittent participants. Operations Research 58, 1210–1219.

Raissi, M., 2016. Conic Economics. Ph.D. thesis. University of Maryland, College Park. Last accessed: 30 June 2021 https://search.proquest.com/docview/1861702044.

Ratha, A., Kazempour, J., Virag, A., Pinson, P., 2019. Exploring market properties of policy-based reserve procurement for power systems, in: 2019 IEEE 58th Conference on Decision and Control (CDC), pp. 7498–7505.

Roberts, D.J., Postlewaite, A., 1976. The incentives for price-taking behavior in large exchange economies. Econometrica 44, 115–127.

Rosen, J.B., 1965. Existence and uniqueness of equilibrium points for concave n-person games. Econometrica 33, 520–534.

Samuelson, P.A., 1952. Spatial price equilibrium and linear programming. The American Economic Review 42, 283–303.

Schweppe, F.C., Caramanis, M.C., Tabors, R.D., Bohn, R.E., 1988. Spot Pricing of Electricity. Springer US, Boston, MA. chapter 1.

Snyder, L.V., Scaparra, M.P., Daskin, M.S., Church, R.L., 2014. Planning for Disruptions in Supply Chain Networks. INFORMS TutORials in Operations Research. chapter 9. pp. 234–257.

Thompson, M., 2013. Optimal economic dispatch and risk management of thermal power plants in deregulated markets. Operations Research 61, 791–809.
Varela, C., Mostafa, M., Zondervan, E., 2021. Modeling alkaline water electrolysis for power-to-x applications: A scheduling approach. International Journal of Hydrogen Energy 46, 9303-9313.

Vickrey, W., 1961. Counterspeculation, auctions, and competitive sealed tenders. The Journal of Finance 16, 8-37.

Wagner, M.R., 2008. Stochastic 0-1 linear programming under limited distributional information. Operations Research Letters 36, 150-156.

Wang, C., Luh, P.B., Gribik, P., Peng, T., Zhang, L., 2016. Commitment cost allocation of fast-start units for approximate extended locational marginal prices. IEEE Transactions on Power Systems 31, 4176-4184.

Warrington, J., Goulart, P., Mariéthoz, S., Morari, M., 2013. Policy-based reserves for power systems. IEEE Transactions on Power Systems 28, 4427-4437. doi:10.1109/TPWRS.2013.2269804.

Zavala, V.M., Kim, K., Anitescu, M., Birge, J., 2017. A stochastic electricity market clearing formulation with consistent pricing properties. Operations Research 65, 557-576.
# Moving from Linear to Conic Markets for Electricity

Anubhav Ratha, Pierre Pinson, Hélène Le Cadre, Ana Virag, Jalal Kazempour

This document serves as an electronic companion (EC) for the paper "Moving from Linear to Conic Markets for Electricity". In §EC.1, we provide modeling examples that illustrate how second order cone (SOC) constraints enable future electricity markets to be uncertainty-, asset- and network-aware. In §EC.2, we present the market-clearing problems of the proposed SOCP-based uncertainty-aware electricity market as well as the linear programming (LP) based market-clearing benchmarks. Numbered sections and equations throughout the electronic companion correspond to those in the paper, while a prefix 'EC.' denotes these elements within this document.

## EC.1. Modeling Examples

In addition to the examples discussed in the paper, this section demonstrates the versatility of SOC constraints in modeling the various asset- and network-related nonlinearities faced by electricity markets. While Example EC.1 covers the general case of including participants with quadratic costs in electricity markets, Example EC.2 demonstrates the network-awareness of the market framework proposed in the paper by showing how it can be extended to include the SOCP relaxation of nonlinear and non-convex power flow equations.

EXAMPLE EC.1 (QUADRATIC COST). Consider participant $i$ having a quadratic cost (utility) of production (consumption), such that the cost function at each hour $t$ is given by $c_{it}(\mathbf{q}_{it}) = \mathbf{q}_{it}^{\top}\mathrm{diag}(\mathbf{c}_{it}^{\mathrm{Q}})\mathbf{q}_{it} + \mathbf{c}_{it}^{\mathrm{L}^{\top}}\mathbf{q}_{it}$, where $\mathbf{c}_{it}^{\mathrm{Q}} \in \mathbb{R}^{K_i}$ and $\mathbf{c}_{it}^{\mathrm{L}} \in \mathbb{R}^{K_i}$ denote the quadratic and linear cost coefficients, respectively. Let $\mathbf{C}_{it}^{\mathrm{Q}} \in \mathbb{R}^{K_i \times K_i}$ be defined as a factorization of the quadratic cost matrix such that $\mathrm{diag}(\mathbf{c}_{it}^{\mathrm{Q}}) = \mathbf{C}_{it}^{\mathrm{Q}^{\top}}\mathbf{C}_{it}^{\mathrm{Q}}$. The existence of such a factorization is given since $\mathrm{diag}(\mathbf{c}_{it}^{\mathrm{Q}}) \succ 0, \forall t, \forall i \in \mathcal{I}$. The quadratic objective function of the participant $i$ is equivalently written as

$$ \min_{\mathbf{q}_{it}, z_{it}} \sum_{t \in \mathcal{T}} (z_{it} + \mathbf{c}_{it}^{\mathrm{L}^{\top}} \mathbf{q}_{it}) \qquad (\mathrm{EC}.1\mathrm{a}) $$

$$ \text{s.t.} \quad \|\mathbf{C}_{it}^{\mathrm{Q}}\mathbf{q}_{it}\|^2 \le z_{it}, \forall t, \qquad (\mathrm{EC}.1\mathrm{b}) $$

where $z_{it} \in \mathbb{R}_{+}$ is an auxiliary variable, resulting in the linear objective function (EC.1a). The rotated SOC constraint (EC.1b) is a special form of the general SOC constraint (??), see ?. We illustrate this for single-period market-clearing, i.e., $T = 1$, assuming that participant $i$ has $K_i = 2$ decisions variables, such that $\mathbf{q}_{i1} \in \mathbb{R}^2$. Extending the decision vector of participant $i$ to
$\mathbf{q}_i = [\mathbf{q}_{i1}^\top \quad z_{i1}]^\top \in \mathbb{R}^3$, we have the parameters $\mathbf{A}_i = [\mathbf{C}_{it}^Q \quad \mathbf{0}_2]$, $\mathbf{d}_i = [0 \quad 0 \quad 1]^\top$, while $\mathbf{b}_i = \mathbf{0}_2$ and $e_i = 0$, resulting in a three-dimensional rotated SOC constraint, i.e., $m_i = 2$.

EXAMPLE EC.2 (ELECTRICITY NETWORK). Known as the branch flow model (Farivar and Low 2013), the SOCP relaxation of power flow equations is exact for the distribution networks that exhibit a radial graph structure under mild conditions. The power flow equations model the non-linear relation of active and reactive power transported along a line with the current and terminal node voltages. While active power is the actual quantity in MWh of power produced or consumed, reactive power is a necessary component oscillating within the network and regulates voltage across the nodes. Consider a power line $\ell = (n, n') \in \mathcal{L}$ connecting adjacent nodes $n, n' \in \mathcal{N}$. Let $s_\ell^a \in \mathbb{R}$ and $s_\ell^r \in \mathbb{R}$ denote the active power and reactive power; $\theta_\ell \in \mathbb{R}_+$ and $v_n \in \mathbb{R}_+$ denote the squared magnitude of current flow in the line $\ell$ and the squared voltage magnitude at the node $n$, respectively. The SOC relaxation for the power flow equations $\forall \ell = (n, n') \in \mathcal{L}$ is

$$s_{\ell}^{a2} + s_{\ell}^{r2} \leq \theta_{\ell} v_{n} \qquad (\text{EC.2a})$$

$$s_{\ell}^{a2} + s_{\ell}^{r2} \leq \bar{s}_{\ell}^{2}, \qquad (\text{EC.2b})$$

where $\bar{s}_\ell \in \mathbb{R}_+$ is a parameter denoting the rated power transfer capacity of line $\ell$. Constraints (EC.2) can be reformulated as SOC constraints admitting the variables $[s_\ell^a \quad s_\ell^r \quad \theta_\ell \quad v_n]^\top$. For instance, (EC.2a) is equivalent to an SOC constraint of the general form (??) with the parameters

$$\mathbf{A} = \begin{bmatrix} 2 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & 1 & -1 \end{bmatrix}, \quad \mathbf{b} = \mathbf{0}_3, \quad \mathbf{d} = \begin{bmatrix} 0 & 0 & 1 & 1 \end{bmatrix}^\top \text{ and } e = 0,$$

which is a four-dimensional SOC constraint. Similarly, (EC.2b) is a three-dimensional SOC constraint with a structure similar that in Example ??.

## EC.2. Market-clearing Problems

For the uncertainty-aware conic market framework proposed in the paper, we first outline the participant models in §EC.2.1, followed by the chance-constrained market-clearing problem and its reformulation as the SOCP problem $\mathcal{M}^{cc}$ in §EC.2.2. In §EC.2.3 we provide formulations for the two LP-based uncertainty-aware benchmark market-clearing problems, $\mathcal{R}1$ and $\mathcal{R}2$. Finally, §EC.2.4 formulates the real-time market-clearing problem entailed in the out-of-sample simulation studies discussed in ??.

### EC.2.1. Modeling of Market Participants

To enhance the clarity of exposition, we define subsets of market participants $\mathcal{I}$ comprised of flexible power producers $\mathcal{F} \subseteq \mathcal{I}$, energy storage owners $\mathcal{S} \subseteq \mathcal{I}$ and inflexible consumers $\mathcal{D} \subseteq \mathcal{I}$.
Let the uncertainty faced by the market-clearing problem arise from a set of weather-dependent renewable power producers $W \subseteq \mathcal{I}$, such that $\mathcal{F} \cup \mathcal{S} \cup \mathcal{D} \cup W = \mathcal{I}$ and $\mathcal{F} \cap \mathcal{S} \cap \mathcal{D} \cap W = \emptyset$. We consider consumers to be inflexible. However, the methodology adopted in this paper is extendable to include demand-side flexibility providers.

**Weather-dependent power producers:** At the day-ahead stage, the stochastic power production $\tilde{q}_{it} \in \mathbb{R}$ from weather-dependent power producers $i \in W = \{1, 2, \dots, W\}$ are modeled as

$$ \tilde{q}_{it}(\xi_t) = \hat{q}_{it} - \xi_{it}, \forall i \in W, \forall t, \qquad (\text{EC.3}) $$

where $\hat{q}_{it} \in \mathbb{R}$ is the nominal production, usually in the form of the best-available day-ahead forecast, while the random variable $\xi_{it} \in \mathbb{R}$ is the forecast error encountered by producer $i$ at hour $t$. The stochastic power production $\tilde{q}_{it}$ has an upper bound given by the rated power production capacity $\overline{Q}_i$, while being bounded below by $\underline{Q}_i = 0$. The vector $\xi = [\xi_{11} \ \xi_{21} \ \dots \ \xi_{Wt} \ \dots \ \xi_{WT}]^\top \in \mathbb{R}^{WT}$ denotes the overall uncertainty faced by the market-clearing problem, formed by extending $\xi_t \in \mathbb{R}^W$, as defined in Example ??, to a multi-period setting. We assume that $\xi$ follows an unknown multivariate probability distribution $P_\xi$, characterized by mean $\mu \in \mathbb{R}^{WT}$ and covariance $\Sigma \in \mathbb{R}^{WT \times WT}$, which are estimated by the system operator having an access to a finite number of historical measurement samples. Without much loss of generality, we assume the distribution $P_\xi$ to have a mean $\mu = 0$, as any non-zero elements of the sample mean are used to update the forecast $\hat{q}_{it}$ in (EC.3). The structure of $\Sigma$ is such that its diagonal blocks, comprised of sub-matrices, $\Sigma_t \in \mathbb{R}^{W \times W}$, $\forall t$, capture the spatial correlation among the forecast errors at hour $t$, while the off-diagonal blocks contain information about spatio-temporal correlation of uncertainty<fnref n="1" />. The net deviation from the day-ahead forecasts realized during real-time operation at hour $t$ is thus given by $1^\top \xi_t \in \mathbb{R}$. As a sign convention, $1^\top \xi_t > 0$ implies a deficit of production from renewable energy sources during real-time operation stage as compared to the day-ahead forecast. Weather-dependent power producers are associated with a decision vector $q_{it} = [\hat{q}_{it} \ \xi_{it}]^\top$, $\forall t, \forall i \in W$ such that participation in the two commodities traded in the market is determined as follows. For the commodity energy, i.e., $p=1$, the contribution is given by

$$ q_{ip} = [\hat{q}_{i1} \ \hat{q}_{i2} \ \dots \ \hat{q}_{i(T-1)} \ \hat{q}_{iT}]^\top, \quad G_{ip} = \text{diag}(1), \forall i \in W, $$

<footnote n="1">¹ Under probability distribution other than multivariate Gaussian distribution, considered in ??, the analytical approximation of chance-constrained program as a deterministic SOCP problem relies on independence of the random variables (?), i.e., the covariance matrix $\Sigma$ must be modeled as a diagonal matrix, neglecting any spatio-temporal correlation.</footnote>
where $1 \in \mathbb{R}^T$. For $p=2$, i.e., flexibility, the weather-dependent power producers are modeled as the uncertainty sources

$$ q_{ip} = 1, \quad G_{ip} = - \begin{bmatrix} 1^{\top} \boldsymbol{\xi}_1 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 1^{\top} \boldsymbol{\xi}_T \end{bmatrix}, \quad \forall i \in \mathcal{W}, $$

where $1 \in \mathbb{R}^T$ and the negative sign arises from the convention adopted in (EC.3).

**Flexible power producers:** For each flexible power producer $i \in \mathcal{F}$, we model the stochastic power production during real-time operation at hour $t$ as

$$ \tilde{q}_{it}(\xi_t) = \hat{q}_{it} + h_{it}(\xi_t), \quad \forall i \in \mathcal{F}, \forall t, \qquad (\text{EC.4}) $$

where $\hat{q}_{it}$ denotes the nominal production and the function $h_{it}(\xi_t) : \mathbb{R}^W \to \mathbb{R}$ is the adjustment policy allocated to the market participant $i$, encoding its share in the recourse actions needed to mitigate the net deviation in the electricity system arising from forecast errors realized at hour $t$. Typically, these adjustment policies $h_{it}(\xi_t)$ represent convex decision rules, which may be linear (Georghiou et al. 2019) or generalized (Georghiou et al. 2015). In this work, we adopt adjustment policies affinely dependent on the total uncertainty faced by the system operator, such that

$$ h_{it}(\xi_t) = 1^{\top} \boldsymbol{\xi}_t \alpha_{it}, \quad \forall i \in \mathcal{F}, \forall t, $$

where $\alpha_{it}$ is the adjustment policy allocated to participant $i$ at hour $t$. The nominal production quantity $\hat{q}_{it}$ and the policy $\alpha_{it}$ are optimally decided by the day-ahead market-clearing program. Recalling Example ??, we write chance constraints limiting the production from participants to their uppers limit $\bar{Q}_i$ as

$$ \mathbb{P}_{\xi} \left( \hat{q}_{it} + 1^{\top} \boldsymbol{\xi}_t \alpha_{it} \le \bar{Q}_i \right) \ge (1 - \hat{\varepsilon}), \quad \forall t, \forall i \in \mathcal{F}, \qquad (\text{EC.5a}) $$

which is reformulated as a $W+1$-dimensional SOC constraint

$$ r_{\hat{\varepsilon}} \| \mathbf{X}_t 1_{\alpha_{it}} \| \le \bar{Q}_i - \hat{q}_{it}, \quad \forall t, \forall i \in \mathcal{F}, \qquad (\text{EC.5b}) $$

where $\mathbf{X}_t \in \mathbb{R}^{W \times W}$ is obtained by Cholesky decomposition of the submatrix $\boldsymbol{\Sigma}_t$ of the covariance matrix $\boldsymbol{\Sigma}$ such that $\boldsymbol{\Sigma}_t = \mathbf{X}_t \mathbf{X}_t^\top$. Recall that the parameter $r_{\hat{\varepsilon}}$ is a safety parameter, related to constraint violations, chosen by the system operator based on the knowledge of distribution $\mathbb{P}_{\xi}$, such that $r_{\hat{\varepsilon}}$ increases as $\hat{\varepsilon}$ decreases. Similar reformulation is obtained for the lower bounds on the production, $\underline{Q}_i$. Apart from the production bounds, a flexible power producer may have capacity bounds on the flexibility provision, denoted by $\underline{Q}_i^R$, $\bar{Q}_i^R$, which are reformulated in a similar manner.
<figure><img src="image_9.png" /><figcaption>Figure EC.1 Illustration of the operation of an energy storage unit for flexibility provision.</figcaption></figure>

Lastly, inter-temporal constraints such as the limits on the downward and upward ramping rates $\Delta_i, \bar{\Delta}_i \in \mathbb{R}$ are modeled as

$$ \mathbb{P}_{\xi} \left( (\hat{q}_{it} + 1^{\top} \boldsymbol{\xi}_t \alpha_{it}) - (\hat{q}_{i(t-1)} + 1^{\top} \boldsymbol{\xi}_{t-1} \alpha_{i(t-1)}) \geq -\Delta_i \right) \geq (1 - \hat{\varepsilon}), \forall t > 2, \forall i \in \mathcal{F} \quad (\text{EC.6a}) $$

$$ \mathbb{P}_{\xi} \left( (\hat{q}_{it} + 1^{\top} \boldsymbol{\xi}_t \alpha_{it}) - (\hat{q}_{i(t-1)} + 1^{\top} \boldsymbol{\xi}_{t-1} \alpha_{i(t-1)}) \leq \bar{\Delta}_i \right) \geq (1 - \hat{\varepsilon}), \forall t > 2, \forall i \in \mathcal{F} \quad (\text{EC.6b}) $$

and reformulated as 2W + 1-dimensional SOC constraints of the form

$$ r_{\hat{\varepsilon}} \left\| \mathbf{X}_{t-1:t} \left[ \begin{array}{c} 1^{\top} \alpha_{i(t-1)} - 1^{\top} \alpha_{it} \end{array} \right]^{\top} \right\| \leq \Delta_i - (\hat{q}_{it-1} - \hat{q}_{it}), \forall t > 2, \forall i \in \mathcal{F} \quad (\text{EC.6c}) $$

$$ r_{\hat{\varepsilon}} \left\| \mathbf{X}_{t-1:t} \left[ \begin{array}{c} -1^{\top} \alpha_{i(t-1)} & 1^{\top} \alpha_{it} \end{array} \right]^{\top} \right\| \leq \bar{\Delta}_i + (\hat{q}_{it-1} - \hat{q}_{it}), \forall t > 2, \forall i \in \mathcal{F}, \quad (\text{EC.6d}) $$

where $\mathbf{X}_{t-1:t} \in \mathbb{R}^{2W \times 2W}$ denotes the factorization of the blocks of covariance matrix $\boldsymbol{\Sigma}$ corresponding to the spatio-temporal covariance of forecast errors in two consecutive hours. Flexible power producers participate in the conic market with decision vectors $\mathbf{q}_{it} = [\hat{q}_{it} \quad \alpha_{it}]^{\top}, \forall t, \forall i \in \mathcal{F}$. Towards the commodity energy, i.e., $p=1$, flexible generators contribute as

$$ \mathbf{q}_{ip} = [\hat{q}_{i1} \quad \hat{q}_{i2} \quad \dots \quad \hat{q}_{i(T-1)} \quad \hat{q}_{iT}]^{\top}, \quad \mathbf{G}_{ip} = \mathrm{diag}(1), \forall i \in \mathcal{F}, $$

with $1 \in \mathbb{R}^T$. For the commodity flexibility ($p=2$), the contribution is given by

$$ \mathbf{q}_{ip} = [\alpha_{i1} \quad \alpha_{i2} \quad \dots \quad \alpha_{i(T-1)} \quad \alpha_{iT}]^{\top}, \quad \mathbf{G}_{ip} = \begin{bmatrix} 1^{\top} \boldsymbol{\xi}_1 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 1^{\top} \boldsymbol{\xi}_T \end{bmatrix}, \forall i \in \mathcal{F}. $$

**Energy storage operators:** For each energy storage unit $s \in \mathcal{S}$, the power produced or consumed during real-time operation at hour $t$ is given by

$$ \tilde{q}_{it}(\boldsymbol{\xi}_t) = \hat{q}_{it} + 1^{\top} \boldsymbol{\xi}_t \gamma_{it}, \forall i \in \mathcal{S}, \forall t, \quad (\text{EC.7}) $$
where $\hat{q}_{it}$ is the nominal production/consumption and $\gamma_{it}$ is the affine adjustment policy allocated. We adopt the sign convention $\tilde{q}_{it}(\xi_t) > 0$ for hours when the storage is discharging (production), while $\tilde{q}_{it}(\xi_t) < 0$ indicates charging (consumption). In practice, energy storage units are limited by their charging and discharging capacities which are modeled using chance constraints as

$$ \mathbb{P}_{\xi} \left( \hat{q}_{it} + 1^{\top} \xi_t \gamma_{it} \le \eta_i^{\mathrm{D}} \overline{Q}_i^{\mathrm{D}} \right) \ge (1 - \hat{\varepsilon}), \quad \forall t, \forall i \in \mathcal{S} \qquad (\mathrm{EC}.8\mathrm{a}) $$

$$ \mathbb{P}_{\xi} \left( \hat{q}_{it} + 1^{\top} \xi_t \gamma_{it} \ge -\frac{1}{\eta_i^{\mathrm{C}}} \overline{Q}_i^{\mathrm{C}} \right) \ge (1 - \hat{\varepsilon}), \quad \forall t, \forall i \in \mathcal{S} \qquad (\mathrm{EC}.8\mathrm{b}) $$

and are reformulated as $W + 1$-dimensional SOC constraints as

$$ r_{\hat{\varepsilon}} \| \mathbf{X}_t 1 \gamma_{it} \| \le \eta_i^{\mathrm{D}} \overline{Q}_i^{\mathrm{D}} - \hat{q}_{it}, \quad \forall t, \forall i \in \mathcal{S} \qquad (\mathrm{EC}.8\mathrm{c}) $$

$$ r_{\hat{\varepsilon}} \| \mathbf{X}_t 1 \gamma_{it} \| \le \frac{1}{\eta_i^{\mathrm{C}}} \overline{Q}_i^{\mathrm{C}} + \hat{q}_{it}, \quad \forall t, \forall i \in \mathcal{S}, \qquad (\mathrm{EC}.8\mathrm{d}) $$

where $\eta_i^{\mathrm{D}}, \eta_i^{\mathrm{C}} \in [0, 1]$ are energy conversion factors representing discharging and charging efficiencies, while $\overline{Q}_i^{\mathrm{D}}, \overline{Q}_i^{\mathrm{C}} \in \mathbb{R}$ are, respectively, the maximum discharging and charging capacities of the energy storage unit $i \in \mathcal{S}$. Inter-temporal constraints are critical for energy storage units to ensure that (i) the storage operation trajectory remains within the limits of state of charge, and (ii) the storage unit is neither depleted nor over-charged at the end of market-clearing horizon. While the former ensures safe operation of the storage unit within its operational limits, the latter is relevant in a market-clearing setup where the storage unit is expected to provide flexibility to the grid on an ongoing basis. Figure EC.1 shows the trajectory (in red) of energy content of a storage unit. At each hour, the changes to energy content due to production (discharging) or consumption (charging) by the storage unit is given by $\tilde{q}_{it}(\xi_t)$, with the rate of change being limited by the charging and discharging power limits in (EC.8). The energy content of a storage unit evolves as

$$ \mathbb{P}_{\xi} \left( E_i^0 - \sum_{t'=1}^{t} (\hat{q}_{it'} + 1^{\top} \xi_t \gamma_{it'}) \le \overline{E}_i \right) \ge (1 - \hat{\varepsilon}), \quad \forall t, \forall i \in \mathcal{S} \qquad (\mathrm{EC}.9\mathrm{a}) $$

$$ \mathbb{P}_{\xi} \left( E_i^0 - \sum_{t'=1}^{t} (\hat{q}_{it'} + 1^{\top} \xi_t \gamma_{it'}) \ge \underline{E}_i \right) \ge (1 - \hat{\varepsilon}), \quad \forall t, \forall i \in \mathcal{S}, \qquad (\mathrm{EC}.9\mathrm{b}) $$

which are reformulated as $W \times t + 1$, $\forall t$-dimensional SOC constraints, expressed as

$$ r_{\hat{\varepsilon}} \left\| \mathbf{X}_{1:t} \left[ 1^{\top} \gamma_{i1} \quad 1^{\top} \gamma_{i2} \quad \dots \quad 1^{\top} \gamma_{it} \right]^{\top} \right\| \le \overline{E}_i - E_i^0 + \sum_{t'=1}^{t} \hat{q}_{it'}, \quad \forall t, \forall i \in \mathcal{S} \qquad (\mathrm{EC}.9\mathrm{c}) $$

$$ r_{\hat{\varepsilon}} \left\| \mathbf{X}_{1:t} \left[ 1^{\top} \gamma_{i1} \quad 1^{\top} \gamma_{i2} \quad \dots \quad 1^{\top} \gamma_{it} \right]^{\top} \right\| \le E_i^0 - \underline{E}_i - \sum_{t'=1}^{t} \hat{q}_{it'}, \quad \forall t, \forall i \in \mathcal{S}, \qquad (\mathrm{EC}.9\mathrm{d}) $$

where $E_i^0 \in \mathbb{R}$ is the energy content at $t=0$ and $\underline{E}_i, \overline{E}_i \in \mathbb{R}$ are the minimum and maximum energy storage capacity of the storage unit, respectively, such that $E_i^0 \in [\underline{E}_i, \overline{E}_i]$. Furthermore, to
ensure the ongoing market-participation of the storage unit, we utilize the concept of end-of-horizon energy neutrality. We define lower and upper bounds, $\underline{B}_i$, $\overline{B}_i \in \mathbb{R}$ respectively, around the initial energy stored $E_i^0$ to reflect the preference of the energy storage owner on the energy content at the end of market-clearing horizon, see Figure EC.1. This ensures the end-of-horizon energy content to be within $[E_i^0 - \underline{B}_i, E_i^0 + \overline{B}_i]$. These preferences are captured through chance constraints

$$ \mathbb{P}_{\xi} \left( E_i^0 - \sum_{t'=1}^{T} (\hat{q}_{it'} + 1^{\top} \boldsymbol{\xi}_t \gamma_{it'}) \le E_i^0 + \overline{B}_i \right) \ge (1 - \hat{\varepsilon}), \quad \forall i \in \mathcal{S} \quad (\text{EC}.10a) $$

$$ \mathbb{P}_{\xi} \left( E_i^0 - \sum_{t'=1}^{T} (\hat{q}_{it'} + 1^{\top} \boldsymbol{\xi}_t \gamma_{it'}) \ge E_i^0 - \underline{B}_i \right) \ge (1 - \hat{\varepsilon}), \quad \forall i \in \mathcal{S} \quad (\text{EC}.10b) $$

which are reformulated as $W \times T + 1$-dimensional SOC constraints, expressed as

$$ r_{\hat{\varepsilon}} \left\| \mathbf{X}_{1:T} \begin{bmatrix} 1^{\top} \gamma_{i1} & 1^{\top} \gamma_{i2} & \cdots & 1^{\top} \gamma_{iT} \end{bmatrix}^{\top} \right\| \le \overline{B}_i + \sum_{t'=1}^{T} \hat{q}_{it'}, \quad \forall i \in \mathcal{S} \quad (\text{EC}.10c) $$

$$ r_{\hat{\varepsilon}} \left\| \mathbf{X}_{1:T} \begin{bmatrix} 1^{\top} \gamma_{i1} & 1^{\top} \gamma_{i2} & \cdots & 1^{\top} \gamma_{iT} \end{bmatrix}^{\top} \right\| \le \underline{B}_i - \sum_{t'=1}^{T} \hat{q}_{it'}, \quad \forall i \in \mathcal{S}. \quad (\text{EC}.10d) $$

Each energy storage operators participates in the conic market with a decision vector $\mathbf{q}_{it} = [\hat{q}_{it} \ \gamma_{it}]^{\top}, \forall t, \forall i \in \mathcal{S}$. Likewise, towards the commodity energy, i.e., $p=1$, we have

$$ \mathbf{q}_{ip} = [\hat{q}_{i1} \ \hat{q}_{i2} \ \dots \ \hat{q}_{i(T-1)} \ \hat{q}_{iT}]^{\top}, \quad \mathbf{G}_{ip} = \text{diag}(1), \quad \forall i \in \mathcal{S}, $$

with $1 \in \mathbb{R}^T$. For the commodity flexibility ($p=2$), the storage unit contributes to the trades as

$$ \mathbf{q}_{ip} = [\gamma_{i1} \ \gamma_{i2} \ \dots \ \gamma_{i(T-1)} \ \gamma_{iT}]^{\top}, \quad \mathbf{G}_{ip} = \begin{bmatrix} 1^{\top} \boldsymbol{\xi}_1 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 1^{\top} \boldsymbol{\xi}_T \end{bmatrix}, \quad \forall i \in \mathcal{S}. $$

**Inflexible consumers:** For each inflexible consumer $d \in \mathcal{D}$, the power consumed during real-time operation at hour $t$ is given by $\tilde{q}_{it}(\boldsymbol{\xi}_t) = \hat{q}_{it}, \forall i \in \mathcal{D}, \forall t$, where $\hat{q}_{it} \in \mathbb{R}_-$ is the power demand by consumer $d \in \mathcal{D}$. The above modeling can be extended to include flexible consumers that may respond to the uncertainty by reducing/increasing their consumption based on an affine adjustment policy, similar to flexible generators and energy storage units. However, for clarity of exposition, this paper is restricted to modeling inflexible and perfectly inelastic demand. Each consumer contributes towards the trades of commodity energy, i.e., for $p=1$, as

$$ \mathbf{q}_{ip} = [\hat{q}_{i1} \ \hat{q}_{i2} \ \dots \ \hat{q}_{i(T-1)} \ \hat{q}_{iT}]^{\top}, \quad \mathbf{G}_{ip} = \text{diag}(1), \quad \forall i \in \mathcal{S}, $$

where $1 \in \mathbb{R}^T$. Lastly, for $p=2$, considering inflexible consumers, we have $\mathbf{q}_{ip} = \mathbf{0}, \mathbf{G}_{ip} = \mathbf{0}, \forall i \in \mathcal{D}$.
### EC.2.2. Chance-constrained Market Clearing

In the following, we formulate the chance-constrained market-clearing problem in stochastic optimization variables $\tilde{q}_{it}(\xi_t)$, $\forall i \in \mathcal{I}$ which are functions of the random variable $\xi_t$. We drop this dependency for notational convenience, yet it is always implied.

$$ \min_{\tilde{q}_{it}} \quad \mathbb{E}^{\mathbb{P}_{\xi}} \left[ \sum_{i \in \mathcal{I} \setminus \mathcal{D}} \sum_{t \in \mathcal{T}} \left( c_{it}^{\mathrm{Q}} \tilde{q}_{it}^{2} + c_{it}^{\mathrm{L}} \tilde{q}_{it} \right) \right] \qquad (\mathrm{EC}.11\mathrm{a}) $$

$$ \text{s.t.} \quad \mathbb{P}_{\xi} \left[ \sum_{i \in \mathcal{I}} \mathbf{G}_{ip} \tilde{q}_{ip} = \mathbf{0}_{T}, \forall p \in \mathcal{P}, \right] \stackrel{\text{a.s.}}{=} 1, \qquad (\text{EC}.11\text{b}) $$

$$ \mathbb{P}_{\xi} \left[ \begin{array}{l} \underline{Q}_i \le \tilde{q}_{it} \le \bar{Q}_i, \forall t, \forall i \in \mathcal{F} \cup \mathcal{W} \\ - \underline{Q}_i^R \le h_{it}(\xi_t) \le \bar{Q}_i^R, \forall i \in \mathcal{F} \\ - \underline{\Delta}_i \le \tilde{q}_{it} - \tilde{q}_{i(t-1)} \le \bar{\Delta}_i, \forall t > 2, \forall i \in \mathcal{F} \\ - \frac{1}{\eta_i^C} \bar{Q}_i^C \le \tilde{q}_{it} \le \eta_i^D \bar{Q}_i^D, \forall t, \forall i \in \mathcal{S} \\ \underline{E}_i \le E_i^0 - \sum_{t'=1}^t \tilde{q}_{it'} \le \bar{E}_i, \forall t, \forall i \in \mathcal{S} \\ E_i^0 - \underline{B}_i \le E_i^0 - \sum_{t'=1}^T \tilde{q}_{it'} \le E_i^0 + \bar{B}_i, \forall i \in \mathcal{S} \\ - \bar{s}_{\ell} \le \sum_{n \in \mathcal{N}} [\Psi]_{(\ell,n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \tilde{q}_{ip}]_t \right) \le \bar{s}_{\ell}, \forall t, \forall \ell \in \mathcal{L} \end{array} \right] \ge 1 - \varepsilon, \qquad (\text{EC}.11\text{c}) $$

where the objective function (EC.11a) minimizes the expected cost, which is equivalent to minimizing negative social welfare when facing an inflexible and perfectly inelastic demand. The almost sure (a. s.) constraint (EC.11b) ensures the satisfaction of the supply-demand balance constraint for both commodities with a probability of 1, whereas the chance constraint (EC.11c) ensures the inequalities are jointly met with a probability of $(1 - \varepsilon)$. The prescribed constraint violation probability $\varepsilon \in (0, 1)$ reflects risk tolerance of the system operator towards the violation of technical limits of the system and in our numerical studies discussed in ??, we set $\varepsilon = 0.05$. The chance-constrained market-clearing problem (EC.11) is computationally intractable since it involves infinitely many constraints arising from the uncertain production from weather-dependent power producers. We gain tractability by expressing the stochastic variables $\tilde{q}_{it}$, $\forall i$, $\forall t$ as affine, finite-dimensional functions of the random variable $\xi$ as discussed in the previous section, resulting in an approximate solution to the infinite-dimensional problem. In the following, we discuss the reformulations to reach the final tractable SOCP-based chance-constrained market-clearing problem.

**Reformulation of joint chance constraint:** Observe that (EC.11c) models a joint violation of the constraints, in contrast to the individual chance constraints discussed so far. In this paper, following the Bonferroni approximation of joint chance constraints (Xie et al. 2019), we adopt a
consideration of individual chance constraints with the analytical parameterization of risk. Let $N^{\text{ineq}}$ denote the number of individual inequalities forming the joint chance constraint (EC.11c), such that $\hat{\varepsilon} \in \mathbb{R}_+^{N^{\text{ineq}}}$ collects all the individual violation probabilities for the inequality constraints. The Bonferroni reformulation of joint chance constraint mandates that the individual constraint violation probabilities be chosen such that $1^{\top}\hat{\varepsilon} \le \varepsilon$. Furthermore, this approach provides a joint constraint feasibility guarantee even if the choice of individual probabilities is done trivially, e.g., $\hat{\varepsilon}$ is chosen such that $\hat{\varepsilon}_k = \frac{\varepsilon}{N^{\text{ineq}}}$, $\forall k = 1, 2, \dots, N^{\text{ineq}}$. We compute the individual constraint violation probabilities in this manner and adopt the SOC reformulation techniques for individual chance constraints discussed so far.

**Reformulation of almost sure constraint:** The almost sure constraint (EC.11b) must be held at the optimal solution to (EC.11) with a probability of 1. Considering the affine dependency of the stochastic decision variables $\tilde{q}_{it}$, $\forall i, \forall t$ with respect to the random variables $\xi_t$, this amounts to a separation of (EC.11b) into nominal and recourse equalities. Corresponding to the two commodities energy and flexibility, these equalities are given by

$$ \sum_{i \in \mathcal{I}} \mathbf{G}_{ip} \mathbf{q}_{ip} = \mathbf{0}, \quad p=1 \qquad (\text{EC.12a}) $$

$$ \sum_{i \in \mathcal{I} \setminus (W \cup D)} \mathrm{diag}(\mathbf{1}) \mathbf{q}_{ip} = \mathbf{1}, \quad p=2. \qquad (\text{EC.12b}) $$

**Power flow limits:** Apart from the participant-specific chance constraints discussed so far, the constraints limiting the power flows in the network are

$$ \mathbb{P}_{\xi} \left[ \sum_{n \in \mathcal{N}} [\Psi]_{(\ell, n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \tilde{\mathbf{q}}_{ip}]_t \right) \le \bar{s}_{\ell} \right] \ge 1 - \hat{\varepsilon}, \quad \forall t, \forall \ell \in \mathcal{L} \qquad (\text{EC.13a}) $$

$$ \mathbb{P}_{\xi} \left[ \sum_{n \in \mathcal{N}} [\Psi]_{(\ell, n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{p \in \mathcal{P}} [\mathbf{G}_{ip} \tilde{\mathbf{q}}_{ip}]_t \right) \ge -\bar{s}_{\ell} \right] \ge 1 - \hat{\varepsilon}, \quad \forall t, \forall \ell \in \mathcal{L}, \qquad (\text{EC.13b}) $$

which require tractable reformulations. In the following, we illustrate the reformulation of (EC.13a) as an SOC constraint and adopt a similar approach for the other flow direction. First, we rewrite (EC.13a) such that nominal and uncertainty-dependent terms are separable. To that end, we define auxiliary network matrices $\Psi^F \in \mathbb{R}^{N \times |\mathcal{F}|}$, $\Psi^S \in \mathbb{R}^{N \times |S|}$, $\Psi^W \in \mathbb{R}^{N \times W}$ and $\Psi^D \in \mathbb{R}^{N \times |D|}$ which map the flexible power producers, energy storage units, weather-dependent power producers and consumers, respectively, to the electricity network nodes. We collect all commodity contributions by participant groups at a given hour by defining auxiliary variables $\tilde{\mathbf{q}}_t^F$, $\hat{\mathbf{q}}_t^F$, $\alpha_t \in \mathbb{R}^{|\mathcal{F}|}$ to denote the stochastic production, nominal production and the adjustment policies for the flexible power producers, $\tilde{\mathbf{q}}_t^S$, $\hat{\mathbf{q}}_t^S$, $\gamma_t \in \mathbb{R}^{|S|}$ to denote stochastic production, nominal production and adjustment policies for the storage units, $\hat{\mathbf{q}}_t^W \in \mathbb{R}^W$ for the forecasted production from weather-dependent
power producers and lastly, $\hat{q}_t^D \in \mathbb{R}^{|D|}$ for the inflexible demand from consumers. With that, we rewrite (EC.13a) as

$$ \mathbb{P}_{\xi} \left[ \left[ \Psi(\Psi^F \tilde{q}_t^F + \Psi^S \tilde{q}_t^S + \Psi^W (\tilde{q}_t^W - \xi_t) + \Psi^D \hat{q}_t^D) \right]_{\ell} \le \bar{s}_{\ell} \right] \ge 1 - \hat{\varepsilon}, \forall t, \forall \ell \in \mathcal{L}, \quad (\text{EC.14}) $$

which we then reformulate as an SOC constraint after separating the nominal and uncertainty-dependent terms. The final SOC reformulation for (EC.13a) results in $\forall t, \forall \ell \in \mathcal{L}$,

$$ r_{\hat{\varepsilon}} \| \mathbf{X}_t [\Psi(\Psi^F \alpha_t \mathbf{1}^T + \Psi^S \gamma_t \mathbf{1}^T - \Psi^W)]_{(\ell, :)}^T \| \le \bar{s}_{\ell} - [\Psi(\Psi^F \hat{q}_t^F + \Psi^S \hat{q}_t^S + \Psi^W \hat{q}_t^W + \Psi^D \hat{q}_t^D)]_{\ell}. \quad (\text{EC.15}) $$

**Objective function reformulation:** We decompose the objective (EC.11a) among the various participants and expand the stochastic term to its nominal and recourse values to obtain

$$ \mathbb{E}^{\mathbb{P}_{\xi}} \left[ \underbrace{\sum_{i \in \mathcal{F}} \sum_{t \in \mathcal{T}} (c_{it}^{\mathrm{Q}}(\hat{q}_{it} + \mathbf{1}^{\top} \boldsymbol{\xi}_t \alpha_{it})^2 + c_{it}^{\mathrm{L}}(\hat{q}_{it} + \mathbf{1}^{\top} \boldsymbol{\xi}_t \alpha_{it}))}_{\text{Term A}} + \underbrace{\sum_{i \in \mathcal{S}} \sum_{t \in \mathcal{T}} (c_{it}^{\mathrm{Q}}(\hat{q}_{it} + \mathbf{1}^{\top} \boldsymbol{\xi}_t \gamma_{it})^2 + c_{it}^{\mathrm{L}}(\hat{q}_{it} + \mathbf{1}^{\top} \boldsymbol{\xi}_t \gamma_{it}))}_{\text{Term B}} + \underbrace{\sum_{i \in \mathcal{W}} \sum_{t \in \mathcal{T}} (c_{it}^{\mathrm{Q}}(\hat{q}_{it} - \boldsymbol{\xi}_t)^2 + c_{it}^{\mathrm{L}}(\hat{q}_{it} - \boldsymbol{\xi}_t))}_{\text{Term C}} \right]. $$

Linearity of the expectation operator allows us to separate the cost terms and we rewrite the cost of flexible generators, i.e., Term A as

$$ \sum_{i \in \mathcal{F}} \sum_{t \in \mathcal{T}} \left( c_{it}^{\mathrm{Q}} \hat{q}_{it}^2 + c_{it}^{\mathrm{Q}} \mathbb{E}^{\mathbb{P}_{\xi}} [(\mathbf{1}^{\top} \boldsymbol{\xi}_t)^2] \alpha_{it}^2 + 2 \hat{q}_{it} c_{it}^{\mathrm{Q}} \mathbb{E}^{\mathbb{P}_{\xi}} [\mathbf{1}^{\top} \boldsymbol{\xi}_t] \alpha_{it} + c_{it}^{\mathrm{L}} \hat{q}_{it} + c_{it}^{\mathrm{L}} \mathbb{E}^{\mathbb{P}_{\xi}} [\mathbf{1}^{\top} \boldsymbol{\xi}_t] \alpha_{it} \right). $$

The zero-mean assumption made on $\boldsymbol{\xi}_t$ factors out the terms last two terms under the expectation operator. As discussed in Bienstock et al. (2014), the first term under expectation operator can be reformulated as the variance of $\boldsymbol{\xi}_t$, i.e., $\mathbb{E}^{\mathbb{P}_{\xi}}[(\mathbf{1}^{\top} \boldsymbol{\xi}_t)^2] = \mathrm{var}(\mathbf{1}^{\top} \boldsymbol{\xi}_t) = \mathbf{1}^{\top} \boldsymbol{\Sigma}_t \mathbf{1}$, where $\boldsymbol{\Sigma}_t$ is the covariance matrix as previously discussed. Therefore, the Term A reduces to

$$ \sum_{i \in \mathcal{F}} \sum_{t \in \mathcal{T}} \left( c_{it}^{\mathrm{Q}} \hat{q}_{it}^2 + c_{it}^{\mathrm{Q}} \mathbf{1}^{\top} \boldsymbol{\Sigma}_t \mathbf{1} \alpha_{it}^2 + c_{it}^{\mathrm{L}} \hat{q}_{it} \right). $$

Lastly, following Example EC.1, we reformulate the quadratic cost terms as a rotated SOC constraint in the interest of analytical and computational appeal. Introducing variables $z_{it}^{\hat{q}} \in \mathbb{R}$ and $z_{it}^{\alpha} \in \mathbb{R}$, for any fixed values of $\hat{q}_{it}$ and $\alpha_{it}$, Term A of the objective function retrieves the expected cost by solving the following SOCP problem

$$ \min_{z_{it}^{\hat{q}}, z_{it}^{\alpha}} \sum_{i \in \mathcal{F}} \sum_{t \in \mathcal{T}} \left( z_{it}^{\hat{q}} + z_{it}^{\alpha} + c_{it}^{\mathrm{L}} \hat{q}_{it} \right) \quad (\text{EC.16a}) $$

$$ \text{s.t.} \quad \left\| (c_{it}^{\mathrm{Q}})^{\frac{1}{2}} \hat{q}_{it} \right\|^2 \le z_{it}^{\hat{q}}, \forall t, \forall i \in \mathcal{F} \quad (\text{EC.16b}) $$

$$ \left\| \mathbf{X}_t \mathbf{1} (c_{it}^{\mathrm{Q}})^{\frac{1}{2}} \alpha_{it} \right\|^2 \le z_{it}^{\alpha}, \forall t, \forall i \in \mathcal{F}. \quad (\text{EC.16c}) $$
Term B of the objective function characterizing the cost of operation of energy storage units follows a similar reformulation. For the set of wind power producers, i.e., the cost in Term C, we use the following equivalence to eliminate the expectation operator

$$ \sum_{i \in W} \sum_{t \in T} \left( c_{it}^{Q} \hat{q}_{it}^{2} + c_{it}^{Q} \mathbb{E}^{\mathbb{P}_{\xi}} [\xi_{it}^{2}] + c_{it}^{L} \hat{q}_{it} \right) \Leftrightarrow \sum_{i \in W} \sum_{t \in T} \left( c_{it}^{Q} \hat{q}_{it}^{2} + c_{it}^{Q} \mathrm{tr}[\Sigma_{t}] + c_{it}^{L} \hat{q}_{it} \right). $$

The quadratic term in the expression is then reformulated as a rotated SOC constraint as before. The term $c_{it}^{Q} \mathrm{tr}[\Sigma_{t}]$ is a cost term that is constant, depending on the historical forecast error samples.

Adopting the reformulations of the objective function and the chance constraints, we obtain the final tractable chance-constrained market-clearing problem $\mathcal{M}^{cc}$. Solved centrally by the system operator, the problem $\mathcal{M}^{cc}$ is an SOCP problem that results in optimal market-clearing quantities and prices for both the commodities traded in the market, i.e., energy and flexibility.

$$ \min_{\mathcal{V}^{\text{opt}}, \mathcal{V}^{\text{aux}}} \sum_{i \in \mathcal{I} \setminus \mathcal{D}} \sum_{t \in \mathcal{T}} \left( z_{it}^{\hat{q}_{it}} + c_{it}^{L} \hat{q}_{it} \right) + \sum_{i \in \mathcal{F}} \sum_{t \in \mathcal{T}} z_{it}^{\alpha} + \sum_{i \in \mathcal{S}} \sum_{t \in \mathcal{T}} z_{it}^{\gamma} + \sum_{i \in W} \sum_{t \in \mathcal{T}} c_{it}^{Q} \mathrm{tr}[\Sigma_{t}] \quad (\text{EC.17a}) $$

$$ \text{s.t.} \quad \left\| (c_{it}^{Q})^{\frac{1}{2}} \hat{q}_{it} \right\|^{2} \le z_{it}^{\hat{q}}, \quad \forall t, \forall i \in \mathcal{I} \setminus \mathcal{D} \quad (\text{EC.17b}) $$

$$ \left\| \mathbf{X}_t \mathbf{1} (c_{it}^{Q})^{\frac{1}{2}} \alpha_{it} \right\|^{2} \le z_{it}^{\alpha}, \quad \forall t, \forall i \in \mathcal{F} \quad (\text{EC.17c}) $$

$$ \left\| \mathbf{X}_t \mathbf{1} (c_{it}^{Q})^{\frac{1}{2}} \gamma_{it} \right\|^{2} \le z_{it}^{\gamma}, \quad \forall t, \forall i \in \mathcal{S} \quad (\text{EC.17d}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_t \mathbf{1} \alpha_{it} \| \le \bar{Q}_i - \hat{q}_{it}, \quad \forall t, \forall i \in \mathcal{F} \quad (\text{EC.17e}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_t \mathbf{1} \alpha_{it} \| \le \hat{q}_{it} - \underline{Q}_i, \quad \forall t, \forall i \in \mathcal{F} \quad (\text{EC.17f}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_t \mathbf{1} \alpha_{it} \| \le \bar{Q}_i^R, \quad \forall t, \forall i \in \mathcal{F} \quad (\text{EC.17g}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_t \mathbf{1} \alpha_{it} \| \le \underline{Q}_i^R, \quad \forall t, \forall i \in \mathcal{F} \quad (\text{EC.17h}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_{t-1:t} [-\mathbf{1}^{\top} \alpha_{i(t-1)} \mathbf{1}^{\top} \alpha_{it}]^{\top} \| \le \bar{\Delta}_i + (\hat{q}_{it-1} - \hat{q}_{it}), \quad \forall t > 2, \forall i \in \mathcal{F} \quad (\text{EC.17i}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_{t-1:t} [ \mathbf{1}^{\top} \alpha_{i(t-1)} - \mathbf{1}^{\top} \alpha_{it} ]^{\top} \| \le \Delta_i - (\hat{q}_{it-1} - \hat{q}_{it}), \quad \forall t > 2, \forall i \in \mathcal{F} \quad (\text{EC.17j}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_t \mathbf{1} \gamma_{it} \| \le \eta_i^D \bar{Q}_i^D - \hat{q}_{it}, \quad \forall t, \forall i \in \mathcal{S} \quad (\text{EC.17k}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_t \mathbf{1} \gamma_{it} \| \le \frac{1}{\eta_i^C} \bar{Q}_i^C + \hat{q}_{it}, \quad \forall t, \forall i \in \mathcal{S} \quad (\text{EC.17l}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_{1:t} [ \mathbf{1}^{\top} \gamma_{i1} \quad \mathbf{1}^{\top} \gamma_{i2} \quad \dots \quad \mathbf{1}^{\top} \gamma_{it} ]^{\top} \| \le \bar{E}_i - E_i^0 + \sum_{t'=1}^{t} \hat{q}_{it'}, \quad \forall t, \forall i \in \mathcal{S} \quad (\text{EC.17m}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_{1:t} [ \mathbf{1}^{\top} \gamma_{i1} \quad \mathbf{1}^{\top} \gamma_{i2} \quad \dots \quad \mathbf{1}^{\top} \gamma_{iT} ]^{\top} \| \le E_i^0 - \underline{E}_i - \sum_{t'=1}^{t} \hat{q}_{it'}, \quad \forall t, \forall i \in \mathcal{S} \quad (\text{EC.17n}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_{1:T} [ \mathbf{1}^{\top} \gamma_{i1} \quad \mathbf{1}^{\top} \gamma_{i2} \quad \dots \quad \mathbf{1}^{\top} \gamma_{iT} ]^{\top} \| \le \bar{B}_i + \sum_{t'=1}^{T} \hat{q}_{it'}, \quad \forall i \in \mathcal{S} \quad (\text{EC.17o}) $$

$$ r_{\hat{\epsilon}} \| \mathbf{X}_{1:T} [ \mathbf{1}^{\top} \gamma_{i1} \quad \mathbf{1}^{\top} \gamma_{i2} \quad \dots \quad \mathbf{1}^{\top} \gamma_{iT} ]^{\top} \| \le \underline{B}_i - \sum_{t'=1}^{T} \hat{q}_{it'}, \quad \forall i \in \mathcal{S} \quad (\text{EC.17p}) $$