Next Article in Journal
The Effect of Renewable and Non-Renewable Energy on Economic Growth: A Panel Cointegration Analysis for the Top Renewable Energy Consumers (1970–2023)
Previous Article in Journal
Discharge-Based DC-Bus Voltage Link Capacitor Monitoring with Repetitive Recursive Least Squares Method for Hybrid-Electric Aircraft
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Forecasting Electricity Prices Three Days in Advance: Comparison Between Multilayer Perceptron and Support Vector Machine Networks

by
Dariusz Borkowski
* and
Michał Jaśkiewicz
Department of Electrical Engineering, Faculty of Electrical and Computer Engineering, Cracow University of Technology, Warszawska 24 St., 31-155 Cracow, Poland
*
Author to whom correspondence should be addressed.
Energies 2025, 18(17), 4744; https://doi.org/10.3390/en18174744
Submission received: 31 July 2025 / Revised: 3 September 2025 / Accepted: 4 September 2025 / Published: 5 September 2025

Abstract

Electricity prices are subject to constant changes, mainly owing to the increasing share of unstable renewable energy sources. The ability to predict short-term prices presents significant benefits to both energy consumers and producers. This is crucial for managing the energy in hybrid systems with energy storage. This study presents a methodology for predicting the electricity prices for three days with hourly resolution. The accuracy of the price prediction strongly depends on the stability and repeatability of the analysed energy market. The Polish market, characterised by a dynamically changing energy mix, where the selection of the training period and the training, validation, and test sets are crucial, is assessed. Two periods are analysed: 2019–2021, which is a period of stable prices, and 2022–2024, which is a period of high price variability. The multilayer perceptron (MLP) network and support vector machine (SVM) are trained using three sets of data: time, weather, and prices of various energy sources. The analysis indicates the correlation of data and their impact on the accuracy of the price forecast. Dedicated data processing, network model structures, and training techniques are used. The comparison between prediction accuracies shows the advantages of the SVM network, whose prediction error is lower by 45% for the period of stable prices and by 20% for the period of variable prices when compared with the MLP network. The results indicate a significant increase in accuracy when various types of training data, such as weather or energy prices, are considered.

Graphical Abstract

1. Introduction

Forecasting electricity prices is one of the key challenges in modern energy markets, particularly owing to the dynamic increase in the share of renewable energy sources (RESs) such as wind and solar energy. High price volatility, the occurrence of negative prices, and complex relationships between the economic, weather, and technological factors require advanced predictive models that combine high accuracy, the ability to model nonlinearities, and practical utility in risk management and operational planning. In previous studies, various approaches, from simple neural networks to advanced deep-learning models, were employed, revealing both significant progress and substantial gaps that limit the effectiveness of the existing methods.
Electricity price forecasting (EPF) was introduced in the 1990s when markets began to be deregulated, thereby increasing the price volatility and the need for accurate forecasts [1]. Electricity requires constant balance in the power system [2], and the best predictive models for balancing supply and demand had to be identified. Over the years, various models have been used for price forecasting, including agent-based simulation models, statistical models, and computational intelligence models [1,3]. The foundations of the computational intelligence (CI) models were explained in [4], which discussed the principles of electricity price determination and forecasting. These principles primarily depended on the price formation, volatility, and exogenous variables. The CI model comprises a range of computational methods, primarily artificial intelligence and machine learning algorithms, which are employed in this article. A comprehensive review of point forecasting models for electricity, including an assessment of model performance in day-ahead, intra-day, and balancing markets, is presented in [5].
Currently, in electricity markets, excluding forward contracts, energy can be contracted for delivery one day in advance [6]. Essentially, accurate forecasting presents considerable savings for the energy consumers and indirectly contributes to the balance in the power system. EPF typically can be categorised by the forecasting horizons: short-term, medium-term, and long-term. Short-term forecasting typically includes up to a few days ahead, medium-term spans from a few days to several months, and long-term forecasting includes months, quarters, or years [7].
Forecast evaluation typically employs the mean absolute error (MAE) and mean absolute percentage error (MAPE) [8]. However, several other evaluation indicators are used in the price prediction articles. The EPF community has not standardised the evaluation methods [7], which creates challenges in interpreting the results of various prediction methods.
In recent years, artificial intelligence (AI) has become embedded in nearly every aspect of daily life. In electricity price forecasting, AI is used to improve time-series analyses, among other applications [9,10,11]. Typically, forecasting is applied to enhance the prediction accuracy, which is expressed through the sum of squared errors [12]. One of the most frequently used methods is the artificial neural network (ANN). The ANN computational procedures are based on the learning mechanisms of the human brain. The performance of ANNs depends on the network structure [13]. Multilayer perceptron (MLP) is the most commonly used neural network in price forecasting [14]. Other algorithms applied in this field include support vector machines (SVMs) and Gaussian process regression. These are kernel-based machine learning methods used for data analysis [15]. SVMs are widely used supervised-learning algorithms [16]. Support vector regression is a generalisation of SVM used for regression problems [17]. Additionally, some studies employed decision tree algorithms, particularly regression trees, for price forecasting problems [18].
Several studies focus on short-term day-ahead forecasts (24 h) [19], which support trading decisions on energy markets such as PJM, EPEX SPOT, or TGE [20,21,22,23]. For example, Miller and Bućko [21] employed a simple three-layer MLP to forecast prices on the Polish TGE market, achieving a MAPE of 4.05%, although it was limited to historical prices, omitting exogenous variables such as weather or system load. Similarly, Hong and Wu [24] employed a hybrid principal component analysis (PCA)–multilayer feedforward (MLF) model on the PJM market, where PCA reduced the data dimensionality, and MLF forecasted prices with an R2 of up to 0.904 and an MAE of USD 13.66/MWh. Their approach included temporal variables and load but lacked weather variables, thereby reducing its effectiveness in markets with high RES penetration [24]. Meanwhile, Dias et al. [25] used an MLP with two hidden layers for medium-term forecasts (4 weeks) in the Brazilian market, thereby achieving a MAPE of 14.65%. Although this performance was satisfactory for long-term contexts, it does not satisfy the hourly precision requirements of the dynamic European markets. An innovative approach was presented in a previous study [26], where hybrid MLP topologies (parallel and cascaded) with six to eight hidden layers trained using Levenberg–Marquardt, scaled conjugate gradient, and gradient descent with momentum algorithms, achieved a MAPE of 1.42% on the Australian market (AEMO). A longer horizon than 24 h is crucial for medium-term operational planning, RES balancing, and energy portfolio management. However, limited research has been conducted in the context of MLP models.
Although MLP networks are effective in specific conditions, they have limited capabilities in modelling complex nonlinearities and dependencies between variables such as the wind speed, cloud cover, or temperature, which are crucial in markets with high RES penetration [7,24,25,26]. The model presented in [21] did not consider weather variables, thereby limiting its accuracy under variable market conditions. By contrast, the AEMO study [26] included exogenous variables such as load, weather, and gas prices. However, the lack of statistical tests and restriction to a single market reduced the generalisability of the results. Another study [27], which combined MLP with a genetic algorithm and machine committees on the Brazilian market, achieved high accuracy but required 9 days of training, making it impractical for real-time applications. Moreover, most MLP models, such as those proposed in [21,24,25], provided only point forecasts, whereas probabilistic forecasts, which are crucial for risk management in the uncertainty of RESs, are rarely applied in these approaches. Notably, in [8], the researchers demonstrated that MLP models are suitable for forecasting electricity prices on the Italian market owing to their high accuracy and lower risk of large errors, thereby achieving the best MAE of EUR 3.873/MWh for hourly forecasts. The results in [6] demonstrate that increasing the number of hidden layers or nodes in an MLP network does not improve the accuracy and may even reduce it.
An additional challenge is the limited automation of feature selection in the MLP models, which introduces subjectivity and reduces the reproducibility of the results. Miller and Bućko [21] manually selected the features, thereby increasing the risk of errors, whereas the model proposed by Hong and Wu [24] partially automated the process using PCA. However, full automation was not achieved, as observed in the more advanced AEMO approach [26]. Furthermore, most MLP-based studies [21,25,26] tested models on a single market; thus, assessing the universality of the models is difficult. Furthermore, the absence of rigorous statistical tests, such as Diebold–Mariano or Giacomini–White, which were conducted by Hong and Wu [24], reduces the reliability of the results when compared with more advanced models. Another approach, based on PCA for averaging ARX model forecasts on the EPEX SPOT market [23], achieved a reduction of 3.84% in the MAE for day-ahead forecasts, thereby demonstrating the potential of automated data processing; however, its application was limited to short-term horizons. A study on the EPEX DE/AT market [28], conducted using a deep neural network (DNN) with embedding layers for calendar variables, achieved an MAE of EUR 4.10/MWh, thereby incorporating wind and photovoltaic (PV) forecasts, highlighting the significance of RES variables in price modelling. These limitations demonstrate the requirement for new MLP models that combine simplicity with advanced techniques, thereby enabling accurate forecasts over longer time horizons.
Furthermore, the literature highlights the increasing importance of more advanced methods that can better handle nonlinearities and temporal dependencies. A hybrid Wavelet Transform + long short-term memory (LSTM) model, which was applied on the PJM market [20], achieved a MAPE of 0.40% for short-term load forecasts using automatic feature selection via mutual information and interaction gain. However, its practical application was limited by the high computational requirements. Additionally, a convolutional neural network (CNN)–gated recurrent unit (GRU) model with an attention mechanism applied in the German market [22] achieved a MAPE of 6.33%, thereby incorporating exogenous variables such as RES generation and load, although its computational complexity limited its real-time applications. An extreme learning machine model on the New York market [29] achieved low RMSE (0.0697–0.1301); however, the lack of exogenous variables limited its universality. In another study [30], distributed neural networks were employed for the probabilistic forecasting of electricity prices for the next day, along with a simple but effective aggregation method for these networks to increase the stability of forecasts. The autoregressive multivariate linear model with exogenous variables and LASSO for variable selection and regularization was introduced in [31]. The potential of meteorological forecasts to improve the accuracy of price forecasts, resulting in a 10–20% improvement in RMSE, was presented.
The specificity of the energy markets, such as the Polish TGE market, requires the consideration of local conditions such as the high installed RES capacity (approximately 44% in 2024, according to PSE [32]), variable weather conditions, and limited historical data. A study demonstrating the significance of weather variables such as the temperature and wind speed and NWP data in RES forecasting [33] highlighted the requirement for standardised evaluation metrics. The Polish energy market is characterised by an increasing RES share, gas, high price volatility, and dependencies on external factors such as coal prices or EUA emission units; thus, it requires models capable of considering these specific conditions [23,28]. A study conducted on the German–Luxembourg market [22] demonstrated that the RES variables such as wind generation significantly affect the forecast accuracy, indicating the effectiveness of a similar approach in the Polish market.
The increasing share of RESs in the energy mix, particularly in Europe, presents additional challenges such as price unpredictability due to the dependence of supply and demand on the weather conditions [19]. MLP networks can effectively model such dynamics owing to their ability to realise nonlinear dependencies. Maciejowska [34] clearly demonstrated that both the wind and solar energy reduced the electricity prices on the market. The models based on probabilistic quantile regression averaging methods [35] presented low Pinball Loss values, indicating their effectiveness in risk management in markets with high RES penetration.
Expanding this analysis, electricity price forecasting requires the consideration of both weather variables and macroeconomic factors, such as gas, coal, or EUA prices, which affect the price dynamics. A study conducted on the AEMO market [26] reported that gas prices were a key exogenous variable, demonstrating their importance in markets dependent on fossil fuels, though the lack of statistical tests limited the reliability of the results. Another study [23] conducted based on PCA for averaging ARX forecasts demonstrated error reduction and could promote the development of models accounting for macroeconomic conditions. The European Union’s climate policy, including the emission trading system (ETS), contributes significantly to determining the electricity prices on the Polish market. The increasing EUA prices in recent years have increased the cost of fossil fuel-based energy production, thereby affecting electricity price dynamics. A study conducted on the EPEX DE/AT market [28] demonstrated the significance of RES variables in the context of climate policy, which is particularly relevant for Poland, where the energy transition is accelerating.
Geopolitical factors such as instability in the gas supplies or fluctuations in the raw material prices further complicate electricity price forecasting in Poland. Dynamic changes in the energy mix, such as the planned increase in the RES share to 23% by 2030 (in line with the National Energy and Climate Plan), require models that can adapt to new market conditions [33]. The energy transition, which was based on EU regulations such as the ‘Fit for 55’ package, introduces additional requirements for forecasting models, which must consider the changing emission costs, new RES technologies, and the development of energy storage systems. Energy storage technologies, such as lithium-ion batteries or flow systems, are beginning to contribute significantly to balancing RESs [36,37], necessitating their inclusion in the modelling of price dynamics [22,32]. Limited historical data on the Polish market complicates the modelling process, requiring approaches that efficiently utilise the available information, such as the proposed MLP model with PCA [21,24]. A study conducted on the Russian electricity market [38] using DNN with LSTM layers demonstrated that in some cases, DNNs such as LSTM or CNN can achieve slightly better accuracy in forecasting the energy consumption and energy prices when compared with the MLP.
EU regulations, such as directives on the energy efficiency and renewable energy sources, further complicate price forecasting on the Polish market, which involves high dependence on coal despite the increasing RES share. A study conducted on the German–Luxembourg market [22], based on CNN-GRU with an attention mechanism, demonstrated that RES variables are crucial for accurate forecasts, which is relevant for Poland, where wind and solar generation are becoming increasingly significant [22]. Models based on simpler methods, such as MLP, must be enhanced with advanced data processing techniques to address these challenges [21,25,26]. A study conducted on the PJM market [20] using Wavelet Transform + LSTM demonstrated that automatic feature selection can improve the accuracy; however, its computational complexity limits its application in resource-constrained environments.
Previous studies [36,37] reported that energy storage systems present considerable potential to support the energy transition and decarbonisation of energy systems. Determining the optimal storage capacity is crucial for fully realising this potential, considering factors such as the electricity demand, renewable energy generation, and energy costs. The day-ahead market provides the price of electricity only 24 h beforehand. This forecast is insufficient for some energy storage users. Several applications equipped with energy storage facilities do not fully utilise their installed capacity and discharge under unfavourable conditions. Determining the expected energy prices for the next few days enables better usage of the storage capacity. An accurate 72 h forecast helps in providing the relevant data to optimise the operation of storage facilities. The simplicity and low computational requirements of models based on MLP and SVM make them suitable for use in complex energy storage systems.
In summary, the literature highlights the need to develop new, more integrated approaches to electricity price forecasting that combine the simplicity and interpretability of MLP and SVM models with modern feature selection methods, probabilistic analysis, and consideration of a wide range of exogenous variables. Only such models can satisfy the increasing demands of the energy market; support operators, traders, and decision makers in making informed decisions; and effectively contribute to the development of a sustainable energy system.
This study proposes an approach for forecasting the electricity prices 72 h in advance based on MLP and SVM networks enhanced with linear correlation analysis. A methodology for analysing, processing, and partitioning the training data is proposed for hourly electricity price forecasting. Various types of data are analysed: time-related, weather, and energy data from the Polish market. Two time periods are distinguished owing to the variability and repeatability of the electricity prices. Unique results are obtained based on two data periods and three sets of different data types, enabling a comprehensive comparison and evaluation of the capabilities of models based on the SVM and MLP networks.
The novel aspects of this study are as follows:
-
A novel method is proposed for processing the cloud cover data using the average daily and annual profiles.
-
Rules for dividing data into the training, validation, and testing subsets are established. Furthermore, principles for selecting the training parameters using a sliding window based on the problem of price forecasting with hourly resolution are determined.
-
A multivariate comparison of the 72 h electricity price prediction using MLP and SVM networks is performed with analysis of the 3-day, monthly, and 2-year average errors for two periods with different price profiles and three sets of training data types.

2. Methodology

The forecast accuracy depends on the selection of the appropriate training data and their pre-processing. Classical MLP and SVM networks with dedicated data selection methods and a model structure are employed to improve the effectiveness of the time-series prediction. Appropriate division of training data and a learning technique tailored to the problem being analysed are also included.

2.1. Input Data—Selection and Processing

The selection of the training data must consider as many factors influencing their price as possible. The supply- and demand-creating data can be distinguished based on an economic perspective. The factors affecting the supply include the availability of generation sources, energy production costs, and energy resource prices. Conversely, supply is attributed to the weather, consumer activity, and alternate fuel prices. Another feature of the training data includes the availability of both historical and future data (in the forecast period). Their time resolution and accuracy are also essential. Table 1 presents a set of selected data with the features, as described previously. The impact is determined based on a subjective assessment according to the following scale: weak (+), medium (++), strong (+++).
An important stage of data preparation is data pre-processing. The basic activity includes removing obvious errors from the data (lack of data, overflows, etc.). Additionally, data processing can be performed by removing or minimising parts of the data that do not affect the objective function. An example is the cloudiness data. These data are introduced to obtain information regarding solar radiation, which significantly affects PV production. The cloud cover is selected for its easy accessibility and predictability. However, it also contains data that do not affect the PV production (e.g., at night). The study presents a formula for processing the variable cloudiness considering the time of day and year. The cloud cover data are modified using a daily profile and an annual profile, as shown in Equation (1). Solving Equation (1) yields the DCM variable corresponding to solar radiation.
D C M = D C F d F y
where DC denotes the cloud cover data, Fd denotes the daily profile, and Fy represents the annual profile.
The profiles can be derived from the historical data for a given location through averaging and normalising. These are then replicated multiple times based on the length of the data, Td (Figure 1).
Linear correlation is a useful indicator when processing the data and enables a preliminary assessment of the usefulness of the data in the forecast of energy prices. In further analysis, the PCA technique can be used for analysing multidimensional correlations. PCA enables both the reduction in the dimensionality of the analysed variables and the preservation of most of the information, along with visualisation using the axes corresponding to a linear combination of the original variables [39].

2.2. MLP

The MLP neural network (Figure 2) is based on the principle of a single neuron that processes the input signals, Di, using weighted (win) summation with bias (bn) and the application of an activation function, f. The sigmoid activation in the hidden layer helps in modelling nonlinear patterns, whereas the linear output function provides flexibility for numerical predictions. Feedforward networks can use various training functions, whose performance depends on the complexity of the problem, number of weights and biases, and amount of input data. Typically, the Levenberg–Marquardt algorithm exhibits the fastest convergence and achieves the most accurate training for solving the regression problem with less than a few hundred weights.
The division of data into the training, validation, and testing sets is crucial for the properties of the trained network. This division is defined by the fraction of data placed in the given set. The ratios for training, testing, and validation are typically 0.6, 0.2, and 0.2, respectively. Next, the selection of data for individual sets must be defined. Using the default random selection does not provide optimal results. Usually, the data are divided into contiguous (Figure 3a) or distributed blocks (interleaved single data presented in Figure 3b). Selecting contiguous blocks results in the loss of important information regarding long-term price changes (e.g., monthly). Additionally, selecting individually distributed data with hourly resolution may result in the loss of information regarding the dynamics of price changes. Figure 4 shows a case of such a division (0.6:0.2:0.2), wherein the validation and testing data sets omit some price peaks.
Therefore, we selected a mixed solution, i.e., division into distributed sub-blocks (Figure 5), as defined in Equation (2). When predicting a price profile characterised by a ‘duck curve’, multiple days must be selected within the sub-block for the validation data, Lval, and test data, Ltest. The number of days in a sub-block and their distance, Ldist, must consider the cyclicality of the price changes. Consequently, a distance that is a multiple of 7 must be avoided. An additional condition for the selection of the sub-block parameters is obtained based on the technique of network training described in Section 2.5.
S x = D i 1 D i D i + 1 = d i 1 k ( 1 ) d i 1 k ( l ) d i 1 k ( K ) d i k ( 1 ) d i k ( l ) d i k ( K ) d i + 1 k ( 1 ) d i + 1 k ( 1 ) d i + 1 k ( K ) ,   S t e s t = d i 1 k ( 1 ) d i k ( 1 ) d i + 1 k ( 1 ) , k ( l ) K L , , K L + L v a l 1 f o r S v a l K L + L v a l , , K L + L d i s t 1 f o r S t r a i n L t + 1 , , L t + L t e s t f o r S t e s t for   K = L t L d i s t and   K L = L d i s t l 1 + 1 ,
where S x denotes the dataset x t r a i n , v a l , d i k is the k-th value of the i-th input variable, i 1 , , I , I is the total number of input variables, k and l are the iterative variables, L v a l denotes the length of the validation data sub-block, L d i s t is the distance of the validation data block, L t e s t is the length of the test data sub-block, and L t is the data block length.

2.3. SVM

SVM is an advanced machine learning model that is primarily used for classification, but also for regression [40], which determines the optimal hyperplane separating classes in the data, thereby maximising the margin between the closest points (support vectors) (Figure 6). SVM effectively models nonlinear relationships; thus, it is versatile for tasks such as energy price prediction. This model is valuable for its theoretical robustness and generalisability, although it requires the careful selection of hyperparameters and data scaling. When compared with the perceptron, the SVM offers greater flexibility and accuracy in complex problems.
Using the optimal kernel and its associated parameters is crucial for achieving high performance. Each kernel has its strengths and weaknesses, and the selection of the kernel significantly affects the model performance. A linear kernel is computationally efficient and interpretable, but it can fail on complex datasets that require nonlinear decision boundaries. The radial basis function (RBF) kernel, Equation (3), is widely used for nonlinear data. Unfortunately, the RBF kernel can lead to increased computational costs due to the requirement to calculate pairwise distances between all the data points ( x i , x j ).
K ( x i , , x j ) = exp x i x j 2

2.4. Model Structures

The MLP and SVM networks described above are static structures in which the output is a response to the current input values. Dynamic properties can be obtained by expanding the input vector with values at the previous steps. The structure leverages hourly and lagged data, making it effective for time-series prediction tasks. In this study, we analysed both the previous values of the inputs and outputs of the network. Figure 7a shows the network structure used in the training process. It uses Nin previous input samples and Nout previous energy price samples. In the testing process (Figure 7b), the previous output samples are based on the forecasted energy prices, pf.

2.5. Model Training Technique

Selecting the appropriate time range of the training data and the methodology for using this data for training can significantly affect the training result.
The influence of the training data on the forecasted price value may vary based on the time due to energy transformation, changes in the energy source prices, and so on. When selecting the training data range, the linear correlation of all the analysed input variables on the energy price must be considered.
In the case of high variability of both the correlation value and its sign, the retraining technique using a sliding window must be employed, as shown in Figure 8. When selecting the window width, the repeatability of the training signals must be considered. As the week number is used as a training variable, a multiple of the year must be selected. The value of the shift step ( L s h i f t ) must be selected such that during retraining, the validation blocks do not contain validation data from previous trainings. A window shift step equal to the length of the testing data must be selected.
The proposed rules for selecting the data division parameters are as follows:
-
Repeatability of learning data:
L t = 365 24 n = 8760 n ,   n = 1 , 2 , 3 ;
-
Validation data fraction:
0.25 L v a l L d i s t 0.15 ;
-
No duplicate validation data:
L s h i f t = L t e s t L t e s t L d i s t int , L t e s t L v a l ,
where L t is the data block length, L v a l is the validation data sub-block length, L d i s t is the validation data block distance, L s h i f t is the window shift step, L t e s t is the testing block length, and n is the positive integer.

2.6. Performance Evaluation Indicators

The energy price forecasting results are typically evaluated using various indicators. The most widely used results include the MAE, MAPE, root-mean-square error (RMSE), and normalised root-mean-square error (NRMSE), which are defined as follows:
M A E = 1 N k = 1 N p k p f k ,   M A P E = 1 N k = 1 N p k p f k p k 100 % ; R M S E = 1 N k = 1 N p k p f k 2 ,   N R M S E = R M S E p ¯ ,
where p k is the electricity price at time k, p f k is the predicted price at time k, and p ¯ is the average price value over time in a series with N samples.
Given the high volatility of the electricity prices, along with the case where the price is close to zero (which is increasingly common in systems with a large share of production from PV), indicators in which the division by the current price value is made can significantly increase the average error, dominating the remaining results. Therefore, such results must not be analysed using the MAPE index. Among the remaining indicators, NRMSE is the most suitable for evaluation owing to its relative value.

3. Case Study

In this study, we analysed the Polish energy market, which is particularly problematic for algorithms used to forecast the energy prices due to the high dynamics of changes and the rapidly increasing share of RESs.

3.1. Energy Production Market in Poland During 2019–2024

Poland’s energy mix underwent considerable changes between 2019 and 2024 corresponding to the global trends toward energy transition, the tightening of the European Union’s climate policy, and the increasing importance of RESs. Key trends in the structure of installed capacity (Figure 9a), energy production (Figure 9b), and power demand in the National Power System (KSE) can be traced based on the data obtained from Polish Power Grids (PSE) [43]. Here, these changes are evaluated, with a focus on the dynamic development of RESs, the gradual reduction in the role of coal, and the challenges associated with ensuring energy security.
Poland’s energy transformation is characterised by the following phases:
-
Coal still reigns supreme—In 2019, the Polish energy mix was strongly dependent on hard coal and lignite, which accounted for approximately 75.49% of the electricity production. RESs, primarily wind power and biomass, accounted for only approximately 9.03% of the mix. PV was in its infancy, with an installed capacity of 7.5 GW. The electricity consumption in the country was approximately 170 TWh, and Poland was a net exporter of energy, primarily to the neighbouring countries.
-
The beginning of the transition—The development of RESs accelerated between 2020 and 2021, primarily due to the dynamic increase in PV. In December 2021, the installed renewable energy capacity reached 15.086 GW, accounting for an increase of 4.86 GW over the year. PV became the primary renewable source owing to prosumers and government support, such as the ‘My Electricity’ programme. In 2021, the share of renewable energy in the energy mix increased to approximately 10.94%, whereas coal still accounted for over 75% of production. The energy crisis, triggered partly by the COVID-19 pandemic, demonstrated the requirement to diversify the energy sources.
-
Record growth in RESs—2022 presented a breakthrough for the Polish energy sector. The installed RES capacity exceeded 21 GW. The RES share in electricity production reached 15.76%. The dynamic development of RESs (an increase in production from 18.98 TWh in 2021 to 27.60 TWh in 2022) was attributed to the increase in the prosumer micro-installations. Poland was a net energy importer, which was attributed to a decline in the domestic production and high raw material prices in international markets.
-
Increase in importance of PV and wind energy—In 2023, the RES share in the energy mix increased to 21.52%, and in July, a record share of PV in energy production (17%) was recorded. Hard coal and lignite accounted for 67.95% of the mix, which presented the lowest result in decades. The installed capacity in RESs reached 27.28 GW. Energy production from RESs increased by 7.5 TWh when compared with that in 2022, primarily due to wind and solar farms.
-
A record year for RESs—Historic changes were observed in the Polish energy mix in 2024. The RES share reached a record value of 25.28%. In May 2024, RESs accounted for 32.20% of the energy production, which was the highest monthly result in history. Hard coal and lignite fell to 62.85%, the lowest level in the history of the Polish energy sector. The installed RES capacity exceeded 31.82 GW. The electricity production amounted to 168.96 TWh, where 42.20 TWh was generated by RESs.

3.2. Input Data

The analysed data are publicly available and were downloaded from the following institutional platforms: the market price of electricity was obtained from the Polish Power Grids (PSE) [43], weather-related data were obtained from the Institute of Meteorology and Water Management (IMGW) [44], and energy prices were obtained from the Instrat Foundation [45]. They encompass six years of hourly observations from 1 January 2019 to 1 January 2025.
The time waveform of the electricity price is presented in Figure 10. It shows a nearly 3-year period of stable prices between PLN 200 and PLN 500 per MWh. However, significant price variation was observed after 2021 due to the geopolitical situation, ranging from negative values (-PLN 500/MWh) to almost PLN 4000/MWh.
The exogenous data used in the process of forecasting the electricity prices include the time-related data (hour, day of the week, and week number), shown in Figure 11; weather data (cloud cover, temperature, and wind speed), displayed in Figure 12; and energy price data (coal price, gas price, and ETS price), revealed in Figure 13. The time resolutions of time-related data and weather data are adjusted to the hourly resolution of the analysis. However, the resolutions of energy price data resulting from availability and predictability are as follows: coal price—month, gas price—3 days, and ETS price—3 days.
Figure 14 displays the statistical normalised box plots to demonstrate the distribution, variability, and potential anomalies in the analysed dataset. All the time-related data show low variability after normalisation, with an interquartile range (IQR) between 0.25 and 0.85 and whiskers extending from 0 to approximately 1. The median in each case is close to the centre of the box, indicating a symmetrical distribution. The absence of outliers indicates a uniform distribution of data.
The weather data demonstrate different degrees of variability. The cloud cover exhibits an IQR of 0.32 to 0.7 with whiskers from 0 to 1 and no outliers, indicating a uniform distribution. Considering its modified profile results in variability in the main IQR range (0–0.1) with a median of 0, indicating an asymmetric distribution with a predominance of cloud cover values. The narrow range of whiskers (−0.05 to 0.23) indicates limited variability under the typical conditions, but several outliers above 0.23 (up to 1.0) indicate significant extreme cloud cover levels. The temperature has an IQR of 0.1 to 0.5, with whiskers from −0.5 to 1, indicating moderate variability and potential negative values after normalisation, which requires the verification of the method. The wind speed has an IQR of 0.22 to 0.36, whiskers from 0.1 to 0.58, and outliers above 0.58 (up to 1.0), indicating the influence of extreme wind conditions. The temperature and wind speed may have a moderate impact on the energy prices, particularly in the context of seasonality or wind energy, and outliers in the wind speed require further analysis.
The energy data show different degrees of volatility. The coal price has an IQR of 0.34 to 0.7, with whiskers ranging from 0.32 to 1.0 and no outliers, indicating moderate volatility with a wide range of fluctuations. The gas price exhibits a very narrow IQR from 0.05 to 0.16, with whiskers ranging from 0 to 0.33 and numerous outliers above 0.33 (up to 1.0), suggesting stability with significant price spikes. The ETS price has an IQR from 0.28 to 0.8, with whiskers from 0.15 to 1.0 and no outliers, indicating moderate volatility with a wide range of fluctuations.

4. Results and Discussion

4.1. Input Data Analysis

Linear Pearson’s correlation was used to assess the relationship between the electricity prices and various input factors. The aim was to identify the variables that have the greatest impact on the electricity prices. Several researchers use randomly selected variables or only historical energy prices [7]. The aim of this study is to analyse the validity of using exogenous variables to forecast electricity prices.
Correlation calculations were performed in the MATLAB (Version: 2023b) software. The results facilitated a quantitative assessment of the strength and direction of linear relationships between the input variables and electricity prices in the individual years, enabling an analysis of changes in these relationships over time. The correlation results close to 1, −1, and 0 indicate a strong positive correlation, a strong negative correlation, and no linear relationship, respectively. The analysis of these coefficients provided key information for modelling and forecasting prices on the energy market and allowed for the assessment of stability and changes in dependencies in the 2019–2024 period. An analysis of the linear correlation between variables and electricity prices revealed trends that can provide a framework for selecting parameters for forecasting prices using MLP and SVM neural networks. Figure 15 presents the selected data, which indicate considerable effectiveness in forecasting the electricity prices.
The gas price is a key factor whose correlation increased from 0.28 in 2019 to an impressive 0.67 in 2022 and decreased to 0.24 in 2024, demonstrating its dominant influence, particularly during periods of high fuel prices. The wind speed is also significant, with its negative correlation increasing from −0.25 in 2019 to −0.48 in 2022, indicating the increasing role of wind energy in reducing the prices. The temperature exhibits significant variability, starting with a strong positive correlation of 0.5 in 2019 and then moving to negative values such as −0.25 in 2021, indicating a dynamic and potentially complex impact of weather conditions. By contrast, the correlation with the time of day remains stable at a negative level of 0.19 to 0.25, indicating a stable effect on the energy prices over the years. The cloud cover shows an initial increase in correlation to 0.31 in 2019 and then a decline to −0.10 in 2021, indicating that seasonal patterns are becoming less significant. For the modified cloud cover data corresponding to radiation, the correlations are more diverse and have a larger amplitude. This indicates that considering the radiation improves the correlation with the electricity price, particularly in the years when the share of renewable energy sources (with a significant share of PV installations) increases significantly.
The results of nonlinear correlation analyses performed using the Spearman and Kendall methods gave qualitatively and quantitatively consistent results, therefore they are not discussed in detail. Notably, both the value and correlation sign for most variables varied significantly between 2019 and 2024. Therefore, the training data must be limited, and a sliding-window technique must be used to train the network. The sliding-window width was set to one year.
The correlation between the input data and electricity prices was further analysed via PCA performed in the MATLAB environment. The goal was to find a maximum of three principal components that accounted for a minimum of 80% in the variance. The analysis showed that the sums of the variances of the first three principal components accounted for only 54.10% of the total variance (Figure 16). The result is unsatisfactory and indicates that the evaluation of vectors in the space of the first three components may be incomplete. Therefore, the vectors were not interpreted in the space of the first three components owing to the incomplete information contained in these components. Thus, the impact of the training data on the electricity prices was analysed through a linear correlation of the individual data.
Both the time waveform of electricity prices (Figure 10) and the data correlation results (Figure 15) exhibit a significant difference in the data variability around half of the analysed 6-year data range. The waveform of the electricity prices presents the greatest volatility. The first period is characterised by small daily changes, which are consistent with the so-called ‘duck curve’ profile, hereafter referred to as the ‘stable price period’ for the purposes of this analysis. However, the second period is characterised by high variability due to the rapid energy transition and significant geopolitical events. This period is named the ‘unstable price period’ owing to the large price fluctuations, low repeatability of daily profiles, and the occurrence of negative prices. The data were divided into two 3-year periods in this study. The first year of both periods (2019 and 2022) was used for network training, and the following two years were used for testing and retraining using window shifting. Therefore, the results from 2020–2021 (Section 4.2.1) and 2023–2024 (Section 4.2.2) were compared. After every three days of testing, the training window was shifted by another three days, and retraining was performed. Therefore, the training process was repeated 243 times (2 years divided by 3 days). The comparison of the forecast results was primarily based on the NRMSE error due to its normalised value, which enabled the comparison of the model accuracy across various datasets. The resulting three-day NRMSE errors are presented as waveforms on the graphs. Additionally, all the error indicators are presented in tables as an average value for the entire forecasting period.

4.2. Comparison of Prediction Results for MLP and SVM Networks

The forecast calculations were performed on the MLP and SVM models implemented in the MATLAB software. Analyses were performed using 24 previous price samples ( N o u t ). Consequently, the model comprised 33 inputs, where 9 inputs were the current values of the input data (hour, day of the week, week number, modified cloud cover, temperature, wind speed, coal price, gas price, and ETS price).
For the MLP model, one hidden layer with 23 neurons ( N h N ) and a sigmoid activation function was used. A linear activation function was used in the output layer. The learning process was performed using the distributed division of sub-blocks with the validation data sub-block length, L v a l , which equalled 48 h, and the validation data block distance, L d i s t , which equalled 192 h. The Levenberg–Marquardt algorithm was used as the learning function.
For the SVM model, the RBF kernel was used, and half the width of the epsilon-insensitive band equalled 10 4 . The sequential minimal optimisation solver [46] and a gap tolerance of 10 4 for convergence control were selected.
The retraining technique involved a one-year sliding window ( L t ). The value of the shift step, L s h i f t , equalled 72 h, which was identical to the testing data range, L t e s t .
An example comparison of the time waveforms of the real and predicted prices using the MLP and SVM networks is shown in Figure 17. Network simulation (test) results include 24 h of delayed previous prices and 3 days of predicted prices. Table 2 presents the error values obtained over time in the series of 72 samples.

4.2.1. Forecasting Energy Prices During 2020–2021

The graphs in Figure 18 depict the time waveforms of the 3-day NRMSE errors for the 2020–2021 prediction period. Additionally, the 2-year (dashed line) and monthly (bold line) average values of these errors are provided for easier interpretation. Table 3 presents the average values of all the analysed error indicators for the entire projected period.
Significantly better results are observed in the case of the SVM network compared with the MLP network. The results are lower by values from 0.1 for the time-related data (Figure 18a) to 0.14 for the complete data (Figure 18c). Moreover, a negative property of the MLP network results is that the errors increase with the increasing type of training data, whereas the SVM network obtains significantly lower errors. In all the cases, the monthly average errors are significantly lower for the SVM. Within the forecast period, the forecast error is larger in some months than in others. This applies to both the MLP and SVM networks. This is particularly true for the final period (the second half of 2021), where the price volatility increases significantly, as presented in Figure 10. The error variability for the MLP network is significantly higher than that for the SVM, particularly for the complete data (Figure 18c).
A significant advantage of the MLP network is the computation time, Tc, which is 5–7 times shorter when compared with SVM (Table 3). The influence of the amount of data and analysis period on the computation time is presented in following figures.
An important aspect when comparing the properties of MLP and SVM networks in price prediction is the accuracy of forecasting subsequent days. A comparison of the average NRMSE errors for individual subsequent days is presented in Table 4. As expected, in all cases the error value of a given day is less than or equal to the next day. The ratio of the average error of the third day to the first day does not exceed 140% in the case of SVM networks, but it can be 180% in the case of MLP networks. The smallest error variation occurs for full data (time-related + weather + energy), and in the case of SVM networks, it does not exceed 120%. In the case of the analysis of a stable price profile (2020–2021), the advantage of the SVM network over MLP is significant and includes both lower variability of the average prices on individual days and higher accuracy on the individual days for each type of data.

4.2.2. Forecasting Energy Prices in 2023–2024

Similar error graphs (Figure 19) and results (Table 5) are presented for the 2023–2024 period. During this period, the volatility of energy prices is significantly higher, and the repeatability of the daily profiles is lower, which makes predictions more difficult. This presents significantly larger error values than in the previous analysed period. The lowest average annual NRMSE error of 0.26 corresponds to the highest from the period of stable prices (2020–2021). During this period, the SVM also yields lower errors, except for the case with the smallest amount of data (Figure 19a). In this case, the SVM has a slightly higher annual mean (by about 11%) and higher variability of the monthly mean NRMSE results. However, the MAE and RMSE errors are lower by about 15%. The analysis of the average annual errors shows that the errors of the MLP network in this period do not decrease with an increase in the number of types of training data. In general, the performance of MLP and SVM is comparable for limited data sets, with the advantage of SVM emerging only as the number of data types increases. The performance of SVM networks significantly improves as the number of training data types increases. This is due to the SVM’s superior ability to handle high-dimensional data [47,48].
The MAPE error values obtained are very large owing to the high price volatility, reaching values close to zero for the individual hours. Dividing by the current price value in the MAPE error formula in such cases results in very large values that dominate the average error result.
The analysis of the NRMSE errors of the individual days of the 3-day price prediction in the 2023–2024 period (Table 6) reveals high SVM network errors for the limited dataset (time-related), particularly for days 2 and 3, amounting to 0.49. The large prediction error for subsequent days may result from the use of a radial basis function kernel (also known as a local kernel), which interpolates very well within the known input space but cannot accurately predict (extrapolate) the test set outside the known range [49]. This weakness is particularly significant as forecasting horizons become longer, especially in highly volatile markets, where the model is more likely to encounter inputs that differ significantly from the training distribution. In contrast, MLP models can be more flexible in capturing broader patterns under such conditions, so their prediction properties are better than SVMs under limited training data diversity. In the remaining cases, the SVM network error values for three consecutive days are significantly lower. In particular, this applies to the largest data diversity (time-related + weather + energy), where the errors for the SVM network are 40% smaller than those of the MLP. This means that weather data, especially energy data, can help determine accurate forecast trends (i.e., overall price levels) and im-prove prediction accuracy beyond the interpolated range.
During this period, the computation time for MLP increases significantly, achieving only a two-fold advantage in the computation time. Moreover, this time increases rapidly with an increase in the data volume for the MLP network (Figure 20).

5. Conclusions

This study presents a methodology for preparing training data and structuring models for predicting electricity prices. Appropriately dividing the data into training, validation, and testing sets is crucial when the data exhibit low time resolution (hourly) when compared with the variability of the daily energy prices, known as the ‘duck curve’. A dedicated data selection method is proposed. Together with the sliding window technique, which uses shifted validation and test subsets in subsequent training iterations, it can be considered a type of cross-validation. Because retraining is performed on a shifted data block, it shortens the training process compared with the popular random k-fold cross-validation method. Furthermore, it allows for free and task-specific parameter selection (subset width and interval and data offsets) without relying on randomness.
The results of the analyses indicate that selecting the appropriate evaluation indicator significantly affects the accurate evaluation of the errors. The commonly used MAPE indicator does not enable accurate evaluation when the prices are close to zero; therefore, the NRMSE indicator was selected in the analyses.
The analysis of the prediction errors for both the networks reveals that the SVM network achieves more accurate prediction results overall. The smallest NRMSE of the MLP network is 80% larger than the smallest error of the SVM network for the stable price period and 25% larger for the unstable price period. Increasing the data types does not significantly increase the accuracy for the MLP network, regardless of the analysed period and price stability. Moreover, increasing the input data can decrease the forecast accuracy. In the case of the SVM network, the type of training data significantly impacts the obtained prediction results. This applies to periods with both stable and divergent prices. However, when analysing only the time-dependent data, the SVM network achieves significantly higher errors than the MLP network, particularly for the second and third days of prediction. The analyses indicate that for predictions longer than 1 day, the SVM network and diverse training data containing at least time and weather data must be used. Considering additional energy price data reduces the forecast errors, particularly for the second and third days.
The computational speed of the MLP model is significantly better (seven times) when there is a small amount of data and stable prices. However, with a larger amount of data and unstable prices, this advantage decreases significantly (to about two times). In the case of price forecasting in a changing energy market, the proposed solution is a model based on SVM due to its significantly more accurate price forecasting.
The ongoing transformation of the Polish energy market and geopolitical and macroeconomic turbulence result in a small amount of data characteristic of the specific market stability. This impact is visible in the results of forecasts for a stable market (2020–2021) and an unstable market (2023–2024). A comparison of the NRMSE errors in both cases shows an average 54% higher forecast error for the unstable energy price market. Predicting electricity prices for markets characterised by high variability requires the use of various types of information affecting the market. Therefore, future works must aim to incorporate additional data on the operation of the analysed power system, such as energy imports/exports and the available capacity of generating units and energy storage facilities providing balancing services.

Author Contributions

Conceptualisation, D.B. and M.J.; methodology, D.B.; software, D.B.; validation, D.B. and M.J.; formal analysis, D.B.; investigation, M.J.; resources, M.J.; data curation, M.J.; writing—original draft preparation, M.J. and D.B.; writing—review and editing, D.B.; visualisation, D.B. and M.J.; supervision, D.B.; project administration, D.B.; funding acquisition, D.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Polish Ministry of Science and Higher Education and performed by the Department of Electrical Engineering (E-2) of Cracow University of Technology.

Data Availability Statement

The original data presented in the study are openly available as follows: market price of electricity at https://www.pse.pl/dane-systemowe/funkcjonowanie-kse/raporty-roczne-z-funkcjonowania-kse-za-rok/raporty-za-rok-2019 (accessed on 2 June 2025) [43], weather-related data at https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_meteorologiczne/terminowe/synop/ (accessed on 23 February 2025) [44], energy prices at https://energy.instrat.pl/ceny/energia-rdn-godzinowe (accessed on 5 May 2025) [45].

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ANNArtificial neural network
EPFElectricity price forecasting
ETSEmission trading system
IMGWInstitute of Meteorology and Water Management
IQRInterquartile range
KSENational Power System
MLPMultilayer perceptron
MAEMean absolute error
MAPEMean absolute percentage error
NRMSENormalised root-mean-square error
PVPhotovoltaic
PCAPrincipal component analysis
PSEPolish Power Grids
RBFRadial basis function
RESRenewable energy source
RMSERoot-mean-square error
SVMSupport vector machine

References

  1. Jędrzejewski, A.; Lago, J.; Marcjasz, G.; Weron, R. Electricity Price Forecasting: The Dawn of Machine Learning. IEEE Power Energy Mag. 2022, 20, 24–31. [Google Scholar] [CrossRef]
  2. Kaminski, V. Energy Markets, 1st ed.; Risk Books: London, UK, 2012; pp. 695–721. [Google Scholar]
  3. Albahli, S.; Shiraz, M.; Ayub, N. Electricity Price Forecasting for Cloud Computing Using an Enhanced Machine Learning Model. IEEE Access Mag. 2020, 8, 200971–200981. [Google Scholar] [CrossRef]
  4. Pourdaryaei, A.; Mohammadi, M.; Karimi, M.; Mokhlis, H.; Illias, H.A.; Kaboli, S.H.A.; Ahmad, S. Recent Development in Electricity Price Forecasting Based on Computational Intelligence Techniques in Deregulated Power Market. Energies 2021, 14, 6104. [Google Scholar] [CrossRef]
  5. O’Connor, C.; Bahloul, M.; Prestwich, S.; Visentin, A. A Review of Electricity Price Forecasting Models in the Day-Ahead, Intra-Day, and Balancing Markets. Energies 2025, 18, 3097. [Google Scholar] [CrossRef]
  6. Janczura, J.; Wójcik, E. Dynamic short-term risk management strategies for the choice of electricity market based on probabilistic forecasts of profit and risk measures. The German and the Polish market case study. Energy Econ. 2022, 110, 106015. [Google Scholar] [CrossRef]
  7. Weron, R. Electricity price forecasting: A review of the state-of-the-art with a look into the future. Int. J. Forecast. 2014, 30, 1030–1081. [Google Scholar] [CrossRef]
  8. Imani, M.H.; Bompard, E.; Colella, P.; Huang, T. Forecasting Electricity Price in Different Time Horizons: An Application to the Italian Electricity Market. IEEE Trans. Ind. Appl. 2021, 57, 5726–5736. [Google Scholar] [CrossRef]
  9. Bello, A.; Bunn, D.W.; Reneses, J.; Muñoz, A. Medium-Term Probabilistic Forecasting of Electricity Prices: A Hybrid Approach. IEEE Trans. Power Syst. 2017, 32, 334–343. [Google Scholar] [CrossRef]
  10. Keles, D.; Scelle, J.; Paraschiv, F.; Fichtner, W. Extended forecast methods for day-ahead electricity spot prices applying artificial neural networks. Appl. Energy 2016, 162, 218–230. [Google Scholar] [CrossRef]
  11. Halužan, M.; Verbič, M.; Zorić, J. Performance of alternative electricity price forecasting methods: Findings from the Greek and Hungarian power exchanges. Appl. Energy 2020, 277, 115599. [Google Scholar] [CrossRef]
  12. Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning Data Mining Inference and Prediction, 2nd ed.; Springer: Berlin, Germany, 2009; pp. 9–39. [Google Scholar]
  13. Lotfinejad, M.M.; Hafezi, R.; Khanali, M.; Hosseini, S.S.; Mehrpooya, M.; Shamshirband, S. A Comparative Assessment of Predicting Daily Solar Radiation Using Bat Neural Network (BNN), Generalized Regression Neural Network (GRNN), and Neuro-Fuzzy (NF) System: A Case Study. Energies 2018, 11, 1188. [Google Scholar] [CrossRef]
  14. Keynia, F. A new feature selection algorithm and composite neural network for electricity price forecasting. Eng. Appl. Artif. Intell. 2012, 25, 1687–1697. [Google Scholar] [CrossRef]
  15. Fan, J.; Wu, L.; Zhang, F.; Cai, S.; Zeng, W.; Wang, X.; Zou, H. Empirical and machine learning models for predicting daily global solar radiation from sunshine duration: A review and case study in China. Renew. Sustain. Energy Rev. 2019, 100, 186–212. [Google Scholar] [CrossRef]
  16. Franović, B.; Baressi Šegota, S.; Anđelić, N.; Car, Z. Decentralized Smart Grid Stability Modeling with Machine Learning. Energies 2023, 16, 7562. [Google Scholar] [CrossRef]
  17. Moguerza, J.M.; Muñoz, A. Support vector machines with applications. Stat. Sci. 2006, 21, 322–336. [Google Scholar] [CrossRef]
  18. González, C.; Mira-McWilliams, J.; Juárez, I. Important variable assessment and electricity price forecasting based on regression tree models Classification and regression trees bagging and random forests. IET Gener. Transm. Distrib. 2015, 9, 1120–1128. [Google Scholar] [CrossRef]
  19. Janczura, J.; Michalak, A. Optimization of Electric Energy Sales Strategy Based on Probabilistic Forecasts. Energies 2020, 13, 1045. [Google Scholar] [CrossRef]
  20. Memarzadeh, G.; Keynia, F. Short-term electricity load and price forecasting by a new optimal LSTM-NN based prediction algorithm. Electr. Power Syst. Res. 2021, 192, 106995. [Google Scholar] [CrossRef]
  21. Miller, A.; Bućko, P. Using artificial neural networks to forecasting the energy exchange price. Sci. J. Fac. Electr. Control Eng Gdańsk Univ. Technol. 2014, 40, 69–72. Available online: https://www.researchgate.net/publication/341193685 (accessed on 2 June 2025).
  22. Laitsos, V.; Vontzos, G.; Bargiotas, D.; Daskalopulu, A.; Tsoukalas, L.H. Data-Driven Techniques for Short-Term Electricity Price Forecasting through Novel Deep Learning Approaches with Attention Mechanisms. Energies 2024, 17, 1625. [Google Scholar] [CrossRef]
  23. Maciejowska, K.; Uniejewski, B.; Serafin, T. PCA Forecast Averaging—Predicting Day-Ahead and Intraday Electricity Prices. Energies 2020, 13, 3530. [Google Scholar] [CrossRef]
  24. Hong, Y.-Y.; Wu, C.-P. Day-Ahead Electricity Price Forecasting Using a Hybrid Principal Component Analysis Network. Energies 2012, 5, 4711–4725. [Google Scholar] [CrossRef]
  25. Dias, M.B.B.; Lira, G.R.S.; Freire, V.M.E. Methodology for Multi-Step Forecasting of Electricity Spot Prices Based on Neural Networks Applied to the Brazilian Energy Market. Energies 2024, 17, 1864. [Google Scholar] [CrossRef]
  26. Mosbah, H.; El-hawary, M. Hourly Electricity Price Forecasting for the Next Month Using Multilayer Neural Network. Can. J. Electr. Comput. Eng. 2016, 39, 283–291. [Google Scholar] [CrossRef]
  27. Conte, T.; Oliveira, R. Comparative Analysis between Intelligent Machine Committees and Hybrid Deep Learning with Genetic Algorithms in Energy Sector Forecasting: A Case Study on Electricity Price and Wind Speed in the Brazilian Market. Energies 2024, 17, 829. [Google Scholar] [CrossRef]
  28. Wagner, A.; Ramentol, E.; Schirra, F.; Michaeli, H. Short- and long-term forecasting of electricity prices using embedding of calendar information in neural networks. J. Commod. Mark. 2022, 28, 100246. [Google Scholar] [CrossRef]
  29. Parhizkari, L.; Najafi, A.; Golshan, M. Medium term electricity price forecasting using extreme learning machine. Energy Manag. Technol. 2020, 4, 20–27. [Google Scholar] [CrossRef]
  30. Marcjasz, G.; Narajewski, M.; Weron, R.; Ziel, F. Distributional neural networks for electricity price forecasting. Energy Econ. 2023, 125, 106843. [Google Scholar] [CrossRef]
  31. Sgarlato, R.; Ziel, F. The Role of Weather Predictions in Electricity Price Forecasting Beyond the Day-Ahead Horizon. IEEE Trans. Power Syst. 2023, 38, 2500–2511. [Google Scholar] [CrossRef]
  32. Polish Power Grids (PSE). Annual Report of the National Power System; European Power Exchange: Warsaw, Poland, 2025; Available online: https://www.pse.pl/dane-systemowe/funkcjonowanie-kse/raporty-roczne-z-funkcjonowania-kse-za-rok/raporty-za-rok-2024 (accessed on 2 June 2025).
  33. Hong, T.; Pinson, P.; Wang, Y.; Weron, R.; Yang, D.; Zareipour, H. Energy Forecasting: A Review and Outlook. IEEE Open Access J. Power Energy 2020, 7, 376–388. [Google Scholar] [CrossRef]
  34. Maciejowska, K. Assessing the impact of renewable energy sources on the electricity price level and variability–A quantile regression approach. Energy Econ. 2020, 85, 104532. [Google Scholar] [CrossRef]
  35. Nowotarski, J.; Weron, R. Recent advances in electricity price forecasting: A review of probabilistic forecasting. Renew. Sustain. Energy Rev. 2018, 81, 1548–1568. [Google Scholar] [CrossRef]
  36. Ölmez, M.E.; Ari, I.; Tuzkaya, G. A comprehensive review of the impacts of energy storage on power markets. J. Energy Storage 2024, 91, 111935. [Google Scholar] [CrossRef]
  37. Borkowski, D.; Oramus, P.; Brzezinka, M. Battery energy storage system for grid-connected photovoltaic farm–Energy management strategy and sizing optimization algorithm. J. Energy Storage 2023, 72, 108201. [Google Scholar] [CrossRef]
  38. Maryasin, O.Y.; Lukashov, A.I. Comparing Neural Networks in Forecasting Market Electricity Prices and Regional Energy Consumption. In Proceedings of the International Conference on Industrial Engineering, Applications and Manufacturing (ICIEAM), Sochi, Russia, 16–20 May 2022. [Google Scholar] [CrossRef]
  39. Borkowski, D. Maximum Efficiency Point Tracking (MEPT) for Variable Speed Small Hydropower Plant With Neural Network Based Estimation of Turbine Discharge. IEEE Trans. Energy Convers. 2017, 32, 1090–1098. [Google Scholar] [CrossRef]
  40. Yan, X.; Chowdhury, N.A. Mid-term electricity market clearing price forecasting: A multiple SVM approach. Int. J. Electr. Power Energy Syst. 2014, 58, 206–214. [Google Scholar] [CrossRef]
  41. Álvarez-Alvarado, J.M.; Ríos-Moreno, J.G.; Obregón-Biosca, S.A.; Ronquillo-Lomelí, G.; Ventura-Ramos, E., Jr.; Trejo-Perea, M. Hybrid Techniques to Predict Solar Radiation Using Support Vector Machine and Search Optimization Algorithms: A Review. Appl. Sci. 2021, 11, 1044. [Google Scholar] [CrossRef]
  42. Deo, R.C.; Wen, X.; Qi, F. A wavelet-coupled support vector machine model for forecasting global incident solar radiation using limited meteorological dataset. Appl. Energy 2016, 168, 568–593. [Google Scholar] [CrossRef]
  43. Polish Power Grids (PSE). Annual Report of the National Power System; European Power Exchange: Warsaw, Poland, 2020; Available online: https://www.pse.pl/dane-systemowe/funkcjonowanie-kse/raporty-roczne-z-funkcjonowania-kse-za-rok/raporty-za-rok-2019 (accessed on 2 June 2025).
  44. Institute of Meteorology and Water Management National Research Institute. Available online: https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_meteorologiczne/terminowe/synop/ (accessed on 23 February 2025).
  45. Energy Instrat Hourly Electricity Prices (Day Ahead Market). Available online: https://energy.instrat.pl/ceny/energia-rdn-godzinowe (accessed on 5 May 2025).
  46. Fan, R.-E.; Chen, P.-H.; Lin, C.-J. Working set selection using second order information for training support vector machines. J. Mach. Learn. Res. 2005, 6, 1889–1918. Available online: https://dl.acm.org/doi/pdf/10.5555/1046920.1194907 (accessed on 2 June 2025).
  47. Zanaty, E.A. Support Vector Machines (SVMs) versus Multilayer Perception (MLP) in data classification. Egypt. Inform. J. 2012, 13, 177–183. [Google Scholar] [CrossRef]
  48. Huo, J.; He, F.; Zhao, X.; Jia, X.; Lu, C.; Ning, Y.; Cao, X.; Feng, W.; Ma, R. Comparison of KAN, MLP, and SVM for NIR Spectra Classification. In Proceedings of the 3rd International Conference on Automation, Robotics and Computer Engineering (ICARCE), Virtual, China, 17–18 December 2024; pp. 290–294. [Google Scholar] [CrossRef]
  49. Matsumoto, T.; Yamada, Y. Comprehensive and Comparative Analysis of GAM-Based PV Power Forecasting Models Using Multidimensional Tensor Product Splines against Machine Learning Techniques. Energies 2021, 14, 7146. [Google Scholar] [CrossRef]
Figure 1. Example of daily and annual profiles for modifying cloud cover data.
Figure 1. Example of daily and annual profiles for modifying cloud cover data.
Energies 18 04744 g001
Figure 2. Multilayer perceptron (MLP) architecture.
Figure 2. Multilayer perceptron (MLP) architecture.
Energies 18 04744 g002
Figure 3. Division of data into training (red), validation (blue), and testing (green) blocks: (a) contiguous blocks and (b) interleaved single data.
Figure 3. Division of data into training (red), validation (blue), and testing (green) blocks: (a) contiguous blocks and (b) interleaved single data.
Energies 18 04744 g003
Figure 4. Example time waveform of the price variable with single evenly distributed data (0.6:0.2:0.2) for the validation (blue) and test (green) sets.
Figure 4. Example time waveform of the price variable with single evenly distributed data (0.6:0.2:0.2) for the validation (blue) and test (green) sets.
Energies 18 04744 g004
Figure 5. Division of data into the training (red), validation (blue), and testing (green) distributed sub-blocks.
Figure 5. Division of data into the training (red), validation (blue), and testing (green) distributed sub-blocks.
Energies 18 04744 g005
Figure 6. General architecture of a support vector machine (SVM) model according to [41,42].
Figure 6. General architecture of a support vector machine (SVM) model according to [41,42].
Energies 18 04744 g006
Figure 7. MLP/SVM structure: (a) training and (b) testing.
Figure 7. MLP/SVM structure: (a) training and (b) testing.
Energies 18 04744 g007
Figure 8. Training data division (red—train, blue—validate, green—test) based on the model retraining technique.
Figure 8. Training data division (red—train, blue—validate, green—test) based on the model retraining technique.
Energies 18 04744 g008
Figure 9. Energy market in Poland during 2019–2024: (a) percentage structure of installed capacity and (b) percentage share of individual power plant groups.
Figure 9. Energy market in Poland during 2019–2024: (a) percentage structure of installed capacity and (b) percentage share of individual power plant groups.
Energies 18 04744 g009
Figure 10. Time waveforms of the electricity price.
Figure 10. Time waveforms of the electricity price.
Energies 18 04744 g010
Figure 11. Time-related data over a two-year period: time, day of the week, and week number.
Figure 11. Time-related data over a two-year period: time, day of the week, and week number.
Energies 18 04744 g011
Figure 12. Weather-related data over 6 years: cloud cover, modified cloud cover, temperature, and wind speed.
Figure 12. Weather-related data over 6 years: cloud cover, modified cloud cover, temperature, and wind speed.
Energies 18 04744 g012
Figure 13. Data corresponding to energy production from conventional fuels and CO2 production over 6 years: coal price, gas price, and ETS price.
Figure 13. Data corresponding to energy production from conventional fuels and CO2 production over 6 years: coal price, gas price, and ETS price.
Energies 18 04744 g013
Figure 14. Box plots for (a) time-related, (b) weather, and (c) energy data for the analysed period (red crosses—outliers).
Figure 14. Box plots for (a) time-related, (b) weather, and (c) energy data for the analysed period (red crosses—outliers).
Energies 18 04744 g014
Figure 15. Correlation between electricity price and (a) time-related, (b) weather, and (c) energy data.
Figure 15. Correlation between electricity price and (a) time-related, (b) weather, and (c) energy data.
Energies 18 04744 g015
Figure 16. Histogram and cumulative line of parameter explained in PCA, showing the percentage of variance explained by the individual principal.
Figure 16. Histogram and cumulative line of parameter explained in PCA, showing the percentage of variance explained by the individual principal.
Energies 18 04744 g016
Figure 17. Example of 3-day electricity price predictions using MLP and SVM networks when compared with prices from the electricity sales market.
Figure 17. Example of 3-day electricity price predictions using MLP and SVM networks when compared with prices from the electricity sales market.
Energies 18 04744 g017
Figure 18. Price forecasting three-day NRMSE errors for the 2020–2021 period by MLP (blue) and SVM (brown) networks using (a) time-related data, (b) time-related and weather data, (c) time-related, weather, and energy prices data.
Figure 18. Price forecasting three-day NRMSE errors for the 2020–2021 period by MLP (blue) and SVM (brown) networks using (a) time-related data, (b) time-related and weather data, (c) time-related, weather, and energy prices data.
Energies 18 04744 g018
Figure 19. Price forecasting three-day NRMSE errors for the 2-year period 2023–2024 by MLP (blue) and SVM (brown) networks using (a) time-related data, (b) time-related and weather data, (c) time-related, weather, and energy price data.
Figure 19. Price forecasting three-day NRMSE errors for the 2-year period 2023–2024 by MLP (blue) and SVM (brown) networks using (a) time-related data, (b) time-related and weather data, (c) time-related, weather, and energy price data.
Energies 18 04744 g019
Figure 20. Comparison between computation times of MLP and SVM networks for two periods: 2020–2021 and 2023–2024.
Figure 20. Comparison between computation times of MLP and SVM networks for two periods: 2020–2021 and 2023–2024.
Energies 18 04744 g020
Table 1. Input data and their impact on energy-price-setting factors.
Table 1. Input data and their impact on energy-price-setting factors.
Input DataTime-RelatedWeatherEnergy Prices
Features Hour of DayDay of WeekWeek NumberCloud CoverTemperatureWind SpeedCoalGasETS
Time resolutionhourdayweekhourmonth3 days3 days
Data availability—forecast periodknownpredictedconstant
SupplyAvailability of generation sources+++ ++++++++
Energy production costs +++++++++
Energy sources prices ++++++
DemandAlternate fuel prices ++++++
Consumer activity++++++ +
Weather +++++++
Note: weak impact +; medium impact ++; strong impact +++.
Table 2. Values of price forecasting errors using MLP and SVM networks for the example 3-day period shown in Figure 17.
Table 2. Values of price forecasting errors using MLP and SVM networks for the example 3-day period shown in Figure 17.
MAPE (%)MAE (PLN)RMSE (PLN)NRMSE (-)
MLP11.72632.50.13
SVM6.01418.00.08
Table 3. Price forecasting average errors for the 2020–2021 period.
Table 3. Price forecasting average errors for the 2020–2021 period.
DataNetworkMAPE (%)MAE (PLN)RMSE (PLN)NRMSE (-)Tc (s)
Time-relatedMLP25.576.692.50.27240
SVM13.745.156.20.171730
Time-related + weatherMLP25.777.292.70.29320
SVM13.342.052.80.171616
Time-related + weather + energyMLP24.681.498.10.29389
SVM12.039.049.30.151916
Table 4. NRMSE values for individual days of the 3-day price prediction in the 2021–2022 period.
Table 4. NRMSE values for individual days of the 3-day price prediction in the 2021–2022 period.
DataNetworkNRMSE (-)
Day 1Day 2Day 3
Time-relatedMLP0.200.300.36
SVM0.130.180.18
Time-related + weatherMLP0.200.330.34
SVM0.130.170.18
Time-related + weather + energyMLP0.210.290.32
SVM0.130.150.15
Table 5. Price forecasting average errors for the 2023–2024 period.
Table 5. Price forecasting average errors for the 2023–2024 period.
DataNetworkMAPE (%)MAE (PLN)RMSE (PLN)NRMSE (-)Tc (s)
Time-relatedMLP1.078 × 1015136.9173.00.36905
SVM1.127 × 1015115.4145.80.401970
Time-related + weatherMLP9.234 × 1014120.1152.70.31954
SVM8.342 × 101491.5119.30.272392
Time-related + weather + energyMLP8.827 × 1014149.2195.10.371370
SVM8.253 × 101485.9113.30.252395
Table 6. NRMSE values for individual days of the 3-day price prediction in the 2023–2024 period.
Table 6. NRMSE values for individual days of the 3-day price prediction in the 2023–2024 period.
DataNetworkNRMSE (-)
Day 1Day 2Day 3
Time-relatedMLP0.280.330.36
SVM0.290.490.49
Time-related + weatherMLP0.280.340.34
SVM0.240.280.31
Time-related + weather + energyMLP0.310.370.37
SVM0.230.260.26
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Borkowski, D.; Jaśkiewicz, M. Forecasting Electricity Prices Three Days in Advance: Comparison Between Multilayer Perceptron and Support Vector Machine Networks. Energies 2025, 18, 4744. https://doi.org/10.3390/en18174744

AMA Style

Borkowski D, Jaśkiewicz M. Forecasting Electricity Prices Three Days in Advance: Comparison Between Multilayer Perceptron and Support Vector Machine Networks. Energies. 2025; 18(17):4744. https://doi.org/10.3390/en18174744

Chicago/Turabian Style

Borkowski, Dariusz, and Michał Jaśkiewicz. 2025. "Forecasting Electricity Prices Three Days in Advance: Comparison Between Multilayer Perceptron and Support Vector Machine Networks" Energies 18, no. 17: 4744. https://doi.org/10.3390/en18174744

APA Style

Borkowski, D., & Jaśkiewicz, M. (2025). Forecasting Electricity Prices Three Days in Advance: Comparison Between Multilayer Perceptron and Support Vector Machine Networks. Energies, 18(17), 4744. https://doi.org/10.3390/en18174744

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop