A Decision Model for an Electricity Retailer With Energy Storage and Virtual Bidding Under Daily and Hourly CVaR Assessment

This paper presents a short-term decision-making model for an electricity retailer with battery energy storage system (BESS) and virtual bidding through a two-stage stochastic optimization framework. In the first stage, the retailer determines the amount of power to be purchased in the day-ahead wholesale market and the optimal incremental and decremental virtual bidding strategies. In the second stage, the optimal energy storage decisions and the retailer’s involvement in the real-time market are determined. The proposed model minimizes the retailer’s expected procurement cost and generates the optimal power and virtual bidding curves in the day-ahead market. Two types of Conditional Value at Risk (CVaR) are integrated in the proposed model to manage the retailer’s hourly and daily risks, respectively. Case studies with real-world data are performed to verify the retailer’s cost reduction obtained with the integration of BESS and virtual bidding and to study how the hourly and daily risk-management strategies affect the retailer’s procurement cost distribution for different risk-aversion levels.


Indices and Sets t
Index for time periods, running from 1 to T . ω Index for scenarios, running from 1 to . Many countries around the world have partially or fully deregulated their electricity markets in order to promote greater liberalization, competition, and innovation and better quality of services [1]. In deregulated retail electricity markets, end-user consumers are able to choose from different suppliers, energy sources and services, and still be served by the existing poles, distribution lines, and substations, which are maintained by one local utility company. In Europe, nearly 30 countries have adopted deregulated retail electricity markets [1]. In the United States, more than 20 states have implemented full or partial retail competition, also known as retail choice, which allow customers in the distribution grid to choose their electricity supplier [2]. According to a study conducted by the Federal Reserve Bank of Dallas [3], the adoption of competitive retail electricity markets in the United States contributed to lower electricity rates to end customers in states with high customer participation. Furthermore, the retail electricity market liberalization helped increase market efficiency and promoted diversification of products and services, thus enabling retail customers in many jurisdictions to have different contract options, participate in demand response (DR) mechanisms, and purchase energy from different sources. Electricity retailers are essential agents in deregulated electricity markets since they operate as intermediaries between large power producers and end consumers without the need of operating and maintaining physical assets in transmission and distribution grids [4]. Retailers procure electricity mainly from bilateral contracts, self-production, and the wholesale electricity market, which generally incorporates uncertainties on day-ahead and real-time prices and incur in additional risks in their decision-making models for electricity procurement [5].

Constants and
Several decision-making models for electricity retailers have been recently proposed in the literature to determine short-, medium-, and long-term strategies and decisions. An overview of the state of the art in decision-making models for electricity retailers was provided in [6] and [7]. Most of the existing works focused on the integration of price-based [8]- [14] incentive-based [15]- [21], combined [22] and contract-based [23], [24] DR mechanisms. Price-based DR mechanisms assume that retail customers manage their energy consumption according to specific pricing arrangements such as time-of-use and real-time pricing. Incentive-based DR mechanisms are based on special financial incentives not necessarily linked to a pricing scheme. Contract-based DR mechanisms assume that DR is provided through short-, medium-, or long-term contracts whereas combined DR mechanisms typically combine both pricebased and incentive-based mechanisms [25].
Among all existing risk management tools for scenariobased decision-making models under uncertainty, CVaR has received increased attention in decision-making models for different electricity market participants such as generation companies, large consumers, and retailers [5]. For an electricity retailer who aims to minimize its expected procurement cost, the CVaR represents the retailer's expected cost in the worst (1 − α) ×100% worst scenarios. It is also defined as the weighted average of extreme costs above the value-at-risk (VaR) within the (1 − α) % confidence interval, as illustrated in Fig. 1. More details on CVaR can be found in [5] and [32]. Most of the short-term decision-making models for electricity retailers considered only the CVaR over the entire planning period T , typically one or a few days. However, this approach, hereinafter denoted as T-CVaR, may lead to very high procurement costs in the (1 − α) ×100% worst scenarios of some hours and high expected costs over the entire planning horizon for some risk-aversion levels in comparison with the CVaR on an hourly basis (i.e., the CVaR that controls the procurement cost distribution of each hour), hereinafter denoted as h-CVaR.
This paper presents a two-stage stochastic optimization model to determine the short-term decisions of an electricity retailer with self-production of renewable energy, BESS, and virtual bidding. The proposed model minimizes the retailer's expected procurement cost and determines the optimal bidding curves to be submitted in the wholesale electricity market. A comparison of the proposed model with the existing short-term decision-making models for electricity retailers is provided in Table 1.
The main contributions of this paper are described as follows: 1) Different from previous approaches, the proposed model integrates both BESS and virtual bidding in the retailer's short-term decisions. 2) To fill the existing gap in the literature, the T-CVaR and h-CVaR are studied and compared in this paper. Both risk-management strategies are integrated into the proposed model and the hourly and total cost distributions and expected values are compared for different risk-aversion levels. To the best of the authors' knowledge, no previous work has studied the impact of both T-CVaR and h-CVaR in the decision-making model of an electricity retailer.
The remainder parts of this paper are organized as follows: Section II describes the main assumptions, the decision-making framework of an electricity retailer, and the mathematical formulation of the proposed model. In Section III, case studies using real-world data are performed, and the results are discussed. Finally, Section IV provides some relevant conclusions.

II. MODEL DESCRIPTION A. ASSUMPTIONS AND DECISION-MAKING FRAMEWORK
The proposed decision-making framework for an electricity retailer is illustrated in Fig. 2. Initially, historical data from day-ahead and real-time market prices, renewable energy production, and customers' load is collected. Then, scenarios are generated to be used in the stochastic programming model. The scenario generation and reduction process is described in Section II-B. The first-stage decisions, also known as hereand-now decisions, comprise the retailer's involvement in the day-ahead market by submitting a non-increasing bidding curve to purchase energy and participate in virtual bidding with uncertainty on market prices, self-production of renewable energy, and customers' load. The retailer is assumed to be a price-taker agent in the electricity market. Virtual bidding, also known as convergence bidding [33], [34], is a pure financial instrument used to explore arbitrage opportunities in multi-settlement electricity markets. Electricity markets can participate in virtual bidding without necessarily having physical generation or load assets. By submitting a decremental virtual bidding curve in the day-ahead market, an electricity retailer can purchase energy from the day-ahead market and sell it in the real-time market at a higher price. On the other hand, if the forecasted day-ahead price is higher than the forecasted real-time price at specific hour, the retailer can purchase energy from the real-time market and sell it in the day-ahead market at a higher price. The second-stage decisions, also known as wait-and-see decisions, comprise the retailer's involvement in the real-time market and the optimal BESS charging and discharging decisions for each scenario. The retailer's objective is to minimize its expected procurement cost, and the outputs of the proposed model are the optimal power and virtual bidding curves, as illustrated in Fig. 2.

B. SCENARIO GENERATION AND REDUCTION
Initially, a large number of scenarios are generated for dayahead and real-time prices, electricity demand, and renewable energy production using a seasonal autoregressive integrated moving average (SARIMA) time series model, where a stochastic process Y is expressed using the following mathematical expression [5], [35]:  In (1), φ g are the autoregressive parameters; h are the moving-average parameters; i are the seasonal autoregressive parameters; i are the seasonal moving-average parameters; ε t is the term that represents the error which is assumed to be a normally distributed stochastic process; and B is the backward shift operator. After the scenarios are generated by the SARIMA model, a fast-forward scenario reduction algorithm [36] is employed to reduce the number of scenarios of each stochastic variable to ensure that the model is tractable and still preserves sufficient stochastic information in the scenario set.

C. MATHEMATICAL FORMULATION
The proposed short-term decision-making model for an electricity retailer is presented as follows: Subject to: ω=1 P VI t,ω ≤ M t z t ; ∀t The objective function (2) to be minimized is comprised of two terms: 1) the expected retailer's procurement cost (i.e., the costs from purchasing power in the dayahead and real-time markets minus the revenues obtained in the real-time market from positive energy deviations, and the revenues from virtual bidding participation); and 2) the retailer's CVaR multiplied by its risk-aversion level β. Two types of CVaR measures are studied in this paper, which are presented in detail in Section II-D. All renewable energy units are assumed to operate with zero marginal cost [15].
Constraint (3) represents the retailer's energy balance. It ensures that the total available energy (i.e., the net energy purchased in the wholesale market along with the selfproduction of renewable energy and available stored energy) is equal to the demand of retail customers at each time and scenario. Constraints (4) and (5) limit the incremental and decremental virtual bidding capacities, respectively. Constraints (6)-(8) ensure the same power and virtual bidding capacities in the scenarios with the same DA prices. Constraints (9) and (10) enforce a decreasing bidding curve for power and decremental virtual bidding trading in the DA market, respectively. Constraint (11) enforce an increasing curve for incremental virtual bidding. In the electricity market considered in this paper, the retailer is allowed to submit either an incremental or decremental virtual bidding curve for each hour of the operating day as ensured by Constraints (12)- (14). Note that M t is a sufficiently large constant and z t is an auxiliary binary variable. The BESS constraints are formulated in (15)- (19). More specifically, Constraint (15) determines the state-of-charge of the BESS which is limited by its minimum and maximum values in (16). Constraint (17) ensures that the final state of charge (SOC) at the end of the operation day is equal to the SOC at the beginning of the operating day for the next-day use. Constraints (18) and (19) represent the charging and discharging power limits of the BESS, respectively. Note that the binary variable u ST t.ω is introduced to enforce that the BESS is not charged and discharged at the same time. Finally, Constraint (20) constitutes non-negative variable declarations.

D. RISK MANAGEMENT
Two types of CVaR measures are studied in this paper. The daily CVaR, T-CVaR, considers the management of risks over the entire planning horizon (i.e., one day). For this risk measure, the CVaR function in (2) and the associated constraints are presented as follows: Since the CVaR expressions in (21)-(23) are associated with the risks in the entire horizon, there might be time periods with significant losses in some scenarios. In order to increase the retailer's flexibility on its risk management, a time dependent CVaR, denoted as h-CVaR, is also considered to control the retailer's risk in each hour of the planning horizon. The h-CVaR is modeled as follows: Note that in (2), the CVaR is multiplied by a weighting factor β that represents the risk aversion level of the retailer that ranges from 0 to 1. If T-CVaR is used in (2), the retailer's risk aversion over the entire optimization period is considered. On the other hand, if h-CVaR is used in (2), the retailer's risk aversion over each hour considered.

III. CASE STUDIES A. DATA
The effectiveness of the proposed model is illustrated through case studies with real-world data considering the T-CVaR and the h-CVaR, respectively. An electricity retailer with selfproduction of solar energy and BESS in the PJM market is considered. The solar power capacity is assumed to be 50 MW and a 2MW/10MWh BESS with a conversion efficiency of 0.94 is considered. The scenarios related to dayahead and real-time prices and customers' load are generated based on PJM historical data [37]. The scenarios related to the solar power production are generated based on historical data from the National Renewable Energy Laboratory (NREL) website [38]. Initially, 500 scenarios were generated for each stochastic variable using a SARIMA model in the MATLAB econometrics toolbox [39]. Then, the original scenarios of day-ahead prices, real-time prices, solar power production, and customers' load were reduced to 5, 5, 5, and 3, respectively, using the fast-forward scenario reduction algorithm in [36] in MATLAB, resulting in a total of (5) 3 (3) = 375 scenarios. Fig. 3 illustrates the scenario arrangement considered in the case studies. Each period t corresponds to one hour such that the total planning horizon T comprises an entire day (i.e., 24 hours). The expected values of all uncertain variables at each hour of the planning horizon are shown in Fig. 4. The proposed optimization model is modeled using Yalmip [40] and solved with Gurorbi 9.0 in MATLAB. The computer used for simulation studies has a 4.60-Ghz, 4-core CPU and a 16-GB RAM.

B. CASE I -T-CVaR
In this case, the T-CVaR is used to manage the risks of the retailer. Initially, the virtual bidding capacity is set to 30 MW and the confidence level is α = 0.95. Fig. 5 shows the retailer's expected cost versus the CVaR for different riskaversion levels β from 0.1 to 0.9. It turns out that, as the risk aversion increases, the expected cost also increases and the CVaR decreases. From β = 0.1 to β = 0.9, the expected cost increased nearly 10% and the CVaR increased about 8%. In order to study the impact of considering BESS and different virtual bidding capacities on the proposed model,  the retailer's reduced costs and CVaRs for different riskaversion levels are shown in Fig. 6 and Fig. 7, respectively. It turns out that, the retailer's reduced costs and CVaRs are higher for larger virtual bidding capacities and are both very sensitive to the risk-aversion level. As β increases, the reduced costs decrease and the reduced CVaRs increase significantly. For a virtual bidding capacity of 60 MW, for example, the cost reduction varied from $6,000 to approximately $4,000 (i.e., 33%) and the CVaR reduction varied from approximately $480 to $4000 (i.e., 733%). The integration of BESS also contributed to the reduction of the retailer's cost and CVaR, but with a lower sensitivity to the risk-aversion level.

C. CASE II-h-CVaR
In this case, the h-CVaR is used to manage the risks of the retailer. Initially, the virtual bidding capacity is set to 30 MW and the confidence level is α = 0.95. The retailer's expected cost versus the sum of the hourly CVaRs for different riskaversion levels β from 0.1 to 0.9 is shown in Fig. 8. As in the previous case, the retailer's expected cost increased and  the CVaR decreased for high risk-aversion levels. However, the sum of the hourly CVaRs in Fig. 8 is slightly higher than the total CVaR of Case I (see Fig. 5) for each risk-aversion level. The impact of considering BESS and different virtual bidding capacities on the proposed model with h-CVaR is shown in Fig. 9. Similar to the previous case, the integration of virtual bidding and BESS help the retailer reduce its expected procurement cost. However, the cost reduction due to virtual bidding and BESS in this case was more sensitive to the risk-aversion level than in Case I, especially for values of β greater than 0.5.

D. COMPARING THE COSTS WITH T-CVaR AND h-CVaR
In this section, the retailer's total and hourly costs with T-CVaR and h-CVaR are compared for different risk-aversion levels. Fig. 10 shows the total expected costs with both riskmeasurement measures for β from 0.1 to 0.9. It turns out that, the h-CVaR results in lower total costs for most risk-aversion levels, especially for β between 0.4 and 0.7. The retailer's total cost distribution (i.e., the distribution of the 375 cost scenarios) using both risk-measurement measures for β = 0.3 and β = 0.6 is shown in the histograms of Fig. 11. Note that,  for β = 0.3, the T-CVaR provides a slightly better cost distribution, moving some cost scenarios between $40,000 and $50,000 to the lower range between $30,000 and $40,000, and reducing the retailer's total expected cost, as shown in Fig. 10. On the other hand, for β = 0.6, the h-CVaR moved a large portion of the high-cost scenarios between $60,000 and $70,000 to lower-cost ranges, but slightly increased the rightmost tail, adding one cost scenario between $110,000 and $120,000. For β = 0.6, the h-CVaR provided a 2.5% lower expected cost and a 1.7% higher CVaR in comparison with the T-CVaR. Fig. 12 shows the (1 − α) × 100% worst cost scenarios in the 23rd hour, when the T-CVaR and h-CVaR are used for β = 0.3 and β = 0.9, respectively. For a lower riskaversion level (i.e., β = 0.3), the worst cost scenarios using T-CVaR are significantly higher than the ones using h-CVaR. On the other hand, for a higher risk-aversion level (i.e., β = 0.9), this difference is reduced. For β = 0.3, the h-CVaR provided a 3.9% lower expected cost and a 6.1% lower CVaR in comparison with the T-CVaR in the 23rd hour.   It turns out that, depending on the retailer's risk aversion level, the h-CVaR may provide a lower total expected cost with a small increase in the total CVaR in comparison with the T-CVaR. The h-CVaR may also slightly increase the expected cost and significantly reduce the CVaR in some hours. The tradeoff between expected cost and CVaR should be carefully considered by the retailer.

E. COMPARING THE VIRTUAL BIDDING CURVES WITH T-CVaR AND h-CVaR
In this section, the hourly bidding curves with T-CVaR and h-CVaR are analyzed and compared for hours 13 and 23 whose price scenarios are shown in Table 2. The virtual bidding capacity is kept at 30 MW.
Initially, the hour 13 is selected and analyzed. In this hour, the expected day-ahead market price is $19.73/MWh, and the expected real-time market price is $22.50/MWh. The retailer's power bidding and virtual bidding curves generated with the proposed model with T-CVaR and h-CVaR for a riskneutral and a risk-averse retailer are shown in Fig. 13. In this hour, a decremental virtual bidding curve is submitted to the wholesale market since the expected day-ahead market price is lower than the expected real-time market price. Therefore, the retailer purchases power in the day-ahead market to resell  it at a higher price in the real-time market. For β = 0.3, the retailer is willing to purchase power in the day-ahead market for all price scenarios, except for the highest price scenario (i.e., $27.98/MWh), when using either the T-CVaR and the h-CVaR. For β = 0.9, the model with T-CVaR generates a vertical power bidding curve and a vertical virtual bidding curve while the model with h-CVaR generates more conservative power and virtual bidding curves with less power being purchased at the highest day-ahead price.
In the hour 23, the expected day-ahead market price is $14.41/MWh, and the expected real-time market price is $12.99/MWh. The retailer's power bidding and virtual bidding curves generated with the proposed model with T-CVaR and h-CVaR are shown in Fig. 14. In this hour, an incremental virtual bidding curve is submitted to the wholesale market since the expected day-ahead market price is higher than the expected real-time market price. Therefore, the retailer purchases power in the real-time market to resell it at a higher price in the day-ahead market. For β = 0.3, the retailer is less willing to purchase power in the day-ahead market for most price scenarios, especially when the T-CVaR is used. For β = 0.9, the T-CVaR and h-CVaR generate the same power and virtual bidding curves. A risk-averse retailer purchases power in the day-ahead market at lower prices and sells power in the day-ahead market through incremental virtual bidding only at the highest price scenario.

IV. CONCLUSION
This paper presented a short-term decision model for an electricity retailer through a two-stage stochastic optimization framework. The proposed model minimizes the retailer's expected procurement while considering the optimal decisions in the day-ahead and real-time markets, self-production of renewable energy, BESS, and virtual bidding. Two types of CVaR, namely T-CVaR and h-CVaR, were integrated in the proposed model to study how daily and hourly risk management strategies affect the retailer's cost distribution and the expected cost. Case studies using real-world data were conducted to show the retailer's cost improvement when virtual bidding and BESS are integrated into the model and to compare the retailer's cost and the bidding curves using T-CVaR and h-CVaR for different risk-aversion levels. It turns out that, both risk-management tools are useful to control the risks of the retailer. However, depending on the risk-aversion level, the model with h-CVaR can provide lower daily and hourly costs and improve the retailer's cost distribution in comparison with the model with T-CVaR. Further research will be conducted to investigate the risk-management of the retailer's cost and the virtual bidding profits as separate risk portfolios. The development of a hybrid T-CVaR and h-CVaR risk-management mechanism and the interactions of multiple retailers can also be investigated in a future work.