Bi-level optimal bidding strategy of an aggregator in competition with rival aggregators

: This study formulates a stochastic bi-level optimisation model for an aggregator participating in a two-settlement pool- based market while competing with rival aggregators. The market structure comprises a day-ahead and a balancing market. The upper level problem maximises the profit of the aggregator, while the lower level problem minimises the cost of energy procurement. The novelty of this work is that the aggregator is considered as a price-maker in both markets in which it participates in the day-ahead market by offering energy and price bids, and in the balancing market by offering only energy bids. Therefore, this study formulates an optimisation model where the price-maker economic bidding problem is considered without simplification, and serves as a reference for future studies. The proposed formulation is non-linear due to its bi-level structure and price-maker offers. The problem is then properly linearised into a single-level problem. The concept of conditional value at risk (CVaR) has been applied in the problem formulation to maximise average profit under worst scenarios. Finally, numerical results are presented through an illustrative case study to assess the performance of the proposed model. The results show that the profit of economic bidding is over 100% more than that of self-schedule in low risk cases.

day-ahead market cleared energy u, z, w binary auxiliary variables x energy bid to day-ahead market X 0 , X j aggregator's share in supplying the demand x min min. energy at each step in function y energy bid to balancing market y min min. energy at each step in function Λ

Risk measure
α confidence level β weighting factor ξ ω scenario-specific auxiliary variable ζ continuous auxiliary variable

Introduction
In recent decades, the framework of electric energy industry has evolved into a competitive platform in order to increase the operational efficiency, decrease the costs of end users, and inspire the research and development in power system structure. At the demand side, ubiquitous customers along with various timeshiftable loads offer vast potentials for improving the network operation. In this regard, the concept of demand response (DR) has been introduced to help network management by exploiting the potentials of demand side [1,2]. In order to improve DR management, aggregators serve as intermediary agents between consumers and electricity markets. The importance of demand response aggregator (DRA) in electricity markets can be highlighted in several ways. First of all, DR programs can be implemented for the management of timeshiftable loads. The flexibility of these loads allows peak load shedding and flattening the overall consumption curve [3][4][5]. Furthermore, they can improve system operation in critical situations.
The introduction of electric vehicles (EVs) into the electricity networks is another important step in DR provision. Coordination of a vast number of EVs can be performed by an aggregator. Such problem has been studied in various publications in recent years. Vayá and Andersson [6] formulated a bi-level optimisation problem for an EV aggregator who participates in the DA market. Through the bi-level problem, the cost of energy purchase is minimised and the prices of market are cleared. In [7], the risk averse problem of an EV aggregator participating in the DA and balancing markets is presented. Vagropoulos and Bakirtzis [8] solved the problem of an EV aggregator that seeks to maximise its profit by bidding in the DA and regulation markets.
Aggregation of DR resources can also offer advantages for renewable power producers. One of the main challenges of renewable producers in competitive markets is their volatile and uncertain generation. The flexibility of time-shiftable clients of DRAs can be utilised to cope with this uncertainty. To this end, the hybrid problem of a wind power producer along with a DRA participating in three pool-based markets is investigated in [9,10] and the coordinated problem of a wind power producer with a DRA is proposed in [11]. IET  In recent years, utilisation of new advanced metering infrastructures in power systems has increased the amount of DR that can be procured by the flexible loads. On the other hand, the sharp increase in the number of time-shiftable loads will offer much more flexible demand at the customer side. Therefore, in the case of sufficiently large energy transactions, a given aggregator might become a price-maker agent, since its decisions can have an impact on the market clearing prices.
This kind of operation is addressed in some studies. For example, Rahmani-andebili [12] considered an aggregator who participates in reserve market as a price-maker agent. Furthermore, the problem of a price-maker aggregator that bids in the pool market is solved in [13]. Kohansal and Mohsenian-Rad [14] proposed a methodology for price-maker economic bidding aggregator in day-ahead and real-time markets with the focus on time-shiftable loads with deadlines. In [15], the behaviour of a distribution company, which is an entity similar to DRA, that participates in DA and reserve markets as a price-maker agent is modelled.
Finally, from the retail perspective, a given aggregator can have potential rivals. Accordingly, the offered price of the aggregator will depend on the offered prices of its rivals. A three-stage bi-level optimisation problem is proposed in [16] in which a virtual power plant, including DR, tries to maximise its profit in competition with the rivals. In [17], the problem of an EV aggregator participating in DA and balancing markets with the presence of rivals is studied. A three-stage bi-level optimisation problem is proposed in [16] in which a virtual power plant, including DR, tries to maximise its profit in competition with the rivals.
In DRA-related papers, most of the existing literature considers aggregators as price-taker agents. Moreover, in papers that dealt with the problem of a price-maker aggregator, the aggregator participates in the market by submitting self-schedule offers, rather than economic bidding ones. Also, most of the studies do not consider rival aggregators and their influence. However, this paper considers both the impact of rival aggregators and the price-maker role of the aggregator under investigation who participates in the day-ahead market by submitting economic bidding offers. In comparison, Vayá and Andersson [6] formulated the problem of a PEV aggregator that participates in DA market as a price-maker agent. The difference of the work by Vayá and Andersson [6] with this work is that the price-maker agent is a self-schedule one in [6], but our work considers both cases and compares them with each other. Additionally, this paper considers the risk of low profit in worst scenarios. Yazdani-Damavandi et al. [18] investigated the behaviour of multi-energy players (MEP) who try to maximise profit. The main difference between [18] and the present paper is that [18] does not consider rival MEPs. Moreover, MEP is considered as a price-taker agent which becomes price-maker under high penetration, while our paper not only considers a pricemaker agent, but investigates the advantages and disadvantages of the two types of participation of price-maker agents in the market, i.e. economic bid and self-schedule. Jia et al. [19] modelled the problem of a flexible load aggregator which participates in DA and reserve markets as a price-maker agent. It has several differences with our work. First, the price-maker agent is not modelled via price quota curves (PQCs). Second, the risk of the problem is not considered. Third, rival aggregators are not accounted for in [19]. In [20], a medium-term decision-making problem is modelled, whereas our paper formulates a short-term problem. Therefore, the basis of the two papers is different. The reference deals with a midterm futures market problem. To do so, it considers an average price of the pool price for future time periods, which is typical in programming problems of the futures market. Our paper, on the other hand, deals with the details of 24 h short-term market horizon as well as the challenges of price-maker formulation which is another difference between the two papers. Do Prado and Qiao [21] focused on the load, while in our work the focus is on the aggregator. In detail, do Prado and Qiao [21] utilises step-wise functions to consider load reduction/increase to achieve favourable prices. In contrast, our paper considers step-wise functions to model a price-maker aggregator who competes with other aggregators. Finally, in [21] rival retailers are not considered. The cited references on demand aggregator are summarised in Table 1.
This paper formulates the problem of a price-maker aggregator that participates in the DA and balancing markets and competes with rival aggregators. The offers of the aggregator are considered economic bidding in the DA market and self-schedule in the balancing market. The formulated stochastic problem is bi-level due to the presence of rival aggregators. The problem of the paper is that, it extends the work of [14] by considering rival aggregators, as well as [17] by employing price-maker agent instead of pricetaker one. Neither of the mentioned works considers rival aggregators. However, both of them solve the problem of a pricemaker economic bidding agent. Since price-maker economic bidding is the most complicated form of a market participant, the current work employs the methodology in which an aggregator competes with rival aggregators by offering energy and price bids to the market. Our goal is to investigate the model for price-maker economic bidding. To our knowledge, this has not yet been done, and therefore, this paper could serve as a reference for all types of bi-level problems.
In general, competition results in better optimisation. Rival aggregators are beneficial for consumers as they could purchase cheaper energy. Moreover, from the viewpoint of an aggregator, when there are others who offer the same services/supplies to the common customers, it is logical to consider the influence of the rivals in order to reach better profits.
This work, unlike most of the literature, presents a general formulation for DRAs by considering a very complicated format of the problem, i.e. a price-maker aggregator with economic bidding offers that is in competition with rival aggregators. The proposed model can be applied in any other DRA problem by adding extra constraints.
The remaining of the paper is as follows. Section 2 is dedicated for explaining the underlying problem, namely, the upper and lower level problems, market framework, and PQC. In Section 3, mathematical formulation is described. To this end, the upper and lower level problems are formulated, then, the equivalent single level problem is proposed using Karush-Kuhn-Tucker (KKT) conditions and the strong duality theorem. In order to assess the outperformance of the proposed strategy, the problem is reformulated, in Section 4, for a price-maker self-schedule aggregator. Section 5 is devoted to numerical evaluation of the proposed method. Finally, Section 6 concludes the paper.

Problem description
In this section, the decision-making problem of a DR aggregator and consumers is illustrated. The considered formulation is a bilevel problem in which the aggregator, in upper level, aims to maximise its expected profit by participating in the DA and balancing markets. The lower-level problem shows the optimisation problem of the consumers which intend to minimise the cost of purchased energy. The underlying assumptions for such framework are as follows. (i) The aggregator acts as a price-maker agent in both DA and balancing markets, and offers both energy and price bids to the DA market which can affect the market clearing process and final cleared energy and price of the electricity market. On the other hand, the aggregator only offers energy bids to the balancing market. In some markets like California energy market [22], the former case in which the bids include both price and energy quantities is called economic bidding, and the latter case that only includes energy quantity offer is called self-schedule. These two cases will be illustrated more in this section. (ii) The proposed model is only applicable to the zonal electricity market without adopting the locational marginal pricing. (iii) Consumers consider the offers of the understudy aggregator and other rival aggregators in order to minimise their expected costs. (iv) The aggregator needs to decide the optimal selling prices to the customers since offering high or low prices results in customer attrition or profit drop, respectively.
The DA market is the main trading floor for the energy transactions. However, as the market clearing process takes place before the actual delivery time, correcting actions are needed to adjust the difference between the expected consumption near the real time and the cleared energy in the DA market. Such energy imbalances can be covered through the balancing market. The aggregator can benefit from balancing market if it can reduce the load and sell the extra energy. On the contrary, it would incur costs for procuring extra energy if the demand is higher than the purchased energy from the DA market.
The optimisation problems in the proposed framework are in the form of stochastic programming and hence, various sources of uncertainty are modelled through proper scenarios. The sources of uncertainties are the market prices including DA and balancing prices, the customers' demand, and the selling prices of rival aggregators.
As mentioned earlier, the aggregator under consideration is a price-maker in the DA market. For a given hour, the amount of power that a price-maker agent generates or consumes is called the quota of that agent. The alteration of this quota affects the market clearing price which can be expressed by a PQC, also known as residual demand/generation curve, as shown in Fig. 1. For the case in this paper (a price maker consumer), the hourly PQCs are stepwise monotonically increasing with respect to consumption level. The authors of [23,24] described the details of such curves in detail. The cleared energy and the cleared price, under the economic bidding model, depend on both energy and price bids. Fig. 1 depicts a step-wise PQC for a given time-scenario along with two different possible bids. Each step of PQC shows the maximum allowed energy at a span of prices. For instance, for prices less than €8/MWh, the cleared energy is zero. The cleared energy/price is determined by comparison between the energy/ price obtained from the intersection of offered price/energy with PQC and offered energy/price. Only one of the following cases is  [3] day-ahead and real-time closed-form solutions applied by timeshiftable loads to minimise energy procurement cost (i) a time-coupled multistage stochastic optimisation problem is formulated; (ii) two design scenarios are considered [5] day-ahead and reserve the formulation of generation scheduling for a typical microgrid is done the DR program service is implemented in order to reshape the demand profile and provide reserve capacity [6] day-ahead bi-level optimisation problem for EV aggregator to minimise the cost of purchasing energy and clear market price (i) exogenous prices are assumed; (ii) considering a case where PEV demand is inflexible; (iii) uncertainty in market bids; (iv) uncertainty in PEV driving patterns is considered [7] day-ahead and balancing EV aggregator problem is solved (i) considering risk of the problem and load control; (ii) uncertainty of PEV mobility parameters is considered; (iii) presenting calculations of two metrics named expected value of flexibility and expected value of aggregation [8] day-ahead and regulation EV aggregator problem is solved (i) the systematic treatment of the 'instructed' and the 'uninstructed' energy deviations; (ii) the development of a linear battery charging characteristic model [9] day-ahead, intraday and balancing proposing a technique to obtain the best offering strategy for a hybrid power plant consisting of a wind power producer and a DR provider in the power market (i) the development of an optimal offering strategy model for the joint operation of a WPP and a DRP; (ii) the development of a method to generate the scenarios and proposing a simple way to consider the correlation between the stochastic variables [10] day-ahead, adjustment and balancing modelling the joint operation of EV aggregator and wind power producer (i) considering charging, discharging and degradation of batteries; (ii) a novel modelling approach to model WPP via a fuzzy-based method is proposed; (iii) different EVs from different manufacturers are considered [11] day-ahead, adjustment and balancing bi-level programming problem considering wind power producer and demand aggregator (i) using DR contracts to lessen the risk of WPP; (ii) the competition in the DR procurement is taken into account through modelling the DR aggregator behaviour [12] reserve market the spinning reserve capacity is determined based on minimisation of total cost of problem (i) the aggregator's problem is modelled using an agent-based model; (ii) the market players are considered as price makers and their offers to the market are modelled using a dynamic game theory simulation [13] day-ahead and balancing the problem of a price maker aggregator placing offers to day-ahead and balancing markets is modelled (i) the aggregator offers both price and energy bids to the day-ahead market; (ii) CVaR risk measure is considered [14] day-ahead and real-time price-maker economic bidding aggregator participates in the markets with the focus on time-shiftable loads (i) a new scenario-based stochastic optimisation framework is proposed; (ii) existing price-taker results by considering price-maker market participants; (iii) four innovative analytical steps are presented in order to model a tractable mixed-integer linear program [16] day-ahead and balancing a virtual power plant, which comprises of distributed energy resources, battery storage systems, and electricity consumers, and participates in day-ahead market is modelled (i) an innovative mathematical formulation for the incorporation of DR schemes into the VPPs portfolio is proposed; (ii) the anticipated imbalance costs calculated on the basis of scenario-based balancing market prices are innovatively incorporated into the VPP offering strategy [17] day-ahead and balancing the problem of an aggregator participating in markets considering rival aggregators is studied (i) considering the reaction of consumers to the offered selling prices by the aggregators in a competitive environment; (ii) considering risk aversion measurement to decrease the risk [19] day-ahead and reserve the problem of a price-maker flexible load aggregator is modelled The operation problem of Genco and flexible load aggregator are modelled in the lower-level and upper-level, respectively [21] day-ahead and real-time a short-term decision-making model for an electricity retailer with self-production of renewable energy (i) it provides a stochastic-programming-based short-term decisionmaking framework for retailers with self-production of renewable energy; possible. Case (i): the offered energy, i.e. x t , is less than or equal to the energy obtained from the intersection of the offered price with PQC, i.e. q tω th , and the offered price, i.e. p t , is more than the price obtained from the intersection of the offered energy with PQC, i.e. λ tωs (Fig. 1b). In this case, the cleared energy is x t , and the cleared price is λ tωs . Case (ii): the offered energy is more than the energy obtained from the intersection of the offered price with PQC (x t > q tω th ), and the offered price is less than or equal to the price obtained from the intersection of offered energy with PQC (Fig. 1c). In this case, the cleared energy is q tω th , and the cleared price is p t .

Problem formulation
The problem of the aggregator is formulated through a bi-level optimisation process as described in the following.

Upper level: aggregator side
The proposed formulation is a two-stage stochastic programing problem that shows the participation of the aggregator in DA and balancing markets and its interactions with the customers. The upper-level problem is presented below: s.t.

∀t, ω: P tω
The optimisation problem in (1) is composed of four terms. The first part indicates the revenue of the aggregator from selling energy to its customers. The costs of procuring energy from the DA and balancing markets are characterised by the second and third terms, respectively. Finally, the last term shows the CVaR measure which has been applied in the problem formulation to maximise average profit under worst scenarios. The term ∑ s = 1 o tω Λ tωs (c tωs + w tωs y tωs min ) represents the cost of procuring energy from the balancing market that is written following the general methodology in [14,25]. Constraints (2) demonstrate the energy balance between the purchased energy from the markets, which is the market cleared energy of the aggregator, and the sold energy to the customers. Constraints (4)-(21) state the necessary formulation for the price-maker economic bidding, which is based on the proposed model in [14]. Constraints (4)-(7) determine the value of x t and q tω according to θ tω . The value of C tω is obtained via constraints (8)- (11). Based on (4)-(11), the cost of energy procurement from DA market is calculated using PQCs as follows. If θ = 0, then q tω = x t and C tω = ∑ s = 1 m tω λ tωs (b tωs + z tωs x tωs min ) = λ tωs ⋅ x t . It means the offered energy, x t , determines the price, i.e. λ tωs , while p t ≥ λ tωs (see Fig. 1b). On the other hand, if θ = 1, then q tω = q tω th and C tω = ∑ s = 1 n tω x tωs min (a tωs + u tωs p tωs min ) = x tωs min ⋅ p t , which means the offered price, p t , determines the amount of traded energy, i.e. q tω th = x tωs min , while x t ≥ x tωs min (see Fig. 1c). Equations (13)-(15) represent the offered value of p t , x t , and y tω based on their PQCs, respectively. In constraints (16)-(18), a tωs max , b tωs max , and c tωs max are the width of step number s in the PCQ functions of p t , x t , and y tω , respectively. Equations (19)- (21) show that, for every time step and scenario, only one step is selected as the offered price or energy. Constraints (22) and (23) describe the CVaR risk constraints for the maximisation problem. Binary variables of the optimisation problem are represented by constraints (24).
Pertaining to the above equations, if θ = 0, then the cost of procuring energy from the DA market is expressed as When θ = 1, this cost will be n tω x tωs min (a tωs + u tωs p tωs min ) = X tωs min ⋅ p t (26)

Lower level: client side
The lower-level problem represents the clients' decision making. In order to minimise their costs, they choose an aggregator that offers the lowest price. In the following, the lower-level problem is presented as s.t.
where (27) is the objective of lower-level problem and consists of the cost of purchasing energy from both the aggregator and rival aggregators. Variable X ∈ [0, 1] determines the share of each aggregator in supplying the demand. Constraint (28) shows that total demand that must be covered by aggregators, and (29) expresses the maximum amount of energy that each aggregator is able to offer. The variables in the parentheses are the dual variables for each constraint.

Single level problem
The above nested optimisation problem cannot be solved directly by optimisation techniques. However, such optimisation problems can be replaced by their equivalent KKT conditions, which lead to a mixed-integer linear formulation. KKT conditions hold if the lower-level problem is convex and its constraints satisfy some regularity conditions [26]. The KKT conditions of the lower-level problem are as follows: where ⊥ implies that one of the two inequalities hold strictly. Generally, KKT conditions are non-linear, however, it is possible to linearise them by applying binary variables. Equations (36)-(42) represent the linearised form of the KKT conditions where ι tω , ℓ tω j , and κ tω j are binary variables. The objective function of the upper-level problem is complicated by the bilinear term P tω Agg λ tω

Agg
. This term can be linearised by employing the strong duality theorem on the lowerlevel problem. The dual problem is Based on the strong duality theorem, at the optimum point, the values of the primal and dual objectives are equal. Therefore On the other hand, the bilinear term can be written as The last two equations yield P tω Agg λ tω By replacing the above equation and the KKT conditions with the lower-level problem, the equivalent single level problem is obtained as (2) − (24) (34) − (40)

Benchmark scheme
In order to evaluate the proposed price-maker economic bidding scheme, in this section, the underlying problem is reformulated in which the aggregator is considered as a self-schedule agent in both markets. The results of the economic bidding model, compared to the self-schedule one, are expected to be more optimised. However, the self-schedule approach is simpler. In the following, the aggregator is considered as a price-maker self-schedule agent in both DA and balancing markets. In this respect, only upper-level problem is required to be reformulated. The comparative results of self-schedule and economic bidding models are presented in the case study. The reformulated upperlevel problem is Λ tωs (c tωs + w tωs y tωs min ) Its merits mention that in the self-schedule bidding, the price offers are eliminated. In doing so, and in comparison with the economic bidding problem that is the main upper level problem, (2) is replaced with (52); the constraints (4)-(7) are removed; constraints (8)- (11) are replaced with (54); (12), (13), (16), and (19) are also removed.

Case study
In this section, three scenarios are studied: (i) the aggregator's profit under high or low market prices, (ii) the comparison between self-schedule and economic bidding schemes, and (iii) the comparison between the results when the offered prices of the aggregator are fixed or they are obtained as variables of the problem. The problem has 12 scenarios for each of the DA and balancing markets. Each market scenario comprises a PQC which represents the relationship between market cleared price and cleared energy. Three rival aggregators, five steps for each PQC, and 24 h horizon are considered. The demand and prices are generated based on Spain electricity market 2016 [27]. The scenarios are generated using ARMA models, and reduced via a built-in forward selection function in GAMS software called SCENRED2. Finally, the problem is solved in GAMS through CPLEX solver.

Profit under high and low market prices
Different market prices can be interpreted as the prices in different quarters of the year. Here, high and low market prices are generated using historical data of different times of the year. After all, market prices vary throughout the year. Fig. 2 represents the share of each aggregator (the aggregator and three rivals), where the share of the aggregator decreases with the increase of the market prices. The share of each aggregator corresponds to the percentage of the demand that is supplied by them. Fig. 2a represents the results of low market prices, whereas Fig. 2b indicates obtained results with high market prices. In the case of Fig. 2b, the aggregator is forced to reduce its share, because on the one hand, the aggregator is a price-maker agent for which, according to PCQs, the price of energy increases with the amount. On the other hand, offered selling prices of the aggregator are capped by the rival aggregators. Note that in both subfigures, the offered prices of the rival aggregators are considered identical. Therefore, the alterations of the offered prices of the aggregator can accurately be seen. Also notice that the rival aggregators could be price-maker agents as well. The problem only considers an estimation of their offered prices. Thus, in Fig. 1b, some of the rivals have more share than the aggregator. Figs. 3 and 4 show the offered prices of the aggregators for each hour. The offered prices of the rival aggregators are fixed and identical in both figures. Note that being fixed does not mean that the rival aggregators are price-taker agents, but only implies that the prices are forecasted. These prices set up upper bounds for the offered prices of the aggregator. Fig. 3 depicts the results when the market prices are low, therefore, the aggregator can procure energy with lower prices compared to Fig. 4. Consequently, the offered prices of the aggregator could be equal to the lowest offer of its rivals, which can be observed in most of the hours in this figure. Thus, the aggregator will be the priority of the consumers. However, in some hours, such as 7-9, this is not the case, because in these hours the market prices are high, and therefore, in order to compensate the procurement cost, the aggregator offers higher prices. Accordingly, some rival aggregators win the priority of the consumers, however, the aggregator is confident that the amount of their offered energy will be sold, seeing that the amount of energy that rival aggregators can offer is limited by (29). Fig. 4 shows the results when the market prices are high. In this case, the aggregator tries to buy less energy and sell at higher prices compared to the previous case. Since the cleared prices depend on the PQCs, offering smaller amounts of energy lead to the cheaper cleared prices. Additionally, high and low market prices are used to cover different quarters of the year. Lastly, in both cases of high and low market prices, it is assumed that the offered prices of the rival aggregators are identical, for the sake of comparison.

Self-schedule and economic bidding
As mentioned, in the self-schedule model the aggregator only offers energy bids. Hence, the self-schedule bidding has less binary variables in comparison with the economic bidding. Accordingly, the solving process of the self-schedule bidding is faster than the economic bidding. In contrast, the economic bidding is more precise and can achieve better optimised solutions. Fig. 5 represents the effect of risk measure on the variations of profit in the both cases. As it can be seen, risk measure has less effect on the economic bidding scheme, as the profit of scenarios is controlled by price bids. In other words, economic bidding scheme has no scenario with negative scenario-profit in the risk-neutral case, i.e. β = 0, whereas self-schedule scheme has scenarios with negative profit. Therefore, at the cost of higher risk, the expected profit of self-schedule is more than economic bidding in this case, i.e. β = 0. Fig. 6 shows the impact of risk for self-schedule case, where the expected profit decreases as CVaR increases. It is worth mentioning that in the economic bidding case, the CVaR value varies infinitesimally with β. Table 2 shows the expected profit for different values of β for both the economic bidding and the self-schedule cases. If β = 2, the value of CVaR in the self-schedule case becomes zero. If β < 2, the self-schedule has negative scenarios, while the economic bidding has no negative scenarios at all, even in risk-neutral case. For β = 0, 0.1, the expected profit of the self-schedule is greater than the economic bidding with the risk of negative scenarios or loss. Increasing risk weight eliminates the negative scenarios of self-schedule as well as decreases its expected profit. Therefore, there is a trade-off between the self-schedule and the economic bidding. The former enjoys higher expected profit, and the latter does not experience unfavourable scenarios. If β = [0. 5,2], the economic bidding offers more optimised solution with no negative scenarios, and more expected profit compared to the self-schedule. Similarly, for β > 2, there is a trade-off between the economic bidding and the self-schedule. Compared to the self-schedule model, the economic bidding has better expected profit (which is favourable) and scenarios with lower profit (that is unfavourable).

Considering λ Agg as parameter or variable
If the aggregator's offered price, λ Agg , is considered as a parameter of the problem, it means that λ Agg is known. Otherwise, it must be found. Considering λ Agg as a parameter results in simpler formulation. However, considering it as a variable leads to better optimised solutions. In this subsection, high market prices are applied. Table 3 represents the results obtained with considering λ Agg as a parameter or a variable for economic bidding scheme. As the table shows, the expected profit and scenario profits are higher when λ Agg is considered as an unknown variable.

Conclusions
This paper formulates the problem of a price-maker aggregator participating in DA and balancing markets that seeks to maximise its profit while competing with rival aggregators. The aggregator is considered an economic bidding agent in the DA market, and a self-schedule one in the balancing market. The novelty of the proposed methodology is that the problem considers the aggregator as a price-maker agent in the two markets who participates in the DA market by submitting economic bids. The two-stage optimisation problem of this paper is bi-level in which the upper level comprises the maximisation problem of the aggregator's profit, and the lower level consists of the minimisation problem of the clients' purchasing cost. The problem is properly transformed into a single-level mixed-integer programming using KKT conditions and the strong duality theorem. Additionally, the problem is reformulated by considering self-schedule bidding in the DA market in order to compare the results of self-schedule and economic bidding models. Finally, the numerical results are reported in the case study based on Spanish electricity market data. The effects of high and low market prices on the aggregators offered prices and profit are investigated in the case study. The superiority of the economic bidding over the self-schedule scheme is demonstrated. To illustrate the performance of the proposed model, the results are compared with the case that the offered prices of the aggregator are fixed. In the end, the effect of CVaR risk measure is also studied. The findings of the paper demonstrate that, based on the offered prices of rival aggregators and the market prices, the aggregator offers prices to achieve maximum profit. The economic bidding scheme does not face scenarios with negative profit. Better optimised results are obtained when the aggregator's offered price is not a fixed parameter. CVaR risk measure mainly has impact on the self-schedule case. Lastly, in future studies, this work could be extended by considering local marginal pricing and comparing the participation in a distribution level electricity market with that of transmission level market.