Next Article in Journal
Analysis of Grounding Schemes and Machine Learning-Based Fault Detection in Hybrid AC/DC Distribution System
Previous Article in Journal
A Hybrid LQR-Predictive Control Strategy for Real-Time Management of Marine Current Turbine System
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Comprehensive Analysis of Weather and Commodity Impacts on Day-Ahead Electricity Market Using Public API Data with Development of an Accessible Forecasting Mode

Faculty of Electrical Engineering and Information Technology, University of Žilina, 01026 Žilina, Slovakia
*
Authors to whom correspondence should be addressed.
Electricity 2026, 7(1), 10; https://doi.org/10.3390/electricity7010010
Submission received: 21 December 2025 / Revised: 15 January 2026 / Accepted: 18 January 2026 / Published: 2 February 2026
(This article belongs to the Topic Short-Term Load Forecasting—2nd Edition)

Abstract

A wide range of factors affect the dynamic and complex environment that is the commodity market. The most significant of these are external drivers, such as political decisions and weather conditions, which cannot be directly controlled. Nevertheless, specific characteristics and price behaviors are exhibited by individual commodities, which manifest through seasonal patterns and characteristic fluctuations. This study aimed to analyze the day-ahead electricity market and identify the key factors shaping electricity price formation. Particular focus was given to the role of meteorological variables and the interrelationships between the prices of other commodities, such as natural gas, coal, and oil. The analysis combined empirical techniques, such as Fourier transform and correlation analysis, with a predictive LSTM model using a Seq2Seq architecture to forecast short-term electricity prices. A basic forecast of electricity prices in the day-ahead market was provided by a simple predictive model that was developed based on the findings. The results highlight the interconnectedness of energy markets and confirm that external factors play a crucial role in shaping electricity prices.

1. Introduction

Market uncertainty is currently playing a significant role in day-ahead electricity prices, which are shaped by a range of external factors, particularly global fluctuations in commodity markets. While the EU has made significant progress in increasing renewable energy capacity, a significant portion of electricity generation still relies on fossil fuels. This reliance is an important determinant of prices, particularly during periods of increased volatility in international commodity markets [1]. The liberalization and integration of electricity markets across Europe have further increased the complexity of price formation in the day-ahead market (DAM). As large-scale electricity storage remains economically challenging, DAM prices are highly sensitive to short-term supply and demand fluctuations. Therefore, understanding the relationship between exogenous variables and DAM prices is crucial for market participants, system operators, and policymakers [2].
Prices of energy commodities, including but not limited to crude oil, natural gas, and coal, are among the most extensively studied external factors. These commodities are often used as marginal fuels in power generation, meaning that cost shocks can be transmitted directly into electricity markets by changes in their prices. Ref. [3] analyzes 21 European markets, showing that natural gas price shocks propagate into electricity prices across various generation mix scenarios. In a similar context, Ref. [4] found that the transmission of gas price fluctuations to electricity prices has intensified across bidding zones, particularly following recent geopolitical disruptions. Ref. [5], in relation to this, identified significant mutual interaction between fossil fuel and electricity markets.
In relation to this, significant bidirectional spillovers exist between the fossil fuel and electricity markets. The analysis accentuates the profound consequences of natural gas prices and weather-related factors, including heating degree days. Alongside fossil fuel prices, meteorological variables also play a crucial part in determining day-ahead electricity prices. Weather conditions affect both electricity demand, through factors such as temperature and wind speed, and supply, particularly in systems with a growing share of variable renewable energy sources, such as wind and solar power [5].
It is key to understand these multiple drivers, as shown by the structural evolution of electricity generation in the EU Figure 1. As illustrated, the generation mix has been gradually transforming over recent years. A steady increase in the share of renewable energy sources has been observed, while a decline in generation from fossil fuels has been experienced. Nevertheless, fossil fuels continue to account for a significant proportion of total electricity production [6]. In contrast, nuclear power generation has remained stable, with only minor year-on-year fluctuations. Despite the expansion of renewables, this ongoing dependence on fossil fuels explains why commodity price shocks continue to show a significant association with DAM prices, highlighting the importance of investigating their transmission mechanisms [7].
Although a substantial body of research has examined the influence of commodity prices and meteorological conditions on electricity markets, important questions remain regarding the relative and evolving importance of these factors in shaping DAM prices. While much of the existing literature has concentrated on forecasting accuracy or identifying long-term relationships, fewer studies have undertaken a comprehensive empirical analysis of how key external drivers such as fossil fuel prices, renewable generation, and demand conditions interact within specific market contexts [8].
Despite extensive evidence that renewable energy sources exert downward pressure on wholesale electricity prices across Europe [9] and globally [10], the joint dynamics between fossil fuel prices, variable renewable generation, and market design remain insufficiently understood. As renewable penetration increases and flexibility requirements grow, the sensitivity of DAM prices to traditional determinants—such as natural gas prices and system demand—appears to be shifting.
Recent evidence from European markets indicates that gas prices and wind generation have become increasingly dominant determinants of DAM price formation, often surpassing conventional demand-related effects [11]. These developments highlight the need for renewed analytical focus on the structural drivers and transmission mechanisms of electricity prices, rather than on forecasting performance alone, to better understand how energy transitions reshape short-term market behavior.
Electricity prices in liberalized power markets increasingly reflect the interaction of economic, geopolitical, and structural factors. In recent years, periods of heightened uncertainty have shown that shocks originating in fossil fuel markets can propagate rapidly into day-ahead electricity prices, affecting both short-term market outcomes and longer-term investment signals [12]. The worldwide conflict represents a clear example of how external disruptions can intensify price volatility across European electricity markets. In this broader context, electricity price dynamics can be interpreted as indicators of economic and social conditions related to energy security, as sustained price instability is commonly associated with affordability pressures, competitiveness concerns, and increased exposure to energy poverty [13]. Moreover, market responses to price volatility provide an indirect link to environmental outcomes, as they reflect shifts in generation and fuel use within electricity systems that remain partly dependent on non-renewable resources. Consequently, the analysis of DAM price formation has gained renewed importance, as DAM prices incorporate not only immediate supply and demand conditions, but also the underlying generation mix, renewable energy availability, and regulatory constraints [12].
Although there has been extensive research into predicting electricity prices on the DAM, significant gaps remain in our understanding of the mechanisms behind price formation in a changing market environment. Existing studies often examine the prices of fossil fuels, renewable energy sources, and meteorological variables separately, lacking a comprehensive empirical analysis of their interactions and time-varying importance within specific national markets. This shortcoming is particularly pronounced in smaller and less analyzed markets, such as the Slovak DAM, where specific price dynamics may result from the regional production mix, cross-border electricity flows, and regulatory conditions. At the same time, the link between market fundamentals analysis and the design of prediction models has been insufficiently explored in the literature, as many studies apply advanced deep learning methods without systematically taking into account identified cyclical patterns, commodity correlations, or meteorological factors. Last but not least, the question of the optimal range of historical data for short-term price prediction remains open, as longer time-series capture seasonality and extreme events, but their higher computational complexity may not lead to a proportional improvement in accuracy. From a practical point of view, there is a lack of approaches that focus on the use of such prediction tools by small prosumers who have limited computational resources but are increasingly interested in actively participating in the DAM. This work therefore focuses on the design and verification of a prediction framework that combines market fundamentals analysis with effective historical price modeling and can serve as a support tool for small prosumers or aggregators in optimizing their trading and operational strategies.

2. Forecasting Electricity Price

Accurate electricity price forecasting enables market participants to optimize their trading strategies and minimize the risks associated with price volatility. For electricity producers, accurate forecasting is crucial for production planning and profit maximization, while distributors and large consumers use it to manage their purchasing portfolios and reduce costs [14]. In an environment with an increasing proportion of renewable energy sources and rising price volatility, the importance of reliable forecasting tools is growing, as the quality of forecasts directly affects the financial performance of energy companies [15]. Price predictions are relied on by system operators to ensure the balance between supply and demand is maintained and to identify potential network congestion [15]. With a growing share of intermittent renewable sources, price forecasting becomes more complex but essential for effective power system management, and its accuracy requires reliable tools for measuring and comparing different predictive models [16]. Forecast evaluation uses several metrics to measure the deviation between actual and predicted values. The choice of metric depends on the data type and the objective of the analysis [15]. Five commonly used error metrics are employed in this study to systematically evaluate forecast performance: mean absolute error (MAE), mean squared error (MSE), root mean squared error (RMSE), and mean absolute percentage error (MAPE), as well as the coefficient of determination (R2).
R 2 = 1 i = 1 n ( y ^ i y ) 2 n = 1 n ( y i 1 n i = 1 n y i ) 2 ,
R M S E = 1 n i = 1 n ( y ^ i y i ) 2 ,
M S E = 1 n i = 1 n ( y ^ i y i ) 2 ,
M A E = 1 n i = 1 n y ^ i y i ,
M A P E = 100 % n i = 1 n y ^ i y i y i ,
S M A P E = 100 % n i = 1 n y ^ i y i ( y i + y ^ i ) / 2 ,
where n , y i , and y ^ i are the sample size as well as the actual and predicted values, respectively [17].

2.1. Basic Forecasting Model

This section provides an overview of commonly used forecasting approaches for short-term electricity price prediction, with a particular focus on deep learning-based models. The aim is to contextualize the proposed LSTM with sequence-to-sequence architecture by comparing it with existing methods reported in the literature. The reviewed models include recurrent neural networks (RNNs), Long Short-Term Memory (LSTM) networks, Convolutional Neural Networks (CNNs), attention-based models, Graph Neural Networks (GNN), and transformer-based approaches such as the Informer model. These models differ in terms of their input data structure, temporal dependency modeling, and ability to incorporate spatial or multivariate information.
Forecasting electricity prices using prediction methods based on historical data is possible [18] applied an artificial neural network (ANN) model in combination with the Markov Chain (MC) method to forecast electricity prices, with the aim of increasing prediction accuracy. For the study, the dataset was divided into two parts. The training set contained data from 2004 to 2018 and the test set covered the period from 2018 to 2020. The training set was used to implement the model and estimate its parameters. Results showed that the ANN model alone achieved a MAPE of 12.65% and MAE of USD2.95/MWh. In contrast, the combined ANN-MC model demonstrated slight improvement, achieving MAPE and MAE values of 12.57% and USD2.29/MWh, respectively. These results confirm that incorporating the Markov Chain method into the model increased the accuracy of electricity price predictions [18]. A variety of prediction models are used for short-term electricity price forecasting [19,20,21]. The methodologies that have been implemented for short-term forecasts in recent years can be categorized into regression models, such as Regression Splines Decomposition (RSD) and Smoothing Splines Decomposition (SSD) [22], neural network methods, specifically Long Short-Term Memory (LSTM) using Wavelet transform to prevent model fluctuations in prediction [19], and the extensive use of machine learning methods [20]. Table 1 provides an overview of the accuracy of these models [19,20,22]. Different models show varying degrees of accuracy in short-term electricity price forecasts, depending on the input data. The highest accuracy is achieved by the LSTM models when working with data divided into smaller time periods [19], but a significant advantage over alternative approaches is not shown by it when continuous data is used without this adjustment [20]. When working with continuous data, the Multi-Task Graph Neural Network (MTGNN) model tends to achieve higher prediction accuracy. Graph neural network (GNN) models perform better than Informer and ST-Norm models. This is due to the effective inclusion of spatial characteristics in the prediction. Examples of GNN models include Multi-Graph Adversarial Attention Learning (MGAAL) and Adaptive Spatial–Temporal Graph Convolutional Network (ASTGCN). The MGAAL model achieves the best performance on most evaluation metrics across different prediction horizons [20]. Significant regional differences in prediction accuracy have been identified, with prices in areas with a higher share of renewable energy sources showing greater fluctuations and being more difficult to predict. In contradistinction to artificial neural network-based approaches, decomposition models such as Residual Seasonal Decomposition (RSD) focus on the decomposition of time-series data into long-term trends, as well as seasonal and residual components [22]. This separation enables more accurate modeling of hidden patterns, particularly in datasets with strong seasonality or irregular trends. When configured correctly, the RSD model can significantly improve the accuracy of short-term electricity price prediction and other continuous data forecasting. According to Ref. [22], specific RSD model combinations achieve the lowest mean prediction errors, with performance varying slightly by season achieving the highest accuracy in spring and slightly higher, yet still acceptable, errors in summer.

2.2. Forecasting with Multiple Input Data

Hyperparameter-based models are used to predict electricity prices over longer time horizons. These models also use other data affecting electricity prices to make predictions [23]. The use of electricity prices and consumption levels was the approach taken in these cases. Predicting prices based on multiple data points is a relatively complex process that requires thorough data analysis. Ref. [23] used Fourier series to analyses the data, enabling him to effectively approximate the electricity price profile. We define the approximation of the non-new profile as follows:
f t = a 0 + 2 / N n n m a i n a n cos 2 n π t / N + b n s i n 2 n π / N ,
p t = f t + R t ,
where ft is the approximate price of electricity at time t, consisting of the main frequency components of the Fourier series; a0 represents the mean value of pt; an and bn are the Fourier coefficients that define the shape of the periodic functions at frequency n, with N representing the length of the original time series.
While this approximate price captures the basic development of the electricity price, it cannot describe hourly fluctuations or periods of extreme prices that exceed the basic patterns of the price profile. These fluctuations are described by the residual term Rt, which consists of all frequency dependencies. Three predictive models were employed by Ref. [23] to forecast electricity prices Linear Regression, Gaussian Process Regression (GPR), and ANN. The GPR model achieved the best overall performance among these, with a MAPE of approximately 13.5% for multi-output configurations and 13.2% for single-output configurations. By comparison, the linear regression model produced higher errors of 18.9% and 19.2%, while the ANN model produced intermediate accuracy with errors of 14.3% and 15.2%, respectively. These results suggest that GPR offers the most reliable and consistent forecasts for predicting electricity prices over extended time horizons [23].
Ref. [24] proposed a multivariable bi-forecasting system for predicting electricity prices that integrates point and interval forecasting in order to overcome the limitations of single-variable and single-output models. This begins with data pre-processing using Improved Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (ICEEMDAN) to enhance the quality of electricity price and load data by eliminating noise. A rolling forecasting framework with multi-input and multi-output structures is then constructed to combine electricity prices and power demand, improving prediction stability and accuracy. A hybrid predictive model employing linear operators is then established, with its parameters optimized using the Multi-Objective Golden Eagle Optimizer (MOGEO) algorithm. Experimental results using New South Wales datasets demonstrated superior performance in terms of both point and interval forecasting accuracy, confirming the robustness and effectiveness of the method [24].
Forecasting electricity prices is a complex process involving varying models, which differ depending on the number of factors taken into account and the time horizon of the forecast. The majority of models concentrate on a restricted number of input parameters, with certain predictions being based on a few primary factors, such as fuel prices and electricity consumption requirements [25]. High accuracy in short-term forecasts is achieved by these models, with minute-by-minute or hour-by-hour forecasts being focused on. They utilize historical data and incorporate operational data from networks in their analysis, which can unveil patterns in electricity consumption and generation over time [26]. But when they try to predict what prices will be in the long term, these models often produce results that differ significantly from the actual prices. This suggests a lack of capability in the prediction of long-term price changes. Other models take a wider range of factors into account, such as fuel prices, political decisions, power plant outages, renewable energy production, and meteorological conditions that directly affect renewable energy production [27]. These models provide more accurate and comprehensive forecasts. These models are primarily used for short-term predictions, enabling minute-by-minute or hour-by-hour price fluctuations to be predicted, which is crucial for market participants who must adapt to rapidly changing conditions. For longer time periods, the focus is on macroeconomic factors such as global energy demand, political factors, and technological advances in renewable energy in order to assess price fluctuations and risks associated with future market developments [28]. Models such as AleaSoft and Enerdata apply advanced machine learning techniques and econometric approaches, integrating factors such as fuel prices, market sentiment, political changes, power plant outages, and other relevant information [29,30]. They enhance forecast accuracy and support risk identification in both real-time and long-term markets. However, such models are usually available only to commercial subscribers, and their data are not publicly accessible.

2.3. Electricity Price Prediction Using Optimization Methods

Electricity price prediction models are increasingly being optimized, with the aim of improving the accuracy of predictions and reducing the impact of price fluctuations on consumers. The accuracy of prediction models is significantly improved by these methods, which adjust their parameters to minimize errors and maximize output accuracy [31]. The optimization process is carried out at several levels, with a key role being played by hyperparameter tuning in determining the model’s effectiveness. Common approaches to identifying optimal parameter combinations include grid Random Search (RS) [32]. However, for models with a large number of parameters, more advanced optimization algorithms such as the Particle Swarm Optimization (PSO) and Genetic Algorithm (GA) need to be applied [32,33]. As part of the optimization process, datasets from the English and German electricity markets were used to train a Convolutional Neural Network (CNN) with a Bidirectional-LSTM architecture, for which GA and Random Search (RS) methods were implemented. The application of these methods resulted in a substantial enhancement in prediction accuracy, with the PSO method attaining the desired deviation. Subsequent research [32], focused on improving the accuracy of LSTM, recurrent neural network (RNN), and Backpropagation (BP) models by integrating decomposition techniques, such as Variation Mode Decomposition (VMD), with an Attention mechanism (ATT) and Gray Wolf Optimizer (GWO). The best results were achieved by models combining all three techniques, as was confirmed by testing various combinations of these approaches [33]. As shown in Table 2, the VMD-GWO-ATT-LSTM model achieved the lowest errors (RMSE = 1.78 €/MWh and MAE = 1.45 €/MWh), confirming that integrating optimization and decomposition methods can significantly improve the ability of models to accurately predict short-term movements in electricity prices [32,33]. The performance metrics of the optimized models are summarized in Table 2 [32,33]. The accuracy of short-term electricity price forecasts has been shown to be improved by combining advanced optimization models with hybrid architectures [31]. In comparison to earlier models that relied exclusively on rudimentary methods without resorting to optimization techniques [19,20,22], the implementation of sophisticated algorithms such as Particle Swarm Optimization, Genetic Algorithms, Gray Wolf Optimizers, and Bayesian optimization algorithms led to a substantial reduction in prediction errors across a range of model architectures. The best results were achieved by the integration of these optimization methods with decomposition techniques such as variational mode decomposition and the attention mechanism [33].

3. Data Description and Methodological Framework

To understand the electricity market, it is necessary to analyses the DAM in detail, because it represents a key segment of short-term electricity trading and interacts closely with other energy commodities. The data used for this analysis was obtained from the publicly available OKTE [34] source and relates to the Slovak electricity market. To enable automated historical data retrieval within the required time frame, an API was implemented [35]. Data processing and analysis were carried out in the Python programming language using the JSON library to load and process files. Data covering the period from 1 January 2020 to 30 June 2025 was obtained from the day-ahead market database, with all data recorded at hourly intervals. Fast Fourier Transform (FFT) and Autocorrelation coefficient were then implemented to identify periodic patterns and dominant frequency components in the time series.
As shown in Figure 2 and Figure 3, two methodologies were used to identify periodic patterns in electricity prices, showing three main cycles: daily, weekly, and semi-daily. Analyzing a smaller subset of the data in Figure 2 reveals that the filtered data more closely follows real values than when a longer period is analyzed in Figure 3. The noise distribution graph shows that the residual component is approximately normally distributed around zero. This suggests that most deviations from the filtered signal are random, and that the filtering process effectively captures the dominant periodic patterns in DAM prices. Between 2020 and 2023, the world faced a number of major crises, which caused significant disruption to commodity markets and typical price dynamics. This led to more volatile and sudden fluctuations in prices. These outcomes are consistent with recent studies by [36,37], which emphasize the significant sensitivity of commodity prices to external and uncontrollable factors, such as geopolitical tensions and global changes. Ref. [36] demonstrated that the volatility and spillover effects across fossil energy, electricity, and carbon markets were substantially increased by the effects of the pandemic and the Russia–Ukraine conflict, while [37] highlighted synchronized changes in oil, coal, and natural gas markets driven by uncertainty, investor sentiment, and structural market.
Even within the shorter time frame of 2023–2025, daily, weekly, seasonal, and sub-seasonal cycles are evident, suggesting that predictive models for DAM prices should be able to capture long-term cyclical behavior using limited historical data. However, extending the analysis to the period from 2020 to 2025 provides a clearer identification of seasonal and semi-annual patterns driven by broader market and macroeconomic factors. Table 3 summarizes the dominant periodicities in DAM prices for two different data lengths. It shows that daily, weekly, and seasonal cycles are consistently present, while longer datasets reveal additional long-seasonal and semi-annual patterns. The “Extent” column indicates the magnitude of price fluctuations for each cycle.
In today’s highly interconnected global economy, commodity markets are increasingly interdependent. Price movements in one market often cause changes in others. Numerous studies have demonstrated significant interlinkages among commodities—for instance, electricity prices are closely tied to the dynamics of emission allowance markets and fossil fuel prices. For example, “Energy commodities spillover analysis for assessing the functioning of the European Union Emissions Trading System trade network of allowances” shows that energy commodity shocks (brent, coal, gas) act as transmission channels into the European Union Emissions Trading System trade network of allowances, making the carbon market network a net receiver of spillovers from energy markets [38]. Similarly, the study, “Alarming contagion effects: The dangerous ripple effect of extreme price spillovers across crude oil, carbon emission allowance, and agriculture future markets”, finds that under extreme market conditions, the interdependence among crude oil, carbon emission allowances, and other commodity futures can surge dramatically, reducing diversification benefits and increasing systemic risk [39]. Another investigation, “A Study Based on Positive and Negative Price Volatility”, identifies that feedback loops exist between energy and carbon markets, where volatility shocks in fossil fuel markets propagate into carbon pricing, demonstrating a contagion pathway across commodity systems [40]. Moreover, Ref. [41] found dynamic, bidirectional volatility spillovers between carbon and energy markets, confirming the presence of persistent co-movements across energy commodities. These findings consistently indicate that fossil fuels, electricity, and emission allowances form a tightly connected network in which shocks in one market can rapidly transmit to others, influencing both pricing behaviors and market stability.
Historical commodity price data were obtained from Yahoo Finance using the yfinance Python library [42], while electricity price data were sourced from the OKTE day-ahead market platform [35]. Our comparative analysis focuses on the year 2024, for which complete datasets across all examined commodities are available. Before computing correlation coefficients, it is essential to ensure that all datasets have consistent lengths and comparable temporal characteristics. Commodities such as crude oil and electricity [35] provide daily trading values, whereas other commodities exhibit different temporal resolutions. To address this, we adopt an approach that considers relative price changes over time, enabling meaningful comparison across markets. Specifically, daily price variations are analyzed to capture year-long dynamics. Natural gas trading occurs during specific hours (8:00–22:00), coal prices are updated once per day, emission allowances are traded continuously within a 24-h window, and uranium prices, similar to coal, are revised once daily.
Figure 4 shows a positive correlation between electricity prices and three selected commodities: natural gas, emission allowances, and coal. The strongest positive correlation (r = 0.59) was observed between electricity and natural gas, suggesting that gas plays a key role in electricity pricing, particularly given the significant proportion of electricity produced by gas-fired power plants. The moderately positive correlations with emission allowances (r = 0.28) and coal (r = 0.14) imply that these commodities may also shape electricity prices to some extent, primarily through emission costs and fuel substitution. On the other hand, the negative correlations seen among electricity and Brent crude oil (r = −0.48) and Uranium (r = −0.47) imply that these markets might be driven by different dynamics, influenced by factors not directly connected to the electricity market, such as macroeconomic cycles, geopolitical events, or specific nuclear sector developments. As well as the previously mentioned correlations between electricity prices and specific commodities, additional interconnections can be seen between the commodities themselves. For example, gas shows a positive correlation with emission allowances and a negative correlation with coal, while it correlates negatively with Brent crude oil and uranium. Emission allowances are positively linked to coal, but have weaker or negative relationships with other fuels. There is a slightly positive correlation between Brent crude oil and Uranium.
The aim of the second part of the data analysis is to determine the potential effect of weather factors on electricity prices. As in the previous case, this step involves comparing parameters received from the OKTE platform with historical meteorological data obtained from the Historical Weather API [34,43]. Since only variables for 2024 were included in the previous part of the analysis, data from the same period is used in this case as well. Five meteorological variables were received from the API: air temperature, wind speed, precipitation, humidity, and cloud cover [43].
Contrary to the previous database, where it was required to summaries the data into daily values, the data in this case is provided in hourly intervals. For analysis purposes, all variables were normalized into relative units, since individual meteorological variables differ in their physical scales. This process of standardization enables the comparison of these values and prevents any distortion of the results of the correlation analysis. When looking at how weather affects things, it is important to remember that, unlike with other products, the weather can have a positive or negative correlation on the price of electricity.
The average correlation between weather variables and electricity prices depending on the hour of the day is shown in Figure 5. This has been calculated using a 24-h rolling window. As can be seen from the graph, the correlation varies significantly throughout the day. During the day, there is a notable negative relationship between temperature and time, with a peak of around −0.5 at midday. However, this shifts to positive correlation at night. The opposite pattern is exhibited by relative humidity, which has a positive correlation during the day, peaking at around 0.5, and a negative correlation at night. A slight negative correlation is shown by wind speed, which remains relatively stable throughout the day. The correlation values of cloud cover and precipitation are smaller and more variable. These distinct daily patterns in correlation are probably due to the increase in electricity prices caused by renewable energy sources, especially solar and wind. The observed relationships are also significantly shaped by daily consumption profiles and seasonal factors. Figure 5 shows average values only and cannot capture the full range of variability in correlations that occur at different times and under different conditions.
Figure 6 was created to analyze the distribution of correlation coefficients between electricity prices and individual weather variables in detail. The histograms show how frequently different correlation values occurred during the analyzed period. These reveal that all weather variables exhibit a significantly wider range of correlation values, ranging from strongly negative to strongly positive, than the average values shown in Figure 5 suggest. Temperature tends to be negatively correlated with electricity prices, with a significant shift in the distribution towards negative values. This suggests that rising temperatures are linked to falling prices. A distribution that is shifted towards higher values is often associated with increased relative humidity. Wind speed, cloud cover, and precipitation exhibit a relatively symmetrical distribution of correlations around zero, but with a wide range of values. In Figure 6, a cumulative histogram reveals considerable overlap in the correlation values of the individual parameters across the entire spectrum from −1 to +1, despite their different distribution characteristics. This indicates a complex interaction between weather variables and electricity prices that is not apparent from average values alone.
When considering the different factors affected by weather, it is important to note that, unlike other products, weather can have a positive or negative impact on electricity prices. This concept is reflected in recent research. Ref. [44] demonstrated that weather conditions and climate change significantly influence wholesale electricity prices, with both extremely low and high temperatures leading to price increases due to increased demand for heating and cooling. Similarly, Ref. [45] emphasizes a simultaneous hedging strategy for price and volume risks in electricity businesses using energy and weather derivatives, noting that variations in temperature and wind speed represent key risk factors in electricity markets, affecting not only consumption but also price volatility. Furthermore, Ref. [46] presents evidence suggesting that weather-related variations in electricity demand, particularly those associated with heating and cooling requirements, vary considerably between high-income and middle-income countries. The analysis indicates that middle-income economies, characterized by rapid electrification and growing cooling needs, exhibit greater demand elasticity in response to temperature changes, whereas electricity consumption in high-income OECD countries remains more sensitive to heating requirements.

4. Application of the Proposed LSTM-Seq2Seq Model to Day-Ahead Market Prices

The development and evaluation of electricity price prediction models in this study are based on the analysis of data obtained from the DAM, which were discussed in detail in the previous chapters. In 1997, ref. [47] developed the LSTM model to solve issues faced in RNN learning. Problems such as an increase or loss of gradient value during learning are often encountered in traditional learning methods, such as backpropagation through time (BTT) and recurrent learning (RL). These inaccuracies caused the model to be unstable and learning to be inefficient, especially when working with longer time dependencies. The distinctive architecture of LSTM models is pivotal to their capacity to solve these problems, as it facilitates consistent learning over very long periods. This method guarantees that data is kept for the duration of the learning process, allowing models to successfully learn even with extended time dependencies while maintaining the capacity to process short-term data [48]. Due to these properties, LSTM models have become extremely advantageous in domains such as speech recognition, as well as image and time-series processing, all of which require long-term memory.
Based on our previously developed LSTM model with a sequence-to-sequence (Seq2Seq) architecture, this study applies the corresponding modeling framework to a new forecasting domain. In our earlier work [49], we used real data from photovoltaic systems and smart meters to train the model to predict household electricity consumption and production. Seq2Seq architecture combines an encoder–decoder structure to enable the model to capture nonlinear and long-term temporal dependencies within time-series data effectively. In the present research, we have adapted this framework to forecast short-term electricity market prices. The model’s underlying architecture, training methodology, and parameter configuration remain similar to those described in [49], ensuring comparability of results while extending the model’s applicability to a different dataset and forecasting objective. Further technical details are provided in Appendix ATable A1 and Table A2.

Processing of Data from the DAM

The initial stage of the forecasting procedure involved comprehensive planning and management of the data. The dataset was examined and cleaned, revealing that there were no gaps or missing values in the time series. This allowed for their direct application in modeling and prediction. Figure 7 shows all the data used to create the prediction models and displays average daily prices for the period from 2020 to 30 June 2025. Based on the FFT and ACF results, two approaches were defined for training the models, using different time ranges for the training and testing data.
  • The first approach involved using data from the entire 2020–2025 period to train the model, with testing performed on the 2025 data remaining.
  • The second approach employed the same division principle; however, the model was trained using data from 2023–2025, and the test set comprised the remaining 2025 data.
For both datasets, the data were partitioned into training and testing subsets using an 80:20 ratio, ensuring that 80% of the data were used for model training and the remaining 20% for testing. As shown in Figure 8, in the first instance (blue histogram), all the data available from the 2020–2025 period were included in the learning and testing process, while in the second instance (red histogram), only data from the 2023–30 June 2025 period was utilized. Fourier analysis confirmed that both sets exhibited the same range of dominant frequencies, suggesting that shortening the time range did not decrease the quality of the results. At the same time, the smaller data range enabled faster model training with only a slight loss of accuracy, as demonstrated by the previous analysis results.
Table 4 presents the different configurations of the forecasting model, showing how variations in sequence length, forecast horizon, and number of training epochs result in different performance metrics. All experiments were conducted on a GF76 11UC laptop, equipped with an 11th Gen Intel® Core™ i7-11800H processor operating at 2.30 GHz, 32 GB of RAM with a speed of 3200 MT/s, and an NVIDIA GeForce RTX 3050 Laptop GPU. These hardware specifications define the computational environment in which the model was trained and therefore provide important context for interpreting the training times and overall efficiency of the individual configurations.
In the context of 24-h-ahead forecasting, the utility of employing the complete 2020–2025 dataset remains ambiguous. Though a bigger dataset provides more information about historical price movements, incorporating it into the model requires substantially more computing power and longer training times. Using a smaller subset of data, such as from 2023–2025, enables faster training. However, when considering the potential extension of the model to incorporate multiple input variables in the future, it is unclear whether prediction accuracy would be maintained, improved, or reduced with a smaller data window. Therefore, careful selection of the input data and its historical range is crucial for balancing the trade-off between computational efficiency and achievable accuracy in short-term forecasts.

5. Discussion

The results of empirical analysis confirm that electricity prices on the Slovak DAM are driven by a combination of cyclical patterns, commodity prices, and meteorological factors, whose significance varies over time and depends on the daily and seasonal context. Analysis using Fourier transform and autocorrelation coefficients clearly identified daily, half-daily, and weekly cycles, which represent the dominant frequency components of price developments. These findings are consistent with the operational characteristics of the electricity system and the typical consumption profiles of market participants.
Extending the analyzed period to 2020–2025 made it possible to capture longer-term seasonal and semi-annual cycles that were not as pronounced in the shorter time window. The correlation analysis of commodities confirmed the dominant role of natural gas in shaping electricity prices, which is consistent with the high share of gas sources in the marginal generation mix. The positive correlation with emission allowances points to the importance of carbon costs, while weaker or negative relationships with oil and uranium suggest different market mechanisms and investment motivations in these segments. The results thus support the hypothesis of strong interconnections between electricity, fossil fuels, and the carbon market. Historical evidence from the COVID-19 pandemic and the Russia–Ukraine conflict further illustrates how external shocks can temporarily alter these interdependencies, emphasizing the evolving nature of commodity–electricity linkages under stress conditions [50,51].
Analysis of meteorological factors revealed significant temporal variability in correlations that would not have been captured using average values. Temperature and relative humidity showed different daily patterns, reflecting the combined impact of heating and cooling demand as well as variable renewable energy production. The wide distribution of correlation coefficients confirms that the relationship between weather and electricity prices is nonlinear and conditioned by several factors, including time of day, season, and current generation mix. In electricity systems with increasing renewable penetration, these effects become more pronounced and nonlinear, as periods of high renewable output can substantially suppress prices, while unfavorable weather conditions increase reliance on thermal generation with higher marginal costs [52]. The correlation-based approach adopted in this study captures these interactions at a descriptive level but does not establish causality, and the observed relationships may reflect combined effects of demand variability, renewable generation patterns, fuel price dynamics, and system constraints [53].
The application of the LSTM model with Seq2Seq architecture showed that the model is capable of effectively capturing short-term price dynamics even when using historical prices exclusively. The best results were achieved for shorter prediction horizons ranging from 1 to 24 h, which is in line with theoretical assumptions and the practical needs of the DAM, where trading is conducted exclusively 24 h in advance. An interesting finding is that the model trained on a shorter historical period (2023–2025) achieved comparable and, in some cases, even better accuracy with significantly lower computational requirements. This suggests that for short-term electricity price prediction, the relevance and timeliness of data may be more important than its volume, which increases the practical usefulness of the proposed approach as a support tool for aggregators of small prosumers in optimizing their participation in the DAM.
When compared to the forecasting models reviewed in “Section 2”, the LSTM-Seq2Seq architecture demonstrates clear benefits in handling variable-length sequences and capturing temporal dependencies over longer horizons. Standard LSTM models and their hybrid versions with CNN or attention mechanisms generally perform well for short-term predictions, particularly when high-resolution data or seasonal decomposition is applied. However, highly optimized models combining decomposition techniques such as VMD with attention mechanisms or metaheuristic optimizers often achieve lower RMSE and MAE values, reflecting superior accuracy under volatile conditions. The results of this study, summarized in Table 4, confirm that while the LSTM-Seq2Seq model provides robust short-term forecasts, careful selection of sequence length, forecast horizon, and training configuration is essential to balance predictive accuracy and computational efficiency.
On the other hand, the model’s weaker performance over longer prediction horizons points to its limited ability to capture extreme price events and structural market changes, which are often the result of external shocks such as geopolitical events, sudden changes in fuel prices, or production capacity outages. Since these factors are not explicitly included in historical price data, further improving the accuracy of the prediction would require extending the model framework to include exogenous variables such as fossil fuel prices, renewable energy production, or meteorological inputs. These directions represent a natural continuation of this work and open up space for future research focused on multivariate and adaptive prediction models.
Overall, the results of this work confirm that the combination of market fundamentals analysis and advanced deep neural networks represents a promising approach to understanding and short-term prediction of electricity prices in the DAM. At the same time, they point to the need for further research focused on extending models with exogenous information and adaptive architectures that could better respond to growing volatility and the ongoing transformation of energy markets.

6. Conclusions

This study provides a thorough analysis of the factors that contribute to electricity prices on the Slovak DAM. It combines an examination of commodity market dynamics and meteorological conditions with data-driven forecasting methodologies. The results confirm that electricity prices are highly sensitive to external changes, particularly natural gas and carbon allowance prices, as well as extreme weather events. Despite the growing share of renewable energy, fossil fuels continue to determine the marginal price for many hours, explaining the strong correlation between DAM prices and gas markets.
The investigation demonstrates that advanced machine learning models, specifically the LSTM-Seq2Seq framework, can effectively capture short-term price dynamics using historical data alone. Complementary methods, such as FFT and autocorrelation analysis, were instrumental in identifying daily, weekly, and seasonal cycles, which improved understanding of price patterns and guided predictive modeling. Comparing training datasets highlighted trade-offs between data volume and forecast horizon: shorter datasets (2023–2025) were more efficient and accurate for very short-term predictions, whereas longer datasets (2020–2025) improved accuracy for medium-term forecasts.
The findings indicate that predictive accuracy could be further enhanced by extending the model to a multivariate framework incorporating commodity prices, meteorological variables, renewable generation, and load indicators. Such an expansion would require balancing model complexity, data availability, and computational efficiency. Additionally, considering cross-border flows and neighboring bidding zones could provide a more complete picture of structural determinants in DAM price formation.
Overall, this study contributes to a deeper understanding of the structural drivers shaping DAM prices and demonstrates the practical feasibility of accessible forecasting tools based on publicly available data. The proposed approach offers added value for market participants, including smaller consumers and aggregators of prosumers, who wish to engage in short-term market participation without relying on costly commercial tools. While limitations remain—particularly the exclusion of exogenous causal factors and the focus on a single bidding zone—this work lays a foundation for future research on multivariate, adaptive, and more robust forecasting frameworks capable of responding to the growing volatility and transformation of energy markets.

Author Contributions

M.M. Conceptualization, Methodology, Software, Data curation, Formal analysis, Investigation, Visualization, Writing—original draft, Writing—review and editing. P.B. Conceptualization, Supervision, Resources, Writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article through API: https://github.com/ranaroussi/yfinance (accessed on 20 October 2025), https://www.okte.sk/en/api-documentation/short-term-market/dam-results/ (accessed on 30 January 2025), and https://github.com/open-meteo/open-meteo (accessed on 20 October 2025).

Acknowledgments

The authors sincerely thank the anonymous reviewers for their thorough evaluation and constructive feedback, which greatly contributed to improving the quality of this manuscript. The authors acknowledge the use of DeepL for assistance with the translation of technical terms and phrases. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Model

Appendix A.1. Model Architecture

The forecasting model employs a sequence-to-sequence (Seq2Seq) architecture based on Long Short-Term Memory (LSTM) networks, implemented using Keras/TensorFlow. The architecture consists of an encoder–decoder structure designed to capture temporal dependencies in electricity price time series data.
Table A1. LSTM-Seq2Seq model architecture summary.
Table A1. LSTM-Seq2Seq model architecture summary.
ComponentLayer TypeUnit/ConfigActivationValues
EncoderLSTM128 unittanh66,560
DropoutRate = 0.2-0
Repeat vector84 repetitions-0
DecoderLSTM64 unittanh49,408
DropoutRate = 0.2-

Appendix A.2. Hyperparameters

The model hyperparameters were configured based on preliminary experimentation and computational constraints. All hyperparameters are listed in Table A2.
Table A2. Model hyperparameters.
Table A2. Model hyperparameters.
ParametersValue
OptimizerAdam
Learning rateDefault (0.001)
Loss functionMSE
Batch size64
Maximum Epochs100
Early stopping10 epochs
Early stopping monitorValidation loss
Restore best weightsTrue
Activation function (hidden layer)Tanh
Activation function (output layer)Linear
Dropout rate0.2

Appendix A.3. Data Pre-Processing—Normalization

All price data were normalized using Min–Max scaling to the range [0, 1] [49]:
P n o r m = P P m i n P m a x P m i n
P is the current value, P m i n is the minimum, P m a x is the maximum, and P n o r m is the normalized value 0 and 1.

Sequence Generation

Time-series data were transformed into a supervised learning format using a sliding window approach. Let P = [ P 1 , P 2 , , P N ] be the time series, L s the sequence length, and L f the forecast length. The input sequences X ( i ) and target sequences Y ( i ) are defined as
X ( i ) = [ P i , P i + 1 , P i + L s 1 ]
Y ( i ) = [ P i + L s , P i + L s + 1 , P i + L s + L f 1 ]
for i = 1,2 , , N L s L f + 1 .

References

  1. Hille, E. Europe’s energy crisis: Are geopolitical risks in source countries of fossil fuels accelerating the transition to renewable energy? Energy Econ. 2023, 127, 107061. [Google Scholar] [CrossRef]
  2. Liebensteiner, M.; Ocker, F.; Abuzayed, A. High electricity price despite expansion in renewables: How market trends shape Germany’s power market in the coming years. Energy Policy 2025, 198, 114448. [Google Scholar] [CrossRef]
  3. Uribe, J.M.; Mosquera-López, S.; Arenas, O.J. Assessing the relationship between electricity and natural gas prices in European markets in times of distress. Energy Policy 2022, 166, 113018. [Google Scholar] [CrossRef]
  4. Zhu, L.; Zhang, L.; Liu, J.; Zhang, H.; Zhang, W.; Bian, Y.; Yan, J. Unpacking the effects of natural gas price transmission on electricity prices in Nordic countries. iScience 2024, 27, 109924. [Google Scholar] [CrossRef]
  5. Liu, D.; Liu, X.; Guo, K.; Ji, Q.; Chang, Y. Spillover Effects among Electricity Prices, Traditional Energy Prices and Carbon Market under Climate Risk. Int. J. Environ. Res. Public Health 2023, 20, 1116. [Google Scholar] [PubMed]
  6. Eurostat. Eurostat June 2025. Available online: https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Energy_production_and_imports#cite_note-4 (accessed on 13 October 2025).
  7. Eurostat. Eurostat Data Browser. 21 August 2025. Available online: https://ec.europa.eu/eurostat/databrowser/product/page/NRG_IND_PEHNF (accessed on 13 October 2025).
  8. Zakeri, B.; Staffell, I.; Dodds, P.E.; Grubb, M.; Ekins, P.; Jääskeläinen, J.; Cross, S.; Helin, K.; Gissey, G.C. The role of natural gas in setting electricity prices in Europe. Energy Rep. 2023, 10, 2778–2792. [Google Scholar] [CrossRef]
  9. Herczeg, B.; Printér, É. The Nexus between Wholesale Electricity Prices and the Share of Electricity Production from Renewables: An Analysis with and without the Impact of Time of Distress. Energies 2024, 17, 857. [Google Scholar] [CrossRef]
  10. Mills, A.D.; Levin, T.; Wiser, R.; Seel, J.; Botterud, A. Impacts of variable renewable energy on wholesale markets and generating assets in the United States: A review of expectations and evidence. Renew. Sustain. Energy Rev. 2020, 120, 109670. [Google Scholar] [CrossRef]
  11. Ferkingstad, E.; Løland, A.; Wilhelmsen, M. Causal modeling and inference for electricity markets. Energy Econ. 2011, 33, 404–412. [Google Scholar] [CrossRef]
  12. Cincinelli, P.; Pellini, E. The role of geopolitical and climate risk in driving uncertainty in European electricity markets. Energy Econ. 2025, 144, 108276. [Google Scholar] [CrossRef]
  13. Chomać-Pierzecka, E. Economic, Environmental and Social Security in accordance with the Concept of Sustainable Development. Adm. Secur. Stud. 2025, 18, 257–272. [Google Scholar] [CrossRef]
  14. Jedrzejewski, A.; Lago, J.; Marcjasz, G.; Weron, R. Electricity Price Forecasting: The Dawn of Machine Learning. IEEE Power Energy Mag. 2022, 20. [Google Scholar] [CrossRef]
  15. Raviv, E.; Bouwman, K.E.; van Dijk, D. Forecasting day-ahead electricity prices: Utilizing hourly prices. Energy Econ. 2015, 50, 227–239. [Google Scholar] [CrossRef]
  16. Tschora, L.; Pierre, E.; Plantevit, M.; Robardet, C. Electricity price forecasting on the day-ahead market using machine learning. Appl. Energy 2022, 313, 118752. [Google Scholar] [CrossRef]
  17. Tegoundio, D.D.; Nguikwie, S.K.; Boum, A.T. Modeling and optimization of turmerone concentrations from fermented turmeric waste essential oil via ANN and statistical techniques. Ind. Crops Prod. 2025, 232, 121899. [Google Scholar] [CrossRef]
  18. Alhendi, A.; Al-Sumaiti, A.S.; Marzband, M.; Kumar, R.; Diab, A.A.Z. Short-term load and price forecasting using artificial neural network with enhanced Markov chain for ISO New England. Energy Rep. 2023, 9, 4799–4815. [Google Scholar] [CrossRef]
  19. Memarzadeh, C.; 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]
  20. Li, Y.; Li, C.; Chen, G.; Zhou, X.; Dong, Z. Multi-Task Graph Adaptive Learning for Multivariate Electricity Price Short-Term Forecasting in Australia’s National Electricity Market. IEEE Trans. Power Syst. 2024, 40, 530–542. [Google Scholar] [CrossRef]
  21. Guo, Y.; Du, Y.; Wang, P.; Tian, X.; Xu, Z.; Yang, F.; Chen, L.; Wan, J. A hybrid forecasting method considering the long-term dependence of day-ahead electricity price series. Electr. Power Syst. Res. 2024, 235, 110841. [Google Scholar]
  22. Iftikhar, H.; Turpo-Chaparro, J.E.; Rodrigues, P.C.; López-Gonzales, J.L. Forecasting Day-Ahead Electricity Prices for the Italian Electricity Market Using a New Decomposition—Combination Technique. Energies 2023, 16, 6669. [Google Scholar]
  23. Gabrielli, P.; Wüthrich, M.; Blume, S.; Sansavini, G. Data-driven modeling for long-term electricity price forecasting. Energy 2022, 244, 123107. [Google Scholar] [CrossRef]
  24. Nie, Y.; Li, P.; Wang, J.; Zhang, L. A novel multivariate electrical price bi-forecasting system based on deep learning, a multi-input multi-output structure and an operator combination mechanism. Appl. Energy 2024, 336, 123233. [Google Scholar] [CrossRef]
  25. 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]
  26. Mishra, B.K.; Preniqi, V.; Thakker, D.; Feigl, E. Machine learning and deep learning prediction models for time-series: A comparative analytical study for the use case of the UK short-term electricity price prediction. Discov. Internet Things 2024, 4, 24. [Google Scholar] [CrossRef]
  27. Bâra, A.; Oprea, S.-V. Predicting Day-Ahead Electricity Market Prices through the Integration of Macroeconomic Factors and Machine Learning Techniques. Int. J. Comput. Intel. Syst. 2024, 17, 10. [Google Scholar] [CrossRef]
  28. Rao, A.; Tedeschi, M.; Mohammed, K.S.; Shahzad, U. Role of Economic Policy Uncertainty in Energy Commodities Prices Forecasting: Evidence from a Hybrid Deep Learning Approach. Comput. Econ. 2024, 64, 3295–3315. [Google Scholar] [CrossRef]
  29. Mellon, M.; Cchini, Q. EnerFuture 2022: Global Energy Scenarios Through 2050. June 2022. Available online: https://argaamplus.s3.amazonaws.com/5f7719a8-9a27-458f-900c-49e730538db1.pdf (accessed on 21 October 2025).
  30. AleaSoft. AleaSoft. 23 May 2025. Available online: https://aleasoft.com/forecasting-time-horizons-short-medium-long-term/ (accessed on 23 October 2025).
  31. Meng, A.; Wang, P.; Zhai, G.; Zeng, C.; Chen, S.; Yang, X.; Yin, H. Electricity price forecasting with high penetration of renewable energy using attention-based LSTM network trained by crisscross optimization. Energy 2022, 254, 124212. [Google Scholar] [CrossRef]
  32. Mubarak, H.; Abdellatif, A.; Ahmad, S.; Islam, M.Z.; Muyeen, S.; Mannan, M.A.; Kamwa, I. Day-Ahead electricity price forecasting using a CNN-BiLSTM model in conjunction with autoregressive modeling and hyperparameter optimization. Int. J. Electr. Power Energy Syst. 2024, 161, 110206. [Google Scholar] [CrossRef]
  33. Xu, Y.; Huang, X.; Zheng, X.; Zeng, Z.; Jin, T. VMD-ATT-LSTM electricity price prediction based on grey wolf optimization algorithm in electricity markets considering renewable energy. Renew. Energy 2024, 236, 121408. [Google Scholar] [CrossRef]
  34. Total DAM Results. OKTE, a.s., 27 October 2025. Available online: https://www.okte.sk/en/short-term-market/published-information-of-dam/total-dam-results/ (accessed on 30 January 2025).
  35. DAM, DAM Results. OKTE, a.s., 27 October 2025. Available online: https://www.okte.sk/en/api-documentation/short-term-market/dam-results/ (accessed on 30 January 2025).
  36. Ye, Y.; Lin, B.; Que, D.; Cai, S.; Wang, C. COVID-19, the Russian-Ukrainian conflict and the extreme spillovers between fossil energy, electricity, and carbon markets. Energy 2024, 331, 133399. [Google Scholar] [CrossRef]
  37. Charteris, A.; Obojska, L.; Szczygielski, J.J.; Brzeszczyński, J. Energy market connectedness: A tale of two crises. Energy Econ. 2025, 153, 108787. [Google Scholar] [CrossRef]
  38. Flori, A. Energy commodities spillover analysis for assessing the functioning of the European Union Emissions Trading System trade network of carbon allowances. Sci. Rep. 2024, 14, 21708. [Google Scholar] [CrossRef]
  39. Wei, Y.; Wang, Y.; Vigne, S.A.; Ma, Z. Alarming contagion effects: The dangerous ripple effect of extreme price spillovers across crude oil, carbon emission allowance, and agriculture futures markets. J. Int. Financ. Mark. Inst. Money 2023, 88, 101821. [Google Scholar] [CrossRef]
  40. Yu, B.; Chang, Z. Connectedness of Carbon Price and Energy Price under Shocks: A Study Based on Positive and Negative Price Volatility. Sustainability 2024, 16, 5226. [Google Scholar] [CrossRef]
  41. Chen, Y.; Qu, F.; Li, W.; Chen, M. Volatility spillover and dynamic correlation between the carbon market and energy markets. J. Bus. Econ. Manag. 2019, 20, 979–999. [Google Scholar] [CrossRef]
  42. Aroussis, Yahoo! Finance API (Version 0.2.x) [Python Library]. The Yahoo! Finance. 26 September 2024. Available online: https://github.com/ranaroussi/yfinance (accessed on 20 October 2025).
  43. Patrick, Z. Open-Meteo.com. Weather API. 18 July 2022. Available online: https://github.com/open-meteo/open-meteo (accessed on 20 October 2025).
  44. Mosquera-López, S.; Uribe, J.M.; Joaqui-Barandica, O. Weather conditions, climate change, and the price of electricity. Energy Econ. 2024, 137, 107789. [Google Scholar] [CrossRef]
  45. Matsumoto, T.; Yamada, Y. Simultaneous hedging strategy for price and volume risks in electricity businesses using energy and weather derivatives. Energy Econ. 2021, 95, 105101. [Google Scholar] [CrossRef]
  46. Liddle, B.; Huntington, H. How prices, income, and weather shape household electricity demand in high-income and middle-income countries. Energy Econ. 2021, 95, 104995. [Google Scholar] [CrossRef]
  47. Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  48. Staudemeyer, R.C.; Morris, E.R. Understanding LSTM—A tutorial into Long Short-Term Memory Recurrent Neural Network. Comput. Sci. 2019, 42. [Google Scholar]
  49. Matejko, M.; Braciník, P.; Radil, L. A Sequence-to-Sequence LSTM Approach for Forecasting Energy Consumption and Production. In Proceedings of the 25th International Scientific Conference on Electric Power Engineering, Prague, Czech Republic, 27–29 May 2025. [Google Scholar]
  50. Guan, Y.; Yan, J.; Shan, Y.; Zhou, Y.; Hang, Y.; Li, R.; Liu, Y.; Liu, B.; Nie, Q.; Bruckner, B.; et al. Burden of the global energy price crisis on households. Nat. Energy 2023, 8, 304–316. [Google Scholar] [CrossRef]
  51. Zhang, J.; Grimes, M. Europe and Russia’s Energy Problems in the Context of the Russian-Ukrainian War. Int. J. Econ. Financ. Manag. Sci. 2023, 11, 145–150. [Google Scholar]
  52. Sensfuß, F.; Ragwitz, M.; Genoese, M. The merit-order effect: A detailed analysis of the price effect of renewable electricity generation on spot market prices in Germany. Energy Policy 2008, 36, 3086–3094. [Google Scholar] [CrossRef]
  53. Clò, S.; Cataldi, A.; Zoppoli, P. The merit-order effect in the Italian power market: The impact of solar and wind generation on national wholesale electricity prices. Energy Policy 2015, 77, 79–88. [Google Scholar] [CrossRef]
Figure 1. Electricity production in EU.
Figure 1. Electricity production in EU.
Electricity 07 00010 g001
Figure 2. Analysis of DAM using FFT and ACF for years 2023–2025.
Figure 2. Analysis of DAM using FFT and ACF for years 2023–2025.
Electricity 07 00010 g002
Figure 3. Analysis of DAM using FFT and ACF for years 2020–2025.
Figure 3. Analysis of DAM using FFT and ACF for years 2020–2025.
Electricity 07 00010 g003
Figure 4. Correlations of commodities.
Figure 4. Correlations of commodities.
Electricity 07 00010 g004
Figure 5. Average correlation of the commodities for each hour in year.
Figure 5. Average correlation of the commodities for each hour in year.
Electricity 07 00010 g005
Figure 6. Correlation of the weather dependency of price.
Figure 6. Correlation of the weather dependency of price.
Electricity 07 00010 g006
Figure 7. Price of the day-head market through years 2020–2025.
Figure 7. Price of the day-head market through years 2020–2025.
Electricity 07 00010 g007
Figure 8. Price distribution used for forecasting prices.
Figure 8. Price distribution used for forecasting prices.
Electricity 07 00010 g008
Table 1. Summary of the accuracy of predictive models for short-term price prediction.
Table 1. Summary of the accuracy of predictive models for short-term price prediction.
ModelsDataMAPE (%)MAE (€/MWh)RMSE (€/MWh)
SeasonWinterSpringSummerAutumnWinterSpringSummerAutumnWinterSpringSummerAutumn
LSTMData10.910.631.230.910.450.261.720.420.560.333.570.57
LSTMData21.321.892.133.440.030.080.060.050.0480.110.080.09
ModelDataMAPE (%)MAE (€/MWh)RMSE (€/MWh)
1 R S D 3 4 Data37.513.594.71
2 R S D 3 4 Data37.513.594.71
3 R S D 3 4 Data37.513.584.71
4 R S D 3 4 Data37.633.644.77
1 S S D 3 4 Data37.673.654.79
2 S S D 3 4 Data37.683.644.79
3 S S D 3 4 Data37.693.657.80
4 S S D 3 4 Data37.803.704.86
ModelDataMAPE (%)MAE (€/MWh)RMSE (€/MWh)
Steps a head136136136
LSTM CNNData420.0119.1021.919.0512.0513.640.0280.0330.038
InformerData423.0122.1730.6712.8914.2513.080.0290.0320.031
ST-NormData411.9019.5014.767.8311.5310.860.020.0310.030
MTGNNData411.7413.7512.988.918.539.520.0280.0290.033
ASTGCNData416.6715.4015.157.628.499.280.0280.0300.033
MGAALData411.7313.6114.087.709.049.740.0240.0260.029
LSTM CNNData556.6377.0069.8754.5370.9289.590.0360.0400.045
Seq2SeqData514.7328.4047.2652.3463.5470.510.0330.0330.04
InformerData547.0046.6662.2251.0654.7356.530.030.0360.04
ST-NormData513.7316.8520.4154.6250.2263.610.0360.0360.047
MTGNNData511.0714.2715.9540.8342.7748.480.0240.0260.037
ASTGCNData523.3321.7220.9152.5055.4658.060.0360.0460.046
MGAALData520.1322.8723.6340.0746.0840.160.02970.02830.028
Table 2. Prediction accuracy based on performance metrics with optimalizations.
Table 2. Prediction accuracy based on performance metrics with optimalizations.
Model-RMSE (€/MWh)MSE (€/MWh)MAE (€/MWh)
CNN-BiLSTM-ARData13.8014.452.33
RS-CNN-BILSTM-ARData13.6213.092.16
GA-CNN-BiLSTM-ARData13.7113.762.21
PSO-CNN-BiLSTM-ARData13.4612.002.00
Model-RMSE (€/MWh)MSE (€/MWh)MAE (€/MWh)
CNN-BiLSTM-ARData24.8723.763.33
RS-CNN-BILSTM-ARData24.6421.623.07
GA-CNN-BiLSTM-ARData24.4619.922.87
PSO-CNN-BiLSTM-ARData24.0516.472.55
Model-RMSE (€/MWh)R2 (-)MAE (€/MWh)
LSTMData32.880.842.29
RNNData32.960.832.30
BPData33.040.822.51
ATT-LSTMData32.790.852.22
ATT-RNNData32.930.842.37
ATT-BPData32.950.832.39
GWO-ATT-LSTMData32.740.862.00
GWO-ATT-RNNData32.880.842.21
GWO-ATT-BPData32.920.842.12
VMD-LSTMData32.130.9131.87
VMD-RNNData32.980.902.05
VMD-BPData32.350.892.04
VMD-ATT-LSTMData31.960.931.66
VMD-ATT-RNNData32.170.911.85
VMD-ATT-BPData32.180.911.87
VMD-GWO-ATT-LSTMData31.780.941.45
VMD-GWO-ATT-RNNData31.870.931.54
VMD-GWO-ATT-BPData31.970.931.59
Table 3. Comparison of dominant periodicities for different data lengths.
Table 3. Comparison of dominant periodicities for different data lengths.
2023–2025 2020–2025
RankPeriod (d)Extent (EUR/MWh)TypePeriod (d)Extent (EUR/MWh)Type
11.0049.00Daily7.0131.86Weekly
20.5039.90Half-daily1.0029.92Daily
37.0117.74Weekly0.5025.15Half-daily
482.828.79Seasonal143.3615.44Long-seasonal
53.508.65Sub-weekly91.2313.56Seasonal
675.927.62Seasonal133.812.77Long-seasonal
753.597.43Bi-monthly118.0611.91Long-seasonal
833.747.23Monthly154.3911.89Half-Yearly
9130.157.10Long-seasonal167.2511.78Half-Yearly
1091.107.03Seasonal52.8211.53Bi-monthly
Table 4. Model results for forecasting price for years 2020–2025 and 2023–2025.
Table 4. Model results for forecasting price for years 2020–2025 and 2023–2025.
PeriodSequence Length (h)Forecast Length (h)Epoch (-)t (s)R 2(-)MAE (€/MW)
2020–2025168168284447.000.4433.29
16884565819.780.7123.67
16824635020.020.8018.38
16812251839.470.8018.49
1681362566.160.8514.71
8484513116.500.7223.11
8424431972.270.8018.30
8412461725.480.8316.48
841542024.490.8514.56
242423346.110.7719.92
241236419.220.8117.17
24127269.220.8315.62
PeriodSequence Length (h)Forecast Length (h)Epoch (-)t (s)R2 (-)MAE (€/MW)
2023–2025168168574100.820.5328.48
16884442073.680.5927.52
16824401576.230.7520.34
16812391487.360.8117.55
1681361191.240.8713.63
848411373.06−1.7187.32
842431556.390.7122.76
841233572.350.8017.70
84122361.500.8514.29
242427206.790.7420.97
241230188.070.8018.49
24121102.060.8416.21
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

Matejko, M.; Braciník, P. Comprehensive Analysis of Weather and Commodity Impacts on Day-Ahead Electricity Market Using Public API Data with Development of an Accessible Forecasting Mode. Electricity 2026, 7, 10. https://doi.org/10.3390/electricity7010010

AMA Style

Matejko M, Braciník P. Comprehensive Analysis of Weather and Commodity Impacts on Day-Ahead Electricity Market Using Public API Data with Development of an Accessible Forecasting Mode. Electricity. 2026; 7(1):10. https://doi.org/10.3390/electricity7010010

Chicago/Turabian Style

Matejko, Martin, and Peter Braciník. 2026. "Comprehensive Analysis of Weather and Commodity Impacts on Day-Ahead Electricity Market Using Public API Data with Development of an Accessible Forecasting Mode" Electricity 7, no. 1: 10. https://doi.org/10.3390/electricity7010010

APA Style

Matejko, M., & Braciník, P. (2026). Comprehensive Analysis of Weather and Commodity Impacts on Day-Ahead Electricity Market Using Public API Data with Development of an Accessible Forecasting Mode. Electricity, 7(1), 10. https://doi.org/10.3390/electricity7010010

Article Metrics

Back to TopTop