Backtesting coordinated hydropower bidding using neural network forecasting

A stochastic programming model for a price-taking, profit-maximizing hydropower producer participating in the Nordic day-ahead and balancing market is developed and evaluated by backtesting over 200 historical days. We find that the producer may gain 0.07% by coordinating its trades in the day-ahead and balancing market, compared to considering the two markets sequentially. It is thus questionable whether a coordinated bidding strategy is worthwhile. However, the gain from coordinating trades is dependent on the quality of the forecasts for the balancing market. The limited gain of 0.07% comes from using an artificial neural network prediction model that is trained on historical data on seasonal effects, day-ahead market price, wind and temperature forecasts. To quantify the effect of the forecasting model on the gain of coordination, we therefore develop a benchmarking framework for two additional prediction models: a naive forecast predicting zero imbalance in expectation, and a perfect information forecast. Using the naive method, we estimate the lower bound of coordination to be 0.0% which coincides with theory. When having perfect information, we find that the upper bound for the gain is 3.8% which indicates that a substantial gain in profits can be obtained by coordinated bidding if accurate prediction methods could be developed.

Balancing market demand in time step t and outcomes s and c A gt Available capacity share of generator g in time step t C S g Unit start cost for generating unit g E r Energy equivalent for reservoir r I tr Inflow to reservoir r in time step t J B r ′ r Bypass connection matrix from reservoir r ′ to reservoir r J D r ′ r Discharge connection matrix from reservoir r ′ to reservoir r J S r ′ r Spill connection matrix from reservoir r ′ to reservoir r N B Minimum bid volume for the balancing market

Introduction
For generation companies operating in deregulated electricity markets, a core activity is the process of selling the generated power in the various markets that are available. This activity is challenging because of the sequential and stochastic nature of the power auctions [1,2] and also because the marginal cost of generation is hard to specify precisely, since for many technologies, marginal costs depend on unknown future unit commitment patterns [3,4]. In fact, since electricity generation planning involves mixed integer programming, there are no standard ways to calculate marginal costs [5].
In European-style electricity markets, market participants have to internalize nonconvexities in their market offers. In many cases, there is a main physical spot market, as well as various adjustment, balancing and ancillary services markets. Thus a possible approach is to consider how to bid in the main market, and, when this market has cleared, to consider how to participate in the remaining markets.
One strand of literature views this as a problem of deciding how much of the generation capacity to allocate between the different markets [6]. Others emphasize the sequential, and (by design) partly independent nature of these markets, allowing 1 3 optimization of bidding strategies to benefit from backwards induction, viewing bidding as a sequential decision making problem [7,8].
In a sequential approach, generation companies can choose to simplify the bidding problem by ignoring the effect future (adjustment or balancing) market opportunities may have on the optimal bids to the main market. Such sequential bidding is considered in [9,10] and can be justified by the small volumes in these markets, and that they trade different products. Furthermore, the relevant information motivating trading in these products is not available until the main (spot) market has cleared. Boomsma et al. [11] call this sequential bidding. The alternative is coordinated bidding, where bidding is planned across markets in a joint optimization model [12][13][14][15][16]. An important question for the generation companies is then how much there is to gain by using a coordinated approach over a sequential approach. We shed light on this issue by developing a benchmark framework that allows for extensive backtesting over historical days.
A vital supporting activity in the process of selling the generation through the physical auctions is forecasting of market outcomes such as prices in different time intervals [17], geographic locations [18] and across market types, as well as other clearing outcomes such as power flows, load and generation, also distributed across future time intervals, geographically and across markets. A challenge in the forecasting process is to capture the complex dependencies that exist across these dimensions in modern power systems that increasingly are being penetrated by intermittent renewable generation. There is a large literature on both forecasting and power market bidding, see [19,20] for reviews. For a generation company, it is necessary to do well in both these activities. This leads to a question of how to measure and benchmark the performance across alternative approaches for bidding and forecasting.
Many authors suggest simulation [2,21] using real or artificial data. In this paper we opt for a backtesting approach, i.e. a simulation on real data where a counterfactual experiment is carried out over a sufficiently long historical period. We assume that the generation company has a database of historical forecasts and other relevant time series such as resource states and generator commitments. We use hydropower production as the base technology because we are considering data for the Nordic power market where hydropower accounts for 50% of annual production.
Our contributions include: • The main contribution of this paper is a backtesting framework that can measure the gain of a coordinated bidding process, both the forming of bids given forecasts, and the forecasting activity itself, both of which are vital to the business process. A novelty is that the framework identifies the relative performance of bidding versus forecasting over time. • We present a three-stage stochastic programming model that optimizes bid curves for both the spot and balancing market. Our modelling is thus an extension of [10] who determine bid curves in the spot market but only a single bid volume in the balancing market. • Using real data from a Norwegian hydropower producer, we compare the sequential and coordinated approach for different prediction models for the balancing market, where we use a naive forecasting method predicting zero imbalance (in expectation) to give a lower bound and a forecast with perfect information to give an upper bound. Between these two extremes we also develop an artificial neural network (ANN) forecast to give a more realistic estimate.
The rest of this paper is organized as follows: The formulation of a mathematical optimization model for coordinated bidding is presented in Sect. 2. Section 3 describes the backtesting procedure. Section 4 presents the prediction models for the balancing market. Results from a case study are given in Sect. 5, before conclusions are drawn in Sect. 6.

Coordinated bidding of hydropower generation
In this work, we consider the market rules of European-style day-ahead and balancing market, as shown in Fig. 1. Similar market structures may be found in other regions. In Europe, the day-ahead market is the main arena for trading power. Orders or bids have to be placed within 12:00 CET the day before delivery. The market prices for the delivery day are determined from the market equilibrium, and are typically announced to the market at 12:42 CET or later, as shown in Fig. 1. To calculate the commitments, the market organizer makes a linear interpolation between the individual producer's bid curve and the market price.
In addition to the day-ahead market, we consider a balancing market, which for the case of Norway is a real-time market for replacement reserves with an activation time of up to 15 min. These reserves are manually activated by the TSO and replace the more flexible automatically activated reserves. Preliminary orders in the balancing market must be placed within 21:30 CET the day before delivery, as shown in Fig. 1, but may be changed up to 45 min prior to the delivery hour. The prices in the balancing market are based on activating the bids in merit order. In contrast to the piecewise linear bid curves submitted to the day-ahead market, bids for the balancing market are piecewise constant.
The problem of determining optimal bids in the day-ahead and balancing market can be formulated as a three-stage stochastic mixed-integer programming model. We use a deterministic equivalent formulation of the stochastic program. The first-stage decisions are the hourly bid curves for the day-ahead market. The uncertain dayahead market prices are revealed in the second stage and determines the day-ahead commitments. The second-stage decisions are the hourly bid curves for the balancing market. In our model, the bids for the balancing market are determined for all hours at the same time, and not for individual hours as they close. This assumption enables the use of a three-stage and not multi-stage model. Entering the third stage, the uncertain balancing market prices and demand are revealed and the commitments in the balancing market are determined. The third-stage decisions determine an optimal production schedule for the river system that cover the market commitments.
The planning horizon for the hydropower producer has hourly steps, denoted by T = {1, … , T} , coinciding with the current granularity of the markets. The subset T P = {1, … , 24} ⊂ T represents the day of bidding (Fig. 1), which is deterministic with a predetermined production schedule from the day before. The hours of operation make up the second day of the planning horizon, and are thus denoted by the subset T O = {25, … , 48} ⊂ T . Bids are only placed for the day of operation, but a longer planning horizon has to be included for coupling to longer term hydropower scheduling models. After hour 48, bidding is relaxed and the producer schedules production according to the spot market prices, without going through the process of bidding. This period is denoted by the subset The prices in hour t for the day-ahead market and the balancing market are described by the stochastic processes D t and B t , respectively. The balancing market price is defined as the sum of the day-ahead market price and a balancing market premium, The premium can be positive or negative, leading to a balancing market price above or below the day-ahead market price. The demand in the balancing market is described by B t . We model the demand in the balancing market as stochastic because there is limited market depth depending on the uncertain future demand for ramping. The continuous stochastic process for the market prices and demand is approximated by a scenario tree as shown in Fig. 2. The set of possible outcomes for the day-ahead market is denoted S , while the set of possible outcomes for the balancing market is denoted C . A subset C s ⊂ C is introduced, which represents the possible outcomes for the balancing market given an outcome s in the day-ahead market. A scenario is defined as a combination of the two markets; given an outcome s ∈ S and c ∈ C s . The market parameters are thus denoted by D ts , B tsc , B tsc . The probability for an outcome s in the day-ahead market is given by D s , while the probability for an outcome c in the balancing market is given by B sc . The probability for a scenario is thus For the day-ahead market, bids are given as price-volume pairs, which make up a set of bid points I = {1, … , I} , as shown in Fig. 3. The number of bid points, I, is freely chosen by the producer, but an upper limit is given by I = 64 according to the market rules. The process of placing bids gives a nonlinear problem when determining both the bid price and the bid volume [22]. Solving this nonlinear problem would have a too large computational burden for real cases, and thus we want to use a linear formulation. Therefore, to preserve the linearity of the model, the bid prices for the day-ahead market, P D i , are modeled as fixed parameters, while the bid volumes are modeled as decision variables [23]. The bid volumes are denoted u D ti . Accumulated volumes are used, and not the marginal increase for each bid point. The decision variables representing commitments, w D ts are determined by linear interpolation between adjacent pricevolume pairs (u D ti−1 , P D i−1 ) and (u D ti , P D i ) , as expressed by (1): The market rules also require that the bid curves are monotonically non-decreasing. This requirement is enforced by (2): The accumulated bid volume for hour t in the day-ahead market cannot exceed the available production capacity of the set of G = {1, … , G} production units in the system. The hourly available production capacity, Q gt , is defined in (3). A gt represents the hourly percentage of availability for the generator, while Q g denotes the upper production limit of the generator. The highest bid cannot exceed the total available production capacity, as expressed by (4): The producer can both sell to and buy from the balancing market but cannot be activated for both in the same period. One supply curve and one demand curve are thus submitted for each hour of operation. If the demand in the system exceeds the available supply, the TSO activates sell orders (up ramping). If the demand in the system is smaller than available supply, the TSO activates buy orders (down ramping). The stochastic demand parameter, b tsc , defines the direction and quantity demanded in hour t, and therefore also determines the market state M , defined by (5) As for the day-ahead market, bids for the balancing market are given as price-volume pairs with bid prices, P B im , as parameters, and bid volumes, u B tsim as decision variables, but the bid curves are now piecewise constant, as shown in Fig. 4. The bid prices for upward ramping are increasing, whereas they are decreasing for downward ramping. The commitments in the upward and downward balancing market are determined by (6) and (7), respectively: 1, upward balancing market 2, downward balancing market. Backtesting coordinated hydropower bidding using neural… The market rules require a minimum bid volume for the balancing market, denoted N B . As it is assumed that the replacement reserves are needed the entire hour, B tsc is either zero, or in the intervals Bid curves are required to be monotonically nondecreasing for upward ramping, and monotonically nonincreasing for downward ramping. The bid volumes are defined to be positive, so the requirement for both states is enforced by (8): As the balancing market clears after the day-ahead market, the available capacity for adjustments is dependent on the day-ahead market commitments. For upward ramping, the quantity available for adjustment is defined as the total available production capacity in hour t, less the committed volume in the day-ahead market (9). The quantity available for downward ramping is equal to the commitment in the dayahead market (10) because the producer can ramp down to zero: The commitments in the balancing market are also limited by the demand, B tsc . The demand in the balancing market is very low compared to the demand in the dayahead market, and often so low that a single market participant is able to supply the entire volume. As the balancing market price is set from the last activated bid, a producer can in theory set the market price in cases when there are no other producers placing lower bids. However, low liquidity in the balancing market is in itself not an argument for market power [17]. The price taker assumption can thus still be considered valid.
The commitments are defined as positive for both balancing market states, while the demand is negative when the system is in the downward balancing market state. A market indicator, U m , which equals +1 for m = 1 and −1 for m = 2 , is therefore introduced. Multiplying the market indicator with the demand gives a positive upper limit for both balancing states. The upper and lower limits for the commitments in the balancing market are expressed by (11). The binary variable, B tscm , forces the commitments to be between the upper and lower bounds, if different from zero: The sum of the commitments in the markets must be covered by production from the hydropower system. The total production in the system is the sum of production for each generator, x gtsc , as expressed in (12). The market indicator is multiplied with the balancing market commitments, as downward ramping is a repurchase of production: The produced volume must be found based on a feasible production schedule for the hydropower river system. We introduce a set of reservoirs R = {1, … , R} , and a subset G r ∈ G , which define the generators connected to reservoir r. The reservoir volume, v trsc , at the end of hour t is given by the reservoir balance in (13). Initial reservoir volumes must be given for the first time step. The reservoir volume increases due to inflow, I tr , and decreases with discharge, d gtsc , spill, s trsc , and bypass, b trsc . Inflow is modeled as a deterministic parameter due to its low impact for a short time horizon. The term o trsc , is defined as the sum of the discharge, spill, and bypass coming from connected reservoirs at a higher level (14). Reservoirs are connected using indicator matrices, which defines if water can be sent from reservoir r ′ to reservoir r. The different matrices are the discharge matrix, J D r ′ r , the spill matrix, J S r ′ r , and the bypass matrix, J B r ′ r : The reservoir volume and bypass have upper and lower limits as expressed by (15) and (16), respectively: A linear relationship between the power output, x gtsc , and the discharge rate, d gtsc , is assumed. The production-discharge curve is thus approximated as a concave piecewise linear function in (17), where a set of discharge segments, E = {1, … , E} with coefficients R ge as well as a minimum production level ( Q g ) is introduced. The discharge for each segment is denoted d E gtesc and is restricted by an upper limit, D ge as expressed by (18). The total generator discharge, d gtsc , equals the sum of the minimum discharge and the all segment discharges, as expressed by (19). An example of a production-discharge curve with five discharge segments is illustrated in Fig. 5: In (17), G gtsc is a binary variable indicating if the generator is on or off. This variable is also used in (20) to force the production, x gtsc , to be within the maximum and minimum capacity if the unit is running: A start-up cost, C S g , is induced each time a generator starts after not running the hour before. In (21), multiplying the unit start-up cost with the binary on/off variables gives the total start-up cost, y gtsc : As explained in regard to Fig. 1, the schedule for the first deterministic day ( T P ) are known from the market clearing and planning process the day before. This is imposed by (22), where P gt is the known schedule: The objective of the bidding problem is to maximize the expected profits from participating in the day-ahead and balancing market. Given the stochastic nature of prices and volumes for the various products, it might also be relevant for generating companies to consider other objective functions that include some sort of risk management, like CVaR. This could be incorporated into our modelling framework if needed but would require strategic input in the form of trade-offs parameters between mean profit and risk. In lack of this input, we have chosen to maximize the expected profits in the analyses presented in this paper. The revenue from each market during the hours of operation is calculated as the market price multiplied with the commitment in the market. A longer planning horizon ( T H ) has to be included in addition to the hours of operation ( T O ), in order to prevent the model from only seeing opportunities the following day. For the hours after operation, t ∈ T H ⊂ T , bidding is relaxed, and it is assumed that the producer sells all its output to the day-ahead market. The revenue from this period is thus included in the objective function by multiplying the day-ahead market price by production x gtsc , and not commitments. Including these future profits is not enough to keep the model from producing at full capacity during the short-term horizon, as it would be beneficial to produce as long as there is water in the reservoirs. Thus, the value of water remaining in the reservoirs after the end of the horizon must be considered. This is described by the water value W r which is assumed to be a known input calculated from longer term hydropower scheduling models. The water value is multiplied with the reservoir volume in the final hour, v |T|rsc , less the initial volume, V 0 r . An energy equivalent, E r , indicating how much energy that can be extracted for each m 3 of water, is included in the expression to obtain the correct units. Start-up costs, y gtsc , are included for all time intervals, except the first deterministic day. The market indicator, U m , is included in the calculation of revenues for the balancing market. A penalty, Z, for spill is included to make sure that spill is undesired in the system, even in cases where spill ends up in a lower reservoir and increase the power output downstream. The objective of the three stage stochastic mixed integer program is presented in (23):

Backtesting framework
When evaluating the performance of the bid optimization model presented in Sect. 2, the decisions should be compared with current practice. In today's hydropower industry, the bidding process often rests on the skills of the operating engineers. Most producers consider each market separately in the order of market clearing. Even if coordinated bidding models can be formulated, implementing more complex models in operations has a cost. Therefore it is essential to determine the gain from coordinated bidding. Experimenting with alternative bidding strategies in real operations can lead to loss in profits, so a backtesting framework using historical data is a safe alternative.
To test the practical performance of the coordinated bidding method, the model is executed in three parts, as shown in Fig. 6. For the coordinated strategy, model 1 is the model as described by (1)- (23) in Sect. 2, for which all market prices and balancing market volumes are uncertain. To mimic the sequential clearing of the markets, the day-ahead market decisions are the first to be submitted. The day-ahead bid curves are thus saved as output of the first model. To calculate the commitments in the day-ahead market, these bid curves are used as input in model 2, along with the realized day-ahead market prices. Using this information, the day-ahead market commitment w D ts is calculated based on (1) and used as input to model 2. Model 2 Fig. 6 Framework for backtesting the coordinated and sequential bidding strategy re-optimizes the balancing market bids based on the now known commitments from the day-ahead market (i.e. w D ts fixed) as a solution to an optimization model consisting of (3)- (23). The bid curves for the balancing market are saved as output of model 2. The bids are then used together with the realized balancing market price to determine the balancing market commitments, w B tscm . In model 3, both the commitments from the day-ahead market and the balancing market are fixed, and the optimization calculates an optimal production schedule according to (3)-(5), (12)- (23).
A similar approach is also implemented for a sequential bidding strategy. In this case, model 1 optimizes the bid curves for the day-ahead market without considering the opportunities in the balancing market, that is, using (1)-(4), (12)- (23). Model 2 and 3 are the same as for the coordinated bidding strategy. The difference between the coordinated and sequential approach is that the coordinated approach may optimize the day-ahead bid curves while seeing opportunities in the balancing market, whereas the sequential approach may not.
For each day in the sample period, the optimization models are run in three parts as described above. The results are saved, and the procedure is repeated for the next day. The production plan for the bidding day as well as reservoir levels from model 3 are used as input for the next day. Water values are obtained as historical data from an industrial partner and updated weekly in the period. The input with a dashed perimeter is updated every day, this includes forecasts/scenarios for market prices and demand as well as historical realized values for the same parameters and inflow.
Forecasts for the day-ahead market prices have been obtained from an industrial partner, whereas forecasts for the balancing market have however been specifically developed for the backtesting procedure, see Sect. 4. Scenarios are generated using the method described in [24], where historical forecast errors are combined with point forecasts to generate scenarios. For the day-ahead market, historical forecast errors have been obtained by considering the differences between the industrial partners historical forecasts and realized prices. For the balancing market, historical forecast errors have been obtained by using the prediction model presented in Sect. 4 to predict daily forecasts and comparing this to realized prices and demand in the balancing market.
The backtesting procedure is carried out for 200 consecutive days in the period from July 1, 2017 to January 16, 2018, for a hydropower system located in southwest Norway. The river system consists of four reservoirs in cascade. There is only one power station, which is located downstream of the lowest reservoir. The power station contains one generator with a minimum and maximum capacity of 16 and 80 MW.
The number of day-ahead outcomes S used is 40, and for each day-ahead market scenario, 10 balancing market outcomes are used. To evaluate the stability of the solution, we ran calculations using 10 to 140 day-ahead market outcomes for selected days, and the solution stabilized around 40 scenarios. So this number of scenarios was chosen for the benchmark procedure. Similarly, tests using 40 dayahead outcomes and varying number of balancing market outcomes on selected days indicated that the solution became stable at around 10 balancing market outcomes, so this was selected.
The number of bid points I highly affect the run time of the models and is therefore set to a relatively low number of 10 points for both the day-ahead and balancing markets. This is the same number of points used by [11]. Our own calculations using a higher number of points on selected days did not lead to any significantly different results than what is presented. The price points are found by dividing the historical data into eight quantiles. In addition, minimum and maximum points are set at −500 and 3000 EUR according to the market rules. As the market prices varies throughout the year, the quantiles are recalculated monthly based on the historical data.
The optimization models are implemented in Xpress-IVE 64 bit using Xpress-Mosel, and solved with Xpress-Optimizer. The backtesting procedure is implemented using Python 2.7, and run on computers with an Intel Core i7-7700 3.60 GHz CPU and 32.0 GB installed RAM.

Forecasting the balancing market
Prediction models for the day-ahead market have been an important tool in the power industry since deregulation [19]. Due to expectations of increasing volumes in the other short-term markets, methods for predicting these markets has become more relevant.
The balancing market is designed to handle unforeseen events, and the prices and volumes should thus be random. If the balancing market is an efficient market, [17] points out that any predictable event that can cause an imbalance in the system the day of operation, should be incorporated in the day-ahead market settlements. However, in order to do coordinated bidding, market agents need to have information or predictions about the balancing market outcome before the day-ahead market clears.
For stochastic models, the evaluation of a decision made under uncertainty is dependent on the stochastic process. An optimal solution of the bidding problem is only optimal for the discrete stochastic process given by the scenario tree. The scenario tree is based on forecasts and it may therefore be difficult to separate the performance of the forecast from the performance of the optimization model. We therefore compare the sequential and coordinated approach for different prediction models, where we use a naive forecast method predicting zero imbalance in expectation to give a lower bound and a forecast with perfect information to give an upper bound. Between these two extremes we develop an artificial neural network (ANN) forecast to give a more realistic estimate. ANNs are able to model nonlinear relationships between variables and have been successfully used for forecasting electricity prices in earlier work [25,26]. We develop a simple ANN that is used as an example of a viable forecasting method for the balancing market but admit that fine-tuning of a forecasting method has been left for further work. For all prediction models we do use (perfect information, zero imbalance and the ANN), we follow [17] and model the balancing market premium rather than prices, as well as the available balancing volume.
To develop the ANN forecasting method, we considered relevant market and climate data. Forecasts for day-ahead market prices and weather forecasts are provided by an industrial partner. Forecasts for consumption and production were retrieved from Nord Pool's database, and historical climate data were downloaded from the Norwegian Meteorological Institute's database eKlima. The data is mainly based on the NO2 price area, but also include data for connecting areas such as DK1. All data is available from 1 January 2013 to 16 January 2018. However, we use the data from July 1, 2017 to January 16, 2018 for the backtesting procedure, and the rest of the available data is randomly divided into training (80%) and testing data (20%) for the ANNs.
To identify possible input data for the ANNs, we calculated the correlation coefficients between historical observations of the different data series. We also tested the relationship between different exploratory variables and the balancing market through multiple linear regression, both for raw data, their lagged values and processed versions. For instance, we developed indicator series using logical statements based on the data that considered changes from day to day and calendar effects as well as daily, hourly and seasonal effects. This gave some information on input variable selection for the ANNs, and we further validated the selection by sensitivity tests. The sensitivity tests were done by varying one variable in the neural network at a time, while holding the remaining variables constant. The input variables which proved to give the best accuracy of the ANNs are presented in Table 1.
The ANNs are designed as multi-layer perceptron models (MLP), which is a class of feedforward neural networks. The models are created as three-layer networks with one hidden layer, though several hidden layers were tested. Supervised learning is used to train the networks, using a backpropagation network learning algorithm to adjust the weights and biases. The root mean squared error (RMSE) is used to measure the error between the output value and the target value.
In the backtesting procedure, the ANNs generate daily forecasts that are used together with the scenario generation method in [24] to generate scenarios for the optimization models. The naive method of predicting zero imbalance gives no new information about the future, but provides a scenario tree with the historical distribution of the volumes' and premiums' deviations from zero. With the perfect information model, there is no need for scenarios in the optimization model and the balancing market prices and demand are deterministic and equal to the historical realized values.

Coordinated versus sequential bidding
We evaluate the gain of coordination by considering the total value for the coordinated and sequential approach in Table 2. The total value is the sum of market revenues for each day in the testing period, less start-up costs plus the value of water stored in the reservoirs at the end of the testing period. An insignificant gain of 0.07% in total value is obtained by using the coordinated model with the ANN forecast. We observe that the coordinated model utilizes the balancing market more, as expected. It obtains higher revenues from upward ramping, but also higher costs from downward ramping. The sequential model obtains higher revenues in the dayahead market, which is not surprising as it allocates the optimal amount of capacity for the day-ahead market first. However, the amount offered in the day-ahead market restricts the idle capacity that can be used in the balancing market. The results show that the sequential model obtains lower start-up costs than the coordinated model, which is somewhat unexpected for a coordinated strategy which takes both markets into account during the bidding process. However, the total difference in revenue is small. In order to compare the production patterns of the two approaches, we calculate the distribution of the production volumes, i.e. the number of hours the generators is run on various levels. The results are shown in Fig. 7. It is evident that for zero, minimum production (16 MW) and maximum production (80 MW) are the most used production Fig. 7 The production levels for the coordinated (top) and sequential approach (bottom) levels for both methods. However, the coordinated model utilizes more of the volume levels in the range between minimum and maximum capacity in order to be able to ramp up to maximum capacity, or ramp down to either minimum capacity or zero.
We also consider the average revenue per MWh for the two approaches. The average revenue per MWh is calculated by dividing the sum of market revenues by the total production in the period. While the total value illustrates the ability of the model to utilize the water in the best possible way, the average revenue is a measure of how well the bidding strategy adjusts the production allocation according to the market prices. Producing at high prices in the day-ahead market, and utilizing high premiums in the balancing market, increases the average revenue.
The coordinated model has an average revenue of 30.63 [EUR/MWh], while the sequential method has an average revenue of 30.57 [EUR/MWh]. This difference indicates that the coordinated model is slightly (0.17%) better at adjusting the power production according to the market prices which maximizes the total revenues. Our results of limited gains are in line with previous results (e.g. [27]) but are moderate compared to [28], which find gains up to 2%. However, they do not model uncertain demand in the balancing market as we do and thus their estimates are more optimistic. If demand in the balancing market increase due to more intermittent production, the gain from coordination may increase.

Quality of the balancing market forecast
We also want to quantify the effects of the quality of the forecasting method. We therefore run the backtesting procedure for the coordinated model when predicting zero imbalance in expectation and having perfect information.
Predicting zero imbalance is a naive method, however, it is still reasonable because the system should be in balance in expectation. The value of coordination using the zero imbalance forecast is estimated to be 0.0%. This gives a lower bound on coordination that is in line with theory: the coordinated approach will do equally well or better than the sequential approach.
The other case considered is having perfect information of the balancing market. With perfect information, the performance of the model increases substantially. The perfect information case obtains a gain of coordination of 3.80% higher total value and a 5.60% higher average revenue. These values are the upper limit of the coordination gain that can be achieved with a very accurate prediction model for the balancing market. It is also evident from these results that the ANN prediction model developed in this paper has room for improvement-a gain of 0.07% may not be significantly different than the lower bound at zero.

Conclusions
The coordinated bidding problem for a hydropower producer considering the Nordic day-ahead and balancing market is formulated as a three-stage stochastic mixed integer program. The optimization model and different prediction models are evaluated in an extensive backtesting procedure simulating real operations. The results are analysed in two dimensions; first, we consider the gain of using a coordinated over a sequential approach for solving the bidding problem, second, we consider the value of improved prediction models for the balancing market. For this we tested the bidding model using a forecast predicting zero imbalance in expectation and a forecast having perfect information as well as developing a three-layer perceptron artificial neural network with one hidden layer for forecasting prices, direction (up or down) and volume. By comparing the results of the coordinated approach to the sequential approach using the ANN forecast, only modest improvements (0.07%) in total value are found. This may not be significantly different than the lower bound at 0% that is estimated using the zero imbalance forecast. By using perfect information forecasts, an upper limit of the gain for coordination is estimated to be 3.8%, which indicate that a substantial gain in profits can be obtained by coordinated bidding if accurate forecasts could be developed. Our recommendation is that further research and industrial efforts should be focused on developing high quality prediction models for the balancing market. This could be done by using machine learning methods that utilize a larger set of input data than what is used in our work.
In addition, another strand of future research could be devoted to the modelling of the bidding problem itself. Modest calculation times are needed for our test case that uses a limited number of scenarios, but the scalability of formulations based on deterministic equivalents of stochastic programs is limited. Formulations that better enable representations of the distribution of future prices, ramping direction, volume and inflows to a cascaded set of reservoirs, will improve the applicability of the bidding model. This can for example be done by using decomposition, dynamic programming methods or robust optimization.
Funding Open access funding provided by SINTEF AS. This study was funded by Norges Forskningsråd (Grant no. 243964).
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.