In this section, the novel algorithmic solution proposed to solve the sequential decision-making problem behind the long-term electricity procurement task is presented in detail.
Section 2.1 analyses the scientific literature on this particular topic.
Section 2.2 then comprehensively formalises the sequential decision-making problem at hand. Subsequently,
Section 2.3 presents the algorithm developed to solve this problem.
2.1. Literature Review
The scientific literature proposes multiple strategies for electricity producers willing to sell their energy in the forward market. On the other hand, the sides of the retailers and consumers lack proper scientific coverage, with only a few articles currently available. The solutions presented are typically based on stochastic programming and optimisation techniques. Article [
1] proposes a solution to the electricity procurement problem faced by a major consumer whose supply sources include bilateral contracts, self-production and the day-ahead market. A stochastic programming approach is considered, with risk aversion being modelled using the conditional value at risk (CVaR) methodology. The proposed solution is assessed through a realistic case study which highlights the trade-off between cost minimisation and risk mitigation. One chapter of the book [
2] is dedicated to the electricity procurement problem from a major consumer perspective, while another chapter discusses the case of a retailer in a medium-term horizon. In both cases, the electricity procurement problem is mathematically formulated as a multi-stage stochastic programming problem, where the evolution of the price is modelled as a stochastic process using a set of scenarios and the risk aversion is modelled through the CVaR. The work concludes that multi-stage stochastic programming appears to be an appropriate modelling framework to make electricity procurement decisions under uncertainty, with the complex multi-stage stochastic model being translated into a tractable mixed-integer linear programming problem. Article [
3] introduces a technique based on information gap decision theory to assess different procurement strategies for major consumers. The objective is not to minimise the procurement cost but rather to assess the risk aversion of some procurement strategies with respect to the minimum achievable cost. The results suggest that strategies related to a higher procurement cost are more robust and risk averse. Article [
4] proposes a robust optimisation approach to solve the electricity procurement problem from a retailer perspective. A collection of robust mixed-integer linear programming problems is formulated, with the electricity price uncertainty being modelled by considering upper and lower limits for the energy prices rather than the forecast prices. Articles [
5,
6] present a stochastic optimisation approach relying on the integration of the paradigm of joint chance constraints and the CVaR risk measure to solve the electricity procurement problem from a consumer perspective. The results for a real case study highlight the trade-off between risk and reliability by considering different levels of risk aversion. Article [
7] proposes another multi-stage stochastic programming model for the long-term electricity procurement problem faced by a major consumer, where the complexity of the task is reduced by dividing a one-year planning into seasons. In this model, a season is represented by characteristic weeks and the seasonal demand is revealed at the beginning of each season. Article [
8] presents a short-term decision-making model based on robust optimisation to help an electricity retailer in determining both the electricity procurement and its electricity retail price so that profit is maximised. Two possibilities are offered to the retailer for its electricity procurement task: directly purchasing energy from generation companies and buying electricity on the spot market. Article [
9] tackles a slightly different aspect of the electricity procurement problem as it studies how to size and use energy storage systems to minimise the procurement costs of electricity. The study focuses on short-term energy procurement by considering both the day-ahead market and the real-time market. Article [
10] studies a multi-period electricity procurement problem in the specific context of smart-grid communities. The required energy can be obtained from both the day-ahead market, characterised by variable prices, and renewable energy sources which are free but with uncertain supplies. To determine the optimal procurement amount, the authors consider an approach based on dynamic programming which has been proven to provide significant cost-savings. Article [
11] introduces an agent-based two-stage trading model for direct electricity procurement of major consumers, which considers both the fairness and efficiency of direct energy procurement. According to the authors, this novel mechanism could offer more choices for both major consumers and generation companies which could also benefit from the reduction of the average market price.
To summarise, the solutions to the electricity procurement problem presented in existing scientific literature are mainly based on stochastic programming, dynamic programming and optimisation techniques. Moreover, the sequential decision-making problem behind the electricity procurement task is formalised in many different ways (time horizons, electricity power sources and markets, electricity consumption), meaning that a fair comparison between these solutions is not really feasible. Nevertheless, despite being very sound and interesting works, these approaches are not well established on a large scale within the industry. One reason for this is certainly the fact that these solutions are generally black box models which can be quite difficult for inexperienced employees to understand, interpret and monitor on a daily basis. Another observation regarding the scientific literature is the surprising absence of approaches based on advanced artificial intelligence techniques. To fill this gap, the present research paper introduces a novel algorithmic solution taking advantage of the recent and promising results achieved by DL techniques in many fields. Therefore, the main contribution of this research work is as follows: the development of an algorithm building on the promise of DL techniques to provide accurate forecasts to make sound and explicable trading decisions for long-term electricity procurement tasks.
2.2. Problem Formalisation
In this section, the long-term electricity procurement problem considered is thoroughly presented and formalised. It is assumed that the only supply source at the disposal of the agent, whether a retailer or a consumer, is the calendar product (CAL) from the Belgian forward market operated by Ice Endex (Belgian Power Base Futures). This yearly base load product is tradable up to three years ahead of the delivery period. For instance, the CAL 2018 product corresponds to the delivery of electricity for the entire year 2018, this energy being tradable between 2015 and 2017 included, as depicted in
Figure 1. This is a slight simplification of the reality, where the agent may consider other products from the forward market but also the day-ahead market if its demand is not entirely covered.
The long-term electricity procurement problem involves the forecast of the electric energy consumption for the future period considered. In this research paper, the total quantity of electricity to be purchased over the procurement horizon is denoted Q. For the CAL product, this procurement horizon corresponds to a period of three years and the quantity Q represents the consumption for one future year. It should be mentioned that this problem statement could be easily adapted to the case of a major electricity consumer signing a flexible bilateral contract with its retailer. In such a context, the energy price is generally set by another signal, defined in this contract, which is generally indexed on the forward prices.
In this research paper, the continuous trading timeline is discretised into a number of discrete time steps t of constant duration . In this case, the agent is assumed to be able to make only one decision per trading day, meaning that is equal to one day. In the context of the long-term electricity procurement task, a trading or procurement strategy represents the set of rules considered to make a decision. Mathematically, a procurement strategy is defined as a programmed policy which, based on some input information at time step t, outputs a trading decision so as to maximise an objective criterion. The input, output and objective criterion considered in this research paper for the electricity procurement problem are presented in the next subsections.
2.2.1. Procurement Strategy Input
Ideally, the procurement strategy input
at time step
t should encompass every single piece of information capable of affecting future electricity prices. Nevertheless, a major difficulty of the electricity procurement problem is the unavailability of such information, which can be both quantitative and qualitative, and can take various forms. This situation leads to significant uncertainty, with changes in price being impossible to accurately explain and/or predict. In this research paper, the input
at time step
t is modelled as follows:
where:
2.2.2. Procurement Strategy Output
At each trading time step, the agent has to decide whether to purchase electricity right now or to wait for a future opportunity. Consequently, the procurement strategy output
at time step
t is binary and can be mathematically expressed as the following:
with
corresponding to the advice of waiting, and
to the advice of buying electricity.
Whenever purchasing electricity, the agent is required to specify the quantity traded. In this research paper, the volume contracted is assumed to be fixed. The total quantity of electricity Q is simply split into purchase operations of a fixed amount of electricity . Consequently, the quantity of energy purchased at each trading time step t would either be equal to 0 or A depending on the algorithm output . However, this approach does not take into account the resolution of the market , corresponding to the smallest block of electricity tradable. To address this issue, the quantity of energy Q is constrained to be a multiple of this market resolution . Moreover, the procurement strategy parameter N is constrained to be such that the amount of electricity is a multiple of the market resolution .
An important constraint is assumed regarding the procurement strategy output
. The agent is required to have purchased the exact quantity of electricity
Q by the end of the trading activity. As a result that no selling operations are permitted, the agent is not allowed to buy electricity in excess of its consumption. Moreover, anticipation is necessary as the agent is only able to buy the amount of electricity
A at a time. Let
be the number of remaining purchase operations to be performed by the agent at time step
t, this quantity should never exceed the number of remaining time steps
in practice. Eventually, this constraint is mathematically expressed as follows:
In order to realistically simulate the trading activity associated with the electricity procurement task, the trading costs have to be considered. This research paper assumes that the only trading costs incurred by the agent are the transaction costs. As their name indicates, these costs occur when a transaction is performed. Therefore, they are modelled with a fixed fee to be paid per MWh of electricity purchased in the forward market.
Making the hypothesis that the electricity is always successfully purchased by the agent, the state variable
is updated in line with the following equation:
2.2.3. Objective
In the scope of the electricity procurement problem, the core objective is the minimisation of the costs incurred for buying energy. However, such an intuitive goal lacks the consideration of the risk associated with the trading activity, which should ideally be mitigated as well. In fact, there exists a trade-off between cost minimisation and risk mitigation, in accordance with the popular saying: with great risk comes great reward. However, this research paper only considers electricity cost minimisation as the objective. Therefore, the quantity to be minimised is the total cost incurred by the agent at the end of the procurement horizon
, which is mathematically expressed as follows:
2.3. Algorithm Description
This section thoroughly presents a novel algorithm, named
Uniformity-based Procurement of Electricity (UPE), to solve the long-term electricity procurement problem. The key idea behind this algorithm is the potential benefit to speed up or delay purchase operations with respect to a reference procurement strategy when the prices are expected to go up or down in the future. At its core, this algorithm is based on the coupling of both the identification of the dominant market direction and the estimation of the procurement uniformity level quantifying the deviation from a perfectly uniform procurement policy. The first important component of this procurement algorithm is the forecaster
F whose responsibility is to accurately predict the dominant market trend, either upward or downward. In this context, the trend can be defined as the general direction in which the electricity price is currently going. The forecaster
F takes as input a series of
K previous CAL prices
, which were formerly normalised, and outputs the predicted trend:
with
and
respectively corresponding to a forecast upward and downward trend.
A market trend is a subjective notion which possesses multiple definitions in the literature. For instance, some may argue that a surprising decrease in prices for a week is a new downward trend when others consider this behaviour as a temporary deviation within a more global upward trend lasting for months. In fact, the two opinions are right depending on the time horizon considered. This research paper adopts the following rigorous mathematical definition to eliminate any ambiguity. A smoothed version of the electricity price curve is generated by applying a lag-free low-pass filtering operation of large order
k, typically several weeks. The resulting smoothed price at time step
t is mathematically expressed as follows:
As an illustration, the result of this low-pass filtering operation with
is depicted in
Figure 2 for the CAL 2018 product. The market trend at time step
t is defined as the difference between two consecutive smoothed prices
and
. More specifically, an upward trend
is designated when
and a downward trend
is specified when
, with
representing the market trend labels. This rigorous mathematical definition of a market trend is intuitive and convenient, but not perfect. As future work, more complex definitions of the market trend could be investigated. For instance, the market trend could be defined as the slope of the straight line produced by a linear regression operation on price data over a certain time period. Despite being subjective, human annotations could alternatively be considered as well.
The second important component of the UPE algorithm is the concept of procurement uniformity, which is based on the comparison of the current situation with a reference policy: the perfectly uniform procurement strategy. This reference policy implies buying the same amount of electricity
at each trading time step over the entire procurement horizon. Despite being generally not feasible in practice due to the market resolution
, this strategy is an interesting candidate for comparison purposes as the average electricity price is achieved with a risk spread over the entire procurement horizon. In doing so, this research paper introduces the procurement uniformity level
which quantifies the deviation from such a perfectly uniform strategy:
Three cases arise depending on the value of :
: The agent has purchased a quantity of electricity equal to the amount of energy that a perfectly uniform procurement strategy would have already bought at time step t.
: The agent is currently leading compared to a perfectly uniform procurement strategy.
: The agent is currently lagging compared to a perfectly uniform procurement strategy.
The decision-making process of the UPE algorithm is based on the comparison of the current procurement uniformity level with two trigger values and . When the agent waits with purchase operations still to be performed, the procurement uniformity decreases over time. The idea of the proposed algorithm is to issue a new purchase operation when this indicator hits the trigger value associated with the predicted trend, for upward and for downward. Consequently, the trigger values represent how long the agent is willing to wait when a certain market trend is detected. These are parameters of the algorithm to be set by the agent according to its expectations regarding the market dynamics and its sensitivity to the trading risk.
Algorithm 1 details the decision-making process of the UPE algorithm for one time step
t. Additionally, for the sake of clarity, a graphical illustration of the UPE algorithm is presented in
Figure 3. If a stable increase in the electricity prices is predicted by the forecaster
F, happening when
, the agent is instructed to wait for as long as the procurement uniformity
remains above the trigger value
. Similarly, if a downward trend is likely to happen according to the forecaster
F, with
, the agent is advised to wait for as long as the procurement uniformity
exceeds the trigger value
. With such a decision-making policy, the two trigger values quantify how long the agent is willing to wait when a certain trend is forecast. Consequently,
should normally be inferior to
as it is natural to wait longer when the prices are expected to decrease in the future.
Algorithm 1: UPE algorithm decision-making policy for one time step t |
- 1:
Inputs: Procurement strategy input , forecaster F (formerly trained if necessary), trigger values and . - 2:
Execute the forecaster . - 3:
Compute the procurement uniformity . - 4:
ifthen - 5:
Make the trading decision to buy electricity: . - 6:
else ifthen - 7:
Make the trading decision to buy electricity: . - 8:
else - 9:
Make the trading decision to wait: . - 10:
end if - 11:
return
|
In this research paper, two forecasters are considered to approximate the true values of the market trend previously defined based on past price data only. They are respectively called basic forecaster and DL forecaster. In both cases, the forecasting model is trained once on a series of past CAL prices and then remains fixed until the end of the trading activity. There is no retraining or update of the model parameters as new data progressively become available. However, this retraining/updating operation may be particularly useful in this context where the price dynamics is constantly changing. This potential improvement will be further addressed in future work.
2.3.1. Basic Forecaster
In finance, a popular approach to acquire insights about the market trend from past data consists in comparing two moving averages of different window lengths, as explained in the book [
12]. The idea is to assess how the more recent prices represented by the shorter moving average evolved with respect to the older prices described by the longer moving average. Both window lengths
and
are parameters to be tuned, with typical values being several weeks or even months. The moving average of window length
L for time step
t is mathematically expressed as follows:
With such a definition, an upward trend is naturally expected when the shorter moving average is larger than the longer one, i.e., if . On the contrary, a downward trend is awaited when the shorter moving average is smaller than the longer one, i.e., if . This relatively basic approach is considered for the first forecasting model of this research paper. The UPE algorithm employing this basic forecaster is named Uniformity-based Procurement of Electricity with Moving Averages (UPE-MA).
2.3.2. DL Forecaster
A more advanced approach based on recent DL techniques is considered for the second forecasting model. This forecaster
consists of a feedforward DNN composed of
hidden layers with
neurons each. Leaky rectified linear unit activation functions, introduced in the article [
13], are chosen for the hidden layers. Generally referred to as
Leaky ReLU, this activation function is mathematically expressed as follows:
As a result that the trend forecast is a classification problem, a
softmax activation function is selected for the output layer to return the probabilities associated with each trend, as explained in the book [
14]. The forecaster
naturally outputs the market trend associated with the greatest probability. The softmax activation function takes as input a vector of real numbers
and outputs a vector of
J real numbers bounded between 0 and 1 representing probabilities:
The training of this DNN is performed with the
ADAM optimiser introduced by the article [
15] and a
cross-entropy loss to be minimised, inspired from the article [
16]. Widely used for classification tasks and also referred to as logarithmic loss, the cross-entropy loss is computed as follows:
where:
B is the batch size.
x is the DNN input.
y is the DNN output.
is the classification label.
represents the parameters of the DNN.
represents the probability of the event ☆.
Additionally, both dropout and L2 regularisation techniques are adopted for generalisation purposes (for handling overfitting). All the DL techniques mentioned are covered in more details in the article [
17] and the book [
14]. Eventually, the deep learning model considered for forecasting is illustrated in
Figure 4. As previously suggested, the dataset used to train this DL forecasting model includes a series of previous CAL price histories
for the inputs and a series of associated market trends
previously defined for the outputs. In this research paper, different training, validation and test sets are considered for training the deep learning model, tuning its hyperparameters and evaluating its accuracy. The UPE algorithm operating the forecaster
is named
Uniformity-based Procurement of Electricity with Deep Learning (UPE-DL).