Abstract
Rising renewable penetration increases wholesale price volatility and challenges traditional forecasting approaches. This paper benchmarks three methods—adaptive linear regression, Random Forest (RF), and the Temporal Fusion Transformer (TFT)—on hourly day-ahead prices in four European markets with contrasting generation mixes: Slovakia (nuclear-dominated), Spain (solar-rich), Denmark (wind-dominated), and Germany (mixed). Using Energy-Charts data for 2015–2025, all the models are evaluated under one day-ahead protocol on a common 12-month hold-out against naive 24-h persistence. With price-history features, the RF significantly outperforms persistence in three of four markets. A single cross-market five-seed TFT ensemble attains the lowest MAE everywhere, cutting the persistence error by 55.6% in Germany (to 12.88 €/MWh) and 21.7% in Slovakia. The improvement is generally larger in markets with higher variable-renewable penetration, though not strictly monotonic. Replacing the realized fundamentals with TSO day-ahead forecasts changes the MAE by at most 0.22 €/MWh: the day-ahead price is itself formed from those forecasts. Multivariate Diebold–Mariano tests confirm both advantages everywhere on absolute errors. Quantile averaging yields pinball losses of 3.87–6.53 €/MWh, but the 80% intervals cover only 71–78%. Variable importance ties the leading driver to each mix: wind in Denmark and Germany, load and solar in Spain, and load in Slovakia.
1. Introduction
The European electricity sector is undergoing a structural transformation driven by decarbonization policies such as the European Green Deal and the Fit for 55 package [1,2]. Renewable energy sources (RES) already account for more than half of public electricity generation in the EU [3]. Because wind and solar plants operate at near-zero marginal cost, they enter the merit order first and systematically depress wholesale prices—the so-called merit-order effect [4,5]. At the same time, their dependence on weather conditions introduces a strongly variable and only partially predictable supply component. The combined result is a market environment characterized by elevated price volatility, pronounced intraday price swings, and an increasing frequency of negative prices [6]. The fragility of this environment was starkly exposed during the 2021–2023 energy crisis, when average European wholesale prices more than tripled—driven predominantly by fuel costs—and volatility spillovers across interconnected markets intensified sharply [7,8]. Accurate short-term electricity price forecasting (EPF) has therefore become a critical input for producers scheduling their units, traders managing day-ahead positions, and system operators procuring balancing services.
Electricity price forecasting has consequently developed into a mature research field, which has been comprehensively surveyed by Weron [9] and, more recently, by Lago et al. [10] and O’Connor et al. [11]. Three generations of methods can be distinguished. Statistical approaches, including autoregressive specifications and regularized linear models such as the Lasso Estimated AutoRegressive (LEAR) model, remain competitive benchmarks owing to their transparency and low computational cost [10]. Machine learning methods, in particular tree-based ensembles such as Random Forest [12] and gradient boosting, capture nonlinear interactions between prices, fundamentals, and calendar effects [11]. Most recently, deep-learning architectures have come to dominate the literature: attention-based recurrent networks have shown strong performance under high renewable penetration [13], and growing emphasis is placed on probabilistic forecasts that quantify the uncertainty of future prices [14]. Among these architectures, the Temporal Fusion Transformer (TFT) [15] is particularly attractive for day-ahead applications. It combines multi-horizon quantile forecasts with native support for known future inputs—such as day-ahead load and renewable generation forecasts—and built-in interpretability through variable selection and attention weights. Applications of the TFT to electricity price forecasting have reported competitive point and probabilistic accuracy in day-ahead [16] and balancing markets [17,18], although its superiority over simpler recurrent or convolutional architectures is not universal [19,20,21], and evidence across multiple interconnected markets with fundamentally different generation mixes remains limited.
This study is motivated by three gaps in this literature. First, most EPF studies evaluate models on a single market [16,18]. Comparative studies relate the generation mix to price volatility and to the accuracy of market-specific models across European bidding zones [22,23,24,25], but they do not measure how much the fundamentals improve relative to a naive benchmark in each mix, nor explain why that margin differs between markets with similar renewable penetration. Second, information from neighboring markets is known to improve price forecasts, whether it enters as input features [26], through one network predicting two markets at once [27], or through transfer learning from several source markets to a target [28,29]. What has not been tested is a single attention-based model trained jointly on markets with deliberately contrasting generation mixes and compared, under an identical protocol and with equal numbers of seeds, against a specialist trained for each of them. Third, a substantial part of the published evidence predates the 2021–2023 energy crisis and is based on comparatively calm price regimes. Following the best practices of Lago et al. [10], rigorous model comparisons on recent, structurally volatile data require a common hold-out period, a naive persistence benchmark, and formal significance testing—conditions that are still not consistently met in applied studies.
The main contributions of this paper are fourfold, mirroring the gaps above. All of them rest on one evaluation protocol, applied identically to every model and market: a single common post-crisis hold-out period (October 2024–September 2025), a naive persistence benchmark, multivariate Diebold–Mariano significance testing, and probabilistic evaluation of the deep-learning forecasts.
- A systematic comparison of three forecasting approaches of increasing complexity—adaptive regression, Random Forest, and the Temporal Fusion Transformer—is provided on four European markets with fundamentally different generation mixes: baseload-dominated (nuclear) Slovakia, solar-rich Spain, wind-dominated Denmark, and Germany’s diversified portfolio, directly linking the dominant forecast drivers to the physical structure of each national mix.
- A single cross-market TFT with country identity as a static covariate and day-ahead fundamentals as known future inputs is trained, demonstrating that one global model not only serves four heterogeneous markets but is more accurate than market-specific TFT specialists trained under an identical protocol in every one of them, by 0.79 to 2.18 €/MWh, with both sides evaluated as ensembles of five independently trained networks.
- The link between the generation mix and the achievable accuracy is quantified rather than asserted: the sensitivity of price to residual load rises from 3.45 €/MWh per GW in Germany to 86.83 in Slovakia as system size falls, the estimated merit-order coefficient of variable renewables is negative in every market where they are a physical quantity, and the correlation of price with domestic residual load ranges from r = 0.84 in Germany to r = 0.41 in strongly interconnected Denmark. Renewable penetration and price sensitivity are therefore distinct properties, which is why the forecast improvement is not monotonic in the renewable share. The same evaluation is repeated with the operational day-ahead forecasts of the transmission system operators in place of the realized fundamentals, and the accuracies are shown to survive it.
- A diagnosis of what the architecture does and does not fix: the systematic level bias and the compressed distribution tails of an earlier configuration are traced to an absolute positional index that must extrapolate beyond its training range, and removing it improves point accuracy, interval calibration and seed stability at once; under-covered prediction intervals and negative-price hours remain open.
The novelty of the study lies in three aspects. Methodologically, training a network across several markets is itself established [27,28], but we are not aware of an earlier comparison in which a single Temporal Fusion Transformer trained on markets with deliberately contrasting generation mixes is evaluated against per-market specialists under an identical protocol and with equal numbers of seeds, nor of one that traces a transformer’s failure on electricity prices to a single extrapolating input rather than to the architecture. Empirically, the study quantifies how far the value of fundamentals for price forecasting is set by the physical structure of each national mix, and shows that renewable penetration and price sensitivity are distinct properties that need not move together. Operationally, it replaces the perfect-foresight assumption common in fundamental EPF studies with the day-ahead forecasts actually published by transmission system operators, and demonstrates both that this results in almost no loss of accuracy and why: the day-ahead price is itself formed on the basis of those forecasts.
The remainder of this paper is organized as follows: Section 2 describes the data and methods; Section 3 presents the results; Section 4 discusses their implications and limitations; and Section 5 concludes. Figure 1 summarizes the entire procedure.
Figure 1.
Procedure of the study, from the raw series to the analyses that interpret the result. The data split and the day-ahead forecasting protocol of the Temporal Fusion Transformer are shown in more detail in Section 2.5.
2. Materials and Methods
2.1. Data and Markets
Hourly day-ahead electricity prices, total system load, and generation from variable renewable sources were obtained from the Energy-Charts platform operated by Fraunhofer ISE [3], which aggregates data reported by transmission system operators (TSOs) and power exchanges, covering the period from January 2015 to December 2025 and yielding approximately 96,000 hourly observations per market (384,738 in total). For each market, the explanatory variables reflect the locally dominant renewable technology: solar generation for Spain, wind generation for Denmark, both wind and solar generation for Germany, and the aggregate RES share of generation for Slovakia, in each case together with the total system load. In the main evaluation, these explanatory series are observed values rather than forecasts. Where a model is provided with these values over the forecast horizon, as with the Temporal Fusion Transformer of Section 2.4, this amounts to perfect foresight of load and renewable generation. Section 3.1 reports a separate evaluation in which the operational day-ahead forecasts published by the transmission system operators replace the realized values, and the two settings differ only slightly; Section 4 explains why. Missing and non-numeric values were rare—below 0.7% of observations for all series except the Slovak system load (1.35%, concentrated almost entirely after the end of the evaluation period; within the hold-out window itself, only a single hourly value was missing)—and were imputed by forward filling within each country’s series; no backward filling was applied, so that no information from the future could leak into the model inputs.
The four markets were selected to represent fundamentally different generation portfolios and market sizes. Germany is a large market with high price volatility and a diversified mix of renewable and fossil sources; Spain combines a high share of solar generation with substantial wind and nuclear capacity; Denmark is characterized by the dominance of wind power, which supplies more than half of its electricity; and Slovakia represents a smaller Central European market whose generation is dominated by nuclear power and therefore exhibits a nearly deterministic supply side. Table 1 summarizes the structure of public net electricity generation in the four markets in 2025. A single reference year is used because the purpose of Table 1 is to characterize the four markets qualitatively, and that characterization is stable over the estimation period: expressed as a share of system load, the variable renewable series actually supplied to the models rank the markets in the same order (Denmark, Germany, Slovakia, Spain) in ten of the eleven years from 2015 to 2025, with the exception being 2025, when Spain overtakes Slovakia. The levels are not stable—the German share rises from 22.8% in 2015 to 43.2% in 2025 and the Spanish share rises from 5.1% to 22.0%—but the models are trained on the hourly series and therefore capture that trend directly rather than through the summary in Table 1. Figure 2 presents the same shares graphically. A comparison of forecasting performance across these contrasting portfolios makes it possible to assess which fundamental factors drive electricity prices in each market and how the achievable forecasting accuracy depends on the generation mix.
Table 1.
Structure of public net electricity generation in the four analyzed markets in 2025 (% of total generation). Other RES comprises biomass, geothermal, waste and other renewable sources. Source: Energy-Charts [3].
Figure 2.
Structure of public net electricity generation in the four markets in 2025, as a share of total generation; the same figures as Table 1. Shares below 6% are not labeled. Other RES comprises biomass, geothermal, waste and other renewable sources. Source: Energy-Charts.
All series were aligned to a common hourly timeline; hours missing from the raw data (e.g., the spring daylight-saving transition) were left absent rather than interpolated, and the duplicate timestamps produced by the autumn transition (11 h in Denmark and Slovakia, 8 in Spain, none in Germany) were removed by keeping the first reported value, so that each market contributes exactly 8759 hourly observations to the hold-out period. Series available at quarter-hourly resolution (Germany for the full period; Spain from 2023 onward) were converted to hourly means, and all series were validated against physical plausibility ranges and cross-market consistency checks. A common 12-month hold-out period, October 2024–September 2025, is reserved for the model evaluation, as described in Section 2.5; observations after September 2025 were available but were not used in this study.
2.2. Adaptive Regression
The first, baseline model is an adaptive multiple linear regression. The hourly electricity price is modeled as a linear function of the fundamental variables available for the given market,
where xi(t) denotes the system load and the market-specific renewable generation variables listed in Section 2.1, βi are the regression coefficients, and ε(t) is the error term. The model’s adaptivity lies in its periodic re-estimation using an expanding window: at the beginning of each month of the evaluation period, the coefficients are re-fitted by ordinary least squares on all observations available up to that point, starting from January 2015, and the resulting equation is used to predict the hourly prices of the following month. Each month is therefore forecast by a model estimated exclusively on past data. The same design—a linear specification re-estimated on a monthly cycle—has been used to study how the length of the training interval interacts with price volatility in European markets [30].
P(t) = α + Σi βi xi(t) + ε(t)
The purpose of this model is twofold. First, it serves as an interpretable linear baseline against which the nonlinear methods can be judged; second, the signs of the estimated coefficients provide a direct check of the merit-order mechanism discussed in Section 1—a positive coefficient on the system load and negative coefficients on renewable generation are expected, since higher demand pushes the market equilibrium toward more expensive marginal units, whereas additional near-zero-marginal-cost renewable supply displaces them. As shown in Section 3, these sign expectations are confirmed in all four markets, even though the overall explanatory power of the linear specification remains limited.
2.3. Random Forest
The second model is a Random Forest regression [12], an ensemble of decision trees in which each tree is grown on a bootstrap sample of the training data and considers a random subset of features at each split; the forecast is the average of the individual tree outputs. This construction captures nonlinear relationships and interactions between the inputs without an explicit functional specification, and the averaging over decorrelated trees makes the model robust to noise and resistant to overfitting. These properties have made tree-based ensembles a standard machine learning benchmark in electricity price forecasting [11].
Rather than predicting the price level directly, the model is trained on the 24-h price difference,
and the final forecast is reconstructed as
ΔP(t) = P(t) − P(t − 24)
P′(t) = P(t − 24) + ΔP′(t)
This hybrid persistence–machine-learning formulation removes the dominant daily seasonality from the learning target, so that the trees concentrate on deviations from the previous day’s price caused by changes in fundamentals; it also guarantees that the model can never perform dramatically worse than the persistence benchmark to which it is anchored. The feature set comprises the market-specific fundamentals defined in Section 2.1 and three calendar variables (hour of day, day of week, and month). In addition, the forest receives the standard set of price-history predictors known at auction time: the day-ahead price lagged by 24, 48, and 168 h, and rolling means of the lagged price over the preceding 24 and 168 h, making the benchmark’s information set comparable to that of the deep model. A separate forest of 100 trees (scikit-learn implementation, default tree depth, fixed random seed) is trained for each market on all observations preceding the hold-out period.
2.4. Temporal Fusion Transformer
The third model is the Temporal Fusion Transformer (TFT) [15], an attention-based deep-learning architecture designed for multi-horizon forecasting with heterogeneous inputs. In contrast to the two previous approaches, a single global model was trained jointly on all four markets: the country identifier enters as a static categorical variable, the target is normalized per market (GroupNormalizer), and the network can therefore share learned price dynamics across the interconnected bidding zones while retaining market-specific behavior. The model uses a 168-h (one-week) encoder window to produce a 24-h-ahead forecast, replicating the day-ahead auction horizon. System load, wind and solar generation, and the RES share are supplied as known future inputs over the forecast horizon, together with calendar variables (hour of day, day of week, and month). No absolute positional index is supplied to the decoder: such a counter takes values outside its entire training range over the hold-out period, and the ablation reported in Section 4 shows that including one degrades accuracy, calibration and seed stability alike. Actual realized values were used in place of the TSO day-ahead forecasts of these fundamentals, an assumption common in fundamental EPF studies; Section 3.1 reports what happens when the trained networks are supplied instead with the operational forecasts published by the transmission system operators, and Section 4 examines why the two settings differ so little. The model was trained with the quantile loss over seven quantiles (0.02–0.98), so that each forecast consists of a median point prediction and the corresponding prediction intervals.
The TFT was selected for four properties that match the structure of the day-ahead problem, not for its novelty. First, it accepts known future inputs natively: the load and renewable generation expected for the delivery day enter the decoder directly, a feature that distinguishes day-ahead price forecasting from pure time-series extrapolation and that recurrent architectures accommodate only indirectly. Second, each input passes through a gated variable-selection network that weights it separately in the encoder and the decoder and at every time step, so one model trained on four markets can suppress the series that carry no information in a given market—the property exploited in the importance analysis of Section 3.4; the selected inputs are then processed by a recurrent encoder–decoder and by a multi-head attention layer that relates each forecast hour to the relevant hours of the preceding week. Third, static covariates enter through dedicated context vectors that condition the whole network, which is how a single model can hold four price levels and four volatility regimes without a separate model per market. Fourth, the network is trained on the quantile loss: for a level τ, it penalizes an under-forecast by τ and an over-forecast by 1 − τ times the absolute error, so that its minimizer is the τ-quantile of the conditional price distribution, and training on seven levels yields a predictive distribution rather than a conditional mean. On electricity prices, this matters twice over: because the penalty grows linearly rather than quadratically with the error, the loss is far less sensitive to the crisis-era spikes that dominate a squared-error objective, and the quantiles themselves are what a user needs for the tail and negative-price decisions of Section 3.3. The Random Forest is retained alongside it as the machine learning benchmark because it is the tree-based ensemble most widely reported in this literature and was found to be the strongest of several machine learning models in a recent comparison of European markets [24], because it requires neither scaling nor an architecture search and is therefore difficult to disadvantage through insufficient tuning, and because anchoring it to the 24-h price difference (Section 2.3) makes it a strictly stronger competitor than the persistence benchmark it extends.
Since the network is trained jointly, it receives the union of the fundamental inputs across markets; series unavailable in a given market enter as constant zeros, and the variable-selection weights of such constant inputs carry no physical interpretation and are therefore masked in the importance analysis of Section 3.4.
The network configuration comprises a hidden size of 24, four attention heads, a hidden continuous size of 12, and a dropout rate of 0.12, resulting in approximately 48.8k trainable parameters. Training used the Adam optimizer with an initial learning rate of 0.008 (reduced on plateau), gradient clipping at 0.1, a batch size of 128, and a maximum of 30 epochs with early stopping (patience 8) on the validation loss; the last three months of the training period, July to September 2024, served as the internal validation set, leaving the hold-out period untouched by both training and model selection. This internal window is used only for early stopping and learning-rate scheduling; it is not the evaluation sample, and it is deliberately short, because every hour withheld from training is an hour of recent post-crisis data from which the network does not learn. Model comparison rests instead on the twelve-month hold-out of Section 2.5, which spans all four seasons. A longer internal window was not adopted because the early-stopping decision follows the level of the validation loss rather than its seasonal composition, whereas lengthening it would remove precisely the most informative recent observations from the training set. Because training on a graphics processing unit (GPU) is not fully deterministic, the TFT was trained five times with independent random seeds; results are reported as the mean ± standard deviation across these runs, and the final deployed model is the equally weighted ensemble of the five networks. Training was performed on a single NVIDIA RTX 5070 Ti GPU (NVIDIA, Santa Clara, CA, USA).
All models were implemented in Python 3.10. The deep model uses pytorch-forecasting 1.7.0 on PyTorch 2.11.0 with CUDA 13.0 and Lightning 2.6.1; the Random Forest and the adaptive regression use scikit-learn 1.7.1. Training the five networks of the global model took 84.6 min each on average (range 67.7–103.9), totaling 7.05 h. The market-specific specialists of Section 4 took 17.9 min each (range 14.3–26.6), totaling 4.8 h for the sixteen networks whose training was timed; the seed-42 specialists were trained in an earlier run (Table S8). A Random Forest is fitted in five to seven seconds per market on the same machine. Inference for a full 24-h day-ahead window is immediate for every model, so the computational cost of the deep approach falls entirely on training and does not constrain operational use.
2.5. Evaluation Protocol
All models are compared on an identical hold-out period, October 2024–September 2025 (8759 h per market), which none of the models saw during training or model selection. The forecast target throughout is the hourly day-ahead price at a horizon of 24 h, the quantity settled in the day-ahead auction; the twelve months are the evaluation sample, not the forecast horizon. Because the auction closes around noon of the preceding day, the load and renewable generation of the delivery day can enter the day-ahead price only as forecasts; the part of their stochastic fluctuation that is still unknown at gate closure is traded afterwards in the intraday market and settled in balancing. The evaluation with the operational day-ahead forecasts of the transmission system operators (Section 3.1) therefore exposes the models to forecast errors of the kind that bidders face at gate closure, and the uncertainty that remains in the price is expressed by the quantile forecasts of the TFT. To replicate the operational day-ahead setting, the TFT forecasts are generated from non-overlapping windows issued at midnight for the following 24 h, so that every hour of the hold-out period is predicted exactly once; the adaptive regression is re-estimated monthly on an expanding window, and the Random Forest is trained once on all data preceding the hold-out period. Point accuracy is measured per market by the mean absolute error (MAE), root mean squared error (RMSE), and the coefficient of determination (R2) [31], complemented by the relative MAE (rMAE) with respect to a naive 24-h persistence forecast [10], P′(t) = P(t − 24), which serves as the common benchmark. The probabilistic quality of the TFT forecasts is assessed by the average pinball loss [32,33] over the seven predicted quantiles and by the empirical coverage of the 10–90% prediction interval.
Probabilistic forecasts of the deployed model are obtained by averaging the seven predicted quantiles across the five seeds (quantile averaging, also known as Vincentization). The statistical significance of pairwise accuracy differences is verified with the multivariate Diebold–Mariano test [34] computed on daily vectors of the 24 hourly errors (365 daily loss differentials per market), following the protocol recommended by Lago et al. [10] for both absolute and squared losses; the hourly variant with the Harvey small-sample correction [35] yields the same conclusions and is reported in the Supplementary Materials.
Point accuracy of the TFT is reported per seed (mean ± standard deviation) and for the equally weighted ensemble; the Diebold–Mariano tests are applied to the ensemble forecasts. Because values are rounded for presentation, a difference recomputed from rounded table entries may deviate by one unit in the last digit from the difference reported in the text or in a table. The sensitivity of the results to the inclusion of the crisis year 2022 in the training data is examined separately. The overall experimental workflow is summarized in Figure 3. It illustrates the partitioning of the dataset into training, validation, and hold-out periods, together with the rolling day-ahead forecasting protocol used for the Temporal Fusion Transformer.
Figure 3.
Experimental workflow: (a) partitioning of the 2015–2025 sample into training, internal validation, and hold-out periods (the dashed box marks the year 2022 excluded in the sensitivity analysis); (b) the day-ahead forecasting setup of the TFT with a 168-h encoder and non-overlapping 24-h forecast windows issued at midnight. The partitioning in panel (a) refers to the TFT; the Random Forest and the adaptive regression are estimated on all data preceding the hold-out period.
3. Results
3.1. Point Forecast Accuracy
Table 2 summarizes the out-of-sample accuracy of all models on the common 12-month hold-out period. The TFT was trained five times with independent random seeds; Table 2 reports both the mean ± standard deviation across seeds and the accuracy of the equally weighted ensemble of the five networks, which constitutes the deployed model, following established best practices for deep learning in electricity price forecasting [10]. The adaptive regression is outperformed by the naive 24-h persistence benchmark in all four markets, confirming that linear specifications cannot capture the dynamics of current, high-volatility price regimes; its estimated coefficients nevertheless carry the expected signs everywhere–positive for system load and negative for renewable generation–consistent with the merit-order mechanism discussed in Section 1. The lag-augmented Random Forest, by contrast, is a markedly stronger benchmark than fundamentals-only specifications: it is significantly more accurate than persistence in Germany (rMAE = 0.69), Denmark (0.80), and Slovakia (0.85) according to the multivariate Diebold–Mariano test (p < 0.0001 on absolute errors), and statistically indistinguishable from it in Spain (rMAE = 0.98, p = 0.37).
Table 2.
Out-of-sample accuracy on the common hold-out period (October 2024–September 2025; MAE, ME and RMSE in €/MWh).
The TFT ensemble nevertheless attains the lowest MAE in all four markets (Table 2). Its advantage over persistence is statistically significant everywhere (multivariate Diebold–Mariano test on daily loss vectors, p ≤ 0.002 under both loss functions; Table 3), as is its advantage over the Random Forest on absolute errors in all four markets (p ≤ 0.0006). On squared errors, the comparison against the Random Forest remains significant in Germany, Denmark and Spain but not in Slovakia (p = 0.29), where the two models differ mainly in typical hours rather than in extremes, a point developed in Section 3.3. The magnitude of the improvement again differs markedly across markets: the ensemble reduces the MAE by 55.6% in Germany (12.88 €/MWh) and 40.5% in Denmark (19.41 €/MWh)—the two markets with the largest wind penetration—compared with 22.4% in Spain and 21.7% in nuclear-dominated Slovakia. The ensemble improves on both the average and the best individual seed in every market, and the seed-to-seed standard deviation of 0.17–0.86 €/MWh shows this configuration to be markedly more stable across seeds than the positional-index variant discussed in Section 4, where it reached 1.1–2.7 €/MWh. Figure 4 illustrates the forecasts over a representative two-week window of the hold-out period in Spain.
Because the fundamentals underlying Table 2 are realized values, a separate evaluation asks what the same models achieve with the day-ahead forecasts that transmission system operators actually publish before the auction closes. Day-ahead forecasts of load, wind and solar generation were retrieved from the ENTSO-E Transparency Platform for the hold-out period and substituted for the realized series over the forecast horizon of the five trained networks; neither the TFT nor the Random Forest was retrained, and the encoder of the TFT retains the realized history that would be known at auction time. Two substitutions are reported, because the two data sources define some series slightly differently: direct replaces the model input by the published forecast outright, while injected adds the error of the published forecast to the Energy-Charts series on which the models were trained, which is insensitive to those definitional differences (the two sources agree at a correlation of at least 0.9975 on every series; Table S9). Hours for which any required forecast was missing were excluded from all variants, leaving 34,701 of 35,036 hold-out hours (99.0%). The Slovak renewable share is not published as a forecast and was reconstructed from the forecast wind, solar and load series, so the Slovak result is the least direct of the four. Table 4 reports the outcome, and accuracy barely moves: the MAE of the TFT ensemble changes by at most 0.22 €/MWh in any market and variant, and the change is statistically significant only in Slovakia (+0.01 €/MWh, p = 0.001 for direct; +0.09, p = 0.048 for injected). The probabilistic forecasts are equally stable: the pinball loss changes by −0.03 to +0.15 €/MWh and the coverage of the nominal 80% interval by less than one percentage point. The Random Forest is the more sensitive of the two models: it loses 0.64–0.75 €/MWh in Denmark (p ≤ 0.016) and 0.14–0.23 in Slovakia (p ≤ 0.005), while Germany and Spain are unaffected. The margin of the TFT over the Random Forest therefore widens in Denmark (from 6.73 to 7.57–7.59 €/MWh) and Slovakia (1.81 to 1.94–1.95) and narrows by at most 0.29 in Germany (7.04 to 6.75–7.03) and 0.09 in Spain (3.98 to 3.89), and the significance pattern of Table 3 is unchanged, including the insignificant squared-error comparison in Slovakia (p = 0.26). The accuracies reported here are thus not a perfect-foresight upper bound in any practically relevant sense; Section 4 examines why.
ME is the mean error (actual minus forecast); rMAE is the MAE relative to the naive persistence benchmark, and Δ MAE is the change in MAE against that benchmark, with negative values indicating a more accurate model. The TFT rows report the mean ± standard deviation over five independently trained networks and the equally weighted ensemble of their forecasts; because the ensemble is a linear average, its ME coincides with the seed mean by construction. The Random Forest includes the price-history features of Section 2.3. Apart from the adaptive regression, which is biased strongly upward, all models are close to unbiased: the ensemble’s mean error ranges from −3.69 to +2.41 €/MWh, between 1% and 23% of its MAE, and is discussed in Section 4.
Table 3.
Diebold–Mariano test statistics computed on daily vectors of the 24 hourly errors (365 daily loss differentials per market; multivariate test following Lago et al. [10]) comparing the TFT ensemble with the naive persistence benchmark and with Random Forest under absolute- and squared-error loss. Positive statistics indicate greater accuracy of the ensemble.
Table 4.
Accuracy of the TFT ensemble and of the Random Forest when the realized fundamentals are replaced by the operational day-ahead forecasts published by the transmission system operators (MAE in €/MWh). Realized repeats the setting of Table 2; direct substitutes the published ENTSO-E forecast for the model input; injected adds the forecast error of the ENTSO-E series to the Energy-Charts series on which the models were trained. Neither model was retrained. All three variants are evaluated on the same 34,701 h for which every required forecast was available (99.0% of the hold-out period), which is why the realized column differs slightly from Table 2 in Denmark, Spain and Slovakia.
Figure 4.
Actual hourly day-ahead prices in Spain versus Random Forest and TFT forecasts over a two-week window of the hold-out period (3–17 March 2025). The shaded band shows the 80% prediction interval (quantiles 0.1–0.9) of the five-seed quantile ensemble, the same forecast whose calibration is reported in Table 5.
Table 5.
Probabilistic quality of the TFT forecasts (quantile ensemble across the five seeds): average pinball loss over the seven predicted quantiles and empirical coverage of the nominal 80% prediction interval.
To illustrate the qualitative forecasting performance across different market structures, Figure 5 compares the actual and predicted day-ahead electricity prices for all four evaluated markets over the same representative two-week period of the hold-out dataset.
Figure 5.
Day-ahead electricity price forecasts across the four evaluated European markets: actual prices versus the TFT ensemble over the same two-week window as Figure 4 (3–17 March 2025).
3.2. Probabilistic Evaluation
Probabilistic forecasts of the deployed model are obtained by averaging the seven predicted quantiles across the five seeds (Table 5). The average pinball loss is 3.87 €/MWh in Germany, 4.35 in Spain, 5.60 in Denmark, and 6.53 in Slovakia. The empirical coverage of the nominal 80% prediction interval lies between 71.2% and 78.0%: the intervals are still somewhat too narrow, but the pronounced asymmetry of the positional-index variant has disappeared. Exceedances are now close to balanced—10.1–14.3% of realized prices fall above the 90th predicted percentile and 10.1–18.6% below the 10th, against a nominal 10% on each side—and Germany is almost exactly calibrated (12.0% and 10.1%). This under-coverage suggests that a post-hoc calibration step, such as conformalized quantile regression [36], would be a valuable extension.
3.3. Performance in the Distribution Tails
Table 6 reports the MAE restricted to the top 5% of hours by realized price (438–439 h per market) and to negative-price hours. In the upper tail, the ensemble is the most accurate model in Germany (60.71 €/MWh), Denmark (62.07) and Spain (20.36), overtaking both benchmarks in each; only in Slovakia does the lag-augmented Random Forest remain ahead (78.71 against 80.99). Negative-price hours are the one regime in which the deep model still does not lead: the ensemble is best in Germany (14.30 €/MWh), whereas persistence is more accurate in Denmark and Spain and the Random Forest in Slovakia. Users deploying the model for negative-price applications should therefore rely on the predicted quantiles rather than on the point forecast alone, but these still provide coverage below their nominal level (Section 3.2).
Table 6.
MAE (€/MWh) in the distribution tails of the hold-out period: top 5% of hours by realized price and negative-price hours (Ens. = TFT ensemble; top = the top 5% of hours by realized price, neg. = negative-price hours).
The error magnitude in those hours does not indicate how often a negative price is anticipated at all, so the occurrence of negative prices was also evaluated as a binary classification (Table 7). Judged on the median forecast, the ensemble identifies them best in Germany (F1 = 0.753, against 0.600 for the Random Forest and 0.524 for persistence) and worst in Spain (0.317, against 0.652 for persistence), where its point forecast is too conservative to cross zero: it flags 123 h when 540 occur. Using the 0.25 quantile as the trigger instead of the median changes the picture. The ensemble then attains the highest F1 of the four methods in Germany (0.768), Denmark (0.491) and Spain (0.667), and in Slovakia it is practically indistinguishable from the Random Forest (0.658 against 0.670; Matthews correlation coefficients 0.646 and 0.662). This quantifies the recommendation made above—for negative-price applications, the predicted quantiles, not the point forecast, are the object to use—and it parallels a recent study of twelve European bidding zones in which negative-price hours, a rare class, were predicted with moderate skill using class weighting and a decision threshold tuned for that imbalance [37]; the renewable share at which negative prices begin to appear has also been found to differ from country to country [25].
Table 7.
Detection of negative-price hours over the hold-out period, measured by the F1 score of the corresponding binary classification. The point forecasts of persistence, of the Random Forest and of the TFT ensemble flag an hour when the predicted price is negative; the last row uses the 0.25 quantile of the TFT ensemble as the trigger instead of the median. Precision, recall, accuracy and the Matthews correlation coefficient are reported in Table S10.
3.4. Variable Importance
Figure 6 compares two attribution methods: the Gini importance of the market-specific Random Forest models (with the five price-history features aggregated into a single category) and the decoder variable-selection weights of the global TFT (the relative positional feature excluded, remaining weights renormalized, inputs unavailable in a given market masked; averaged over the five seeds on the last three months of the hold-out period). In the Random Forest, the price-history block dominates by construction; among the fundamentals, each generation portfolio is reflected sharply: wind generation is the leading fundamental in Denmark (16.9%) and Germany (14.7%) and solar generation in Spain (9.2%). Meanwhile, in Slovakia, system load (7.5%) ranks ahead of the aggregate RES share (5.4%), consistent with its largely deterministic supply side. The TFT weights point the same way and, in the wind-rich markets, more sharply: wind generation is the single strongest decoder input in Denmark (25.4%) and Germany (18.8%, marginally ahead of load at 18.5%), whereas in Spain load (18.9%) and solar (17.1%) lead together and in Slovakia load (15.2%) ranks ahead of the aggregate renewable feed-in (11.3%). The calendar inputs absorb the seasonal structure of the decoder and carry weights of 8.6–17.0%, above the renewable term only in Slovakia; this is expected for a single global network that shares its variable selection across markets.
Figure 6.
Variable importance by market: (a) Gini importance of the Random Forest models; (b) decoder variable selection weights of the TFT (the relative positional feature excluded, remaining weights renormalized; inputs unavailable in a given market masked; averaged over the five seeds). Random Forest importances aggregate the five price-history features into a single category. In the Random Forest, the price-history block dominates; among the fundamentals, both methods place wind first in Denmark and Germany, rank solar highly in Spain, and put system load ahead of the aggregate renewable term in Slovakia.
3.5. Sensitivity to the 2022 Crisis Year
To assess the influence of the 2021–2023 energy crisis, the full pipeline—including all five TFT seeds and the quantile ensemble—was re-estimated with the year 2022 excluded from the training data, keeping the hold-out period and all hyperparameters unchanged (Table 8). Every conclusion remains intact and the effect on point accuracy is small and not systematic: the ensemble MAE changes by −0.56 €/MWh in Slovakia, +0.17 in Germany, +0.59 in Denmark and by less than 0.01 in Spain, while the Random Forest improves by 0.50–1.13 €/MWh in Germany, Denmark and Slovakia and is virtually unchanged in Spain. The Diebold–Mariano pattern is qualitatively unchanged, and seed variability stays low in both configurations (standard deviation 0.30–0.63 €/MWh without the crisis year against 0.17–0.86 with it; Table S11). The adaptive regression, in contrast, deteriorates dramatically (in Slovakia from 46.6 to 61.9 €/MWh), because the linear specification then never observes the elevated price levels that recur in the test period. Two further observations are noteworthy. First, the residual mean error stays small either way (−0.2 to +2.4 €/MWh outside Spain with the crisis year, +1.5 to +3.2 without it); therefore, what remains of the bias is not an artifact of crisis-year heterogeneity. Second, interval coverage does deteriorate when 2022 is withheld, by 2.3 to 7.2 percentage points (64.2–75.6% against 71.2–78.0%): the crisis year supplies the extreme observations from which the quantile spread is learned, even though it contributes little to point accuracy. Overall, the point accuracy of the nonlinear models does not depend on having seen the extreme regime of 2022, whereas the calibration of their prediction intervals partly does.
Table 8.
Sensitivity of the results to the exclusion of the crisis year 2022 from the training data (MAE in €/MWh; TFT: five-seed ensemble; last row: empirical coverage of the nominal 80% interval of the quantile ensemble). Each cell reports the value obtained with the full training set/with the year 2022 excluded.
4. Discussion
The strong performance of the TFT in Germany and Denmark can be attributed to three design choices. First, the model is trained jointly on all four markets, which gives it roughly 340,000 hourly training observations, while the country identifier and per-market target normalization preserve market-specific price levels and volatility. Table 9 shows that this pooling improves accuracy in every market, although the design does not isolate the mechanism. Second, unlike the persistence-anchored Random Forest, the TFT receives the full 24-h trajectories of load, wind, and solar generation as known future inputs, which enables it to anticipate fundamentals-driven deviations from yesterday’s price—precisely the deviations that dominate in markets with a high share of variable renewables. Third, the quantile loss is less sensitive to extreme price spikes than a squared-error objective, stabilizing training on crisis-era data. At the same time, the Slovak results mark the lower end of the observed improvements: where the supply side is nearly deterministic, fundamentals leave less residual variability to explain, and the achievable improvement—although still substantial and statistically significant—is the smallest among the four markets.
Table 9.
Symmetric comparison of the global cross-market TFT with market-specific specialists, both deployed as ensembles of five independently trained networks (MAE in €/MWh on the common hold-out period; seed-to-seed standard deviation in parentheses). Specialists and Global are the two ensembles; Advantage is the MAE of the specialists minus that of the global model; and DM is the Diebold–Mariano statistic computed on daily vectors of the 24 hourly absolute errors (365 daily loss differentials per market); positive values indicate greater accuracy of the global model.
Renewable penetration alone does not order these improvements, however. Germany gains more than Denmark (55.6% against 40.5%) even though Danish wind and solar supply a larger share of the mix, because penetration and price sensitivity are different quantities. Regressing the hold-out price on residual load—system load minus the variable renewable generation the models observe—gives a slope of 3.45 €/MWh per GW in Germany and 5.02 in Spain, against 15.15 in Denmark and 86.83 in nuclear-dominated Slovakia. The same increment of residual load traverses a far larger part of a small system’s supply curve than of a large one, which is one reason why system size has been treated as a determinant of price behavior in cross-market comparisons [23]. What differs more is how much of the price that relationship accounts for. Domestic residual load tracks the German price closely (r = 0.84) and the Spanish price well (r = 0.72), but the Danish price much less closely (r = 0.41). The two Danish bidding zones are small and tightly coupled to Germany, Norway and Sweden, so their price is frequently set by conditions outside the variables the model observes. Part of that gap reflects Danish solar generation, which the model does not observe: netting it out as well, as allowed by the ENTSO-E series in Section 3.1, raises the correlation to 0.61, still the lowest of the four markets. Nor does this correlation determine the ranking of all four markets by improvement: the Spanish price follows residual load well, yet Spain gains less than Denmark, partly because persistence is already a strong benchmark there (R2 = 0.64 against 0.23 in Denmark; Table 2). Slovakia, where the gain is smallest, differs again: its price follows residual load moderately (r = 0.58), but its renewable share is only weakly correlated with price (r = −0.26), because nuclear units supplying roughly two thirds of generation run at nearly constant output and rarely set the price, which is largely determined in the coupled regional market. The estimated merit-order coefficient is nevertheless negative wherever variable renewables are a physical quantity, at −2.84 €/MWh per GW in Germany, −3.62 in Spain and −14.15 in Denmark; this is the mechanism that the fundamentals-driven forecasts exploit. The relation is also visible without a regression. When the hold-out hours are sorted by their renewable share, the mean price falls steadily from the lowest to the highest quintile: from 144.27 to 17.36 €/MWh in Germany, from 108.37 to 45.51 in Denmark, from 93.49 to 20.58 in Spain, and, less steeply, from 123.39 to 74.81 in Slovakia (Table S12). These are associations measured over one hold-out year in four markets that also differ in size, interconnection, market design and volatility; they are not identified causal effects, and a four-market design cannot separate those factors from one another.
The factors that set the four prices apart act on two time scales. Over hours and days, each price follows the position of residual load on the market’s supply curve, and the markets differ in three respects. The first is the slope of that curve, which rises from 3.45 €/MWh per GW in Germany to 86.83 in Slovakia as system size falls. The second is the technology that shifts the curve from hour to hour: wind in Denmark and Germany and solar in Spain, against a nuclear baseload in Slovakia that runs at nearly constant output. The third is how closely interconnection ties the price to neighboring zones, as in Denmark and Slovakia. The models capture the first two through their load and renewable inputs and the third only through the price history, and the differences in forecast improvement discussed above relate to all three. Over weeks and months, the price level is set mainly by the cost of the marginal thermal unit, which follows natural gas and EU ETS carbon prices; fuel costs drove the 2021–2023 crisis (Section 1). The level also moves with the seasonal cycles of demand, wind and solar output, and hydro inflows, and with the availability of large generating units and cross-border capacity. The models observe neither fuel and carbon prices nor availability and follow these slower shifts in level only through the recent price history; forecasting the medium-term level itself would require them as inputs.
That the accuracy reported in Table 4 barely changes is initially surprising, and three tests distinguish the two possible explanations. The first asks how the day-ahead price is formed. Regressing the hold-out price jointly on realized residual load and on the error of the day-ahead residual-load forecast yields two coefficients whose ratio measures how far the auction cleared on the forecast rather than on the outcome. That ratio is 1.10 in Denmark and 0.82 in Spain: a forecast error of one GW moves the Danish price almost exactly as much as an actual change of one GW of residual load would. The Danish price also correlates more strongly with the forecast residual load than with the realized residual load (0.691 against 0.608, both computed from the ENTSO-E series net of wind and solar generation). In Germany, the ratio is 0.26 and in Slovakia the forecast error carries no significant coefficient at all. This is what the market design implies: the day-ahead auction closes around noon of the preceding day, so every bid rests on a forecast, and a forecasting model supplied with the same forecasts is not at a disadvantage against one supplied with the outcome. The second test confirms that the network does read the substituted inputs rather than ignoring them. Replacing the fundamentals shifts the median prediction by 5.39 €/MWh on average in Germany and by 6.50 in Denmark, with the correct sign on every input: in Germany −2.37 €/MWh per GW of wind forecast error, −2.32 per GW of solar and +1.69 per GW of load, and in Denmark −12.95 per GW of wind. The implied price sensitivity to residual load is 1.97, 11.47 and 1.98 €/MWh per GW in Germany, Denmark and Spain, respectively, against physical slopes of 3.45, 15.15 and 5.02. The third test asks whether those shifts carry information or merely noise. Permuting them among the hours of the same month, which preserves their size but destroys their timing, raises the ensemble MAE to 14.74 (DE), 21.11 (DK) and 15.87 €/MWh (ES) against the 13.10, 19.42 and 15.69 actually attained (p = 0.002 over 500 permutations). Together, the three results indicate that the day-ahead forecast errors of the transmission system operators are small relative to the price signal and are in part priced into the auction itself—not that the model ignores its fundamentals. In Slovakia, none of the three effects is present, which is consistent with the small but significant loss of accuracy there and with a price that follows domestic residual load only moderately. Two caveats restrict the claim. First, the networks were trained on realized values and only evaluated on forecasts; training on forecasts, which would let the model learn the structure of the forecast errors themselves, was not tested. Second, the explanation of why the Random Forest is the more sensitive of the two models—it splits on the value of a single hour, whereas the TFT reads a 24-h trajectory in the context of a week of history—is a hypothesis consistent with the results rather than something these experiments test.
The importance analysis of Section 3.4 provides an independent, model-internal confirmation of this mix-dependence pattern. The agreement of two fundamentally different attribution methods—tree-based Gini importance and attention-based variable selection—on the ranking of drivers strengthens the substantive conclusion: the informative content of fundamentals for price forecasting is created primarily by variable renewable generation and demand, in proportions that mirror the national generation mix. Both methods place wind first among the fundamentals in Denmark and Germany, both rank solar highly in Spain, and both leave the aggregate Slovak renewable term behind system load. The flatter attribution of the TFT relative to the Random Forest is expected, as a single global network shares its variable selection across markets and absorbs part of the seasonal structure through its calendar inputs and attention mechanism, whereas the per-market forests concentrate importance on the few locally informative fundamentals.
To test whether joint training helps or merely simplifies operations, market-specific TFTs were additionally trained with identical architecture and protocol (no country embedding, only locally available inputs) and, like the global model, with five independent seeds each, so that both sides of the comparison are ensembles of the same size. The specialist ensembles attain 13.67 (DE), 21.54 (DK), 23.06 (SK) and 18.13 €/MWh (ES), against 12.88, 19.41, 22.00 and 15.96 for the global ensemble. The global model is the more accurate of the two in every market, by 0.79 €/MWh in Germany, 1.06 in Slovakia, 2.13 in Denmark and 2.18 in Spain, and the difference is statistically significant for all four (multivariate Diebold–Mariano test on daily loss vectors, p ≤ 0.0015; Table 9). The global model is also the more stable of the two across seeds, with a seed-to-seed standard deviation of 0.17–0.53 €/MWh, against 0.60–1.12 for the specialists in three of the four markets and a tie in Spain (0.86 against 0.82). Joint training therefore does more than simply replace four models with one. The experiment establishes an accuracy gain from training on the pooled sample; the pattern of that gain is consistent with information being shared across the bidding zones, although the design does not isolate the mechanism. It is also the behavior expected of a global model fitted to a group of related series, where pooling buys sample size and regularization even when the series are not exchangeable [38]. Measured against the specialist, the gain is largest in Spain (12.0% of its error) and Denmark (9.9%) and smallest in Slovakia (4.6%). This reverses the ordering obtained from a single seed: comparing seed 42 with seed 42, the Slovak gain appeared to be the largest of the four at 2.33 €/MWh. The Slovak specialist is the least stable of the four across seeds (standard deviation 1.12 €/MWh); therefore, ensembling recovers more of its error than it does elsewhere (2.25 €/MWh against 1.27–2.11), and part of what a single-seed comparison attributed to joint training was seed variance. This is a second, independent instance of the caution against single-seed evaluation drawn from the positional-index ablation below.
The residual bias of the deployed ensemble is small: mean errors of +2.41 (DE), +1.75 (DK), −0.16 (SK) and −3.69 €/MWh (ES), between 1% and 23% of the corresponding MAE, against one third to one half outside Spain in the positional-index variant. What remains is not stable enough to correct statically: an additive offset estimated on the validation window has the opposite sign to the hold-out error in Germany and Denmark, and applying it raises the MAE in three of the four markets (by 0.50, 0.48 and 0.01 €/MWh) while improving Spain’s MAE by only 0.12. The non-stationary level drift that the offset was intended to remove was largely an artifact of the extrapolating positional index; with that input gone, adaptive recalibration—a rolling offset or conformalized quantile regression [36]—is worth considering for the prediction intervals, which still undercover, rather than for the point forecast.
The sensitivity analysis set out in Section 3.5 clarifies how the 2021–2023 energy crisis shapes each model family differently. For the adaptive regression, the crisis year is indispensable: without it, the linear specification never observes the elevated price regimes that recur in the test period, and its error increases by up to 33%. For the nonlinear models, excluding the crisis year barely changes point accuracy on the calm post-crisis test period, but it does reduce interval coverage: the crisis year supplies the extreme observations from which the quantile spread is learned. Point accuracy and calibration therefore have different data requirements, and a training window chosen based on point error alone can inadvertently degrade the probabilistic forecast.
For system operation, the relevant question is not the average error but where in the day the error falls. When the hold-out hours are sorted by the absolute hour-to-hour ramp in residual load, the improvement of the ensemble over persistence rises from 14.6% in the flattest quintile to 24.9% in the steepest in Spain, from 39.6% to 43.8% in Denmark and from 16.9% to 22.9% in Slovakia, while in Germany it peaks at 59.3% in the middle quintile compared with 50.4% in the flattest. The model is therefore most useful precisely in the hours that drive short-term operation: steep residual-load ramps are the hours in which thermal units start, shut down or are held at a technical minimum, in which storage and demand response are dispatched, and for which balancing capacity must be procured a day in advance. The same holds at the lower end of the price distribution, where the quantile trigger in Section 3.3 identifies negative-price hours better than either benchmark in three of the four markets, which bears directly on curtailment decisions and on the scheduling of flexible load. Conversely, the improvement is smallest in the two flattest quintiles of every market, where residual load barely moves and a scheduling error costs least. The practical implication is that the value of the deep model is concentrated in a minority of hours, and that an operational assessment should weight those hours rather than average uniformly over the year.
Several limitations qualify these findings. First, the models were trained on realized fundamentals. Supplying operational day-ahead forecasts at prediction time costs almost nothing (Section 3.1), but training on forecasts was not tested, and the Slovak renewable share needed to be reconstructed from separate forecast series because no operational forecast of it is published. Second, the input set omits natural gas and EU Emissions Trading System (EU ETS) carbon prices, whose inclusion may particularly benefit periods governed by the supply-side cost structure. Third, the fundamental inputs are restricted to the series available for each market; therefore, the Spanish model does not observe wind generation (22.2% of Spanish output) and the Danish model does not observe solar generation (12.9% of Danish output). The driver rankings of Section 3.4 are therefore conditional on the available inputs rather than on the full physical generation mix. Fourth, the LEAR benchmark recommended by Lago et al. [10] was not implemented, so the comparison spans tree-based and attention-based models but not regularized autoregressive ones. Fifth, the deep-learning results proved sensitive to the training configuration in two respects. With an inappropriately high learning rate, seed-to-seed variability reached several €/MWh and would have reversed some qualitative conclusions. More consequentially, an earlier configuration of this study supplied the decoder with an absolute positional index, a monotonic hour counter that received the largest variable-selection weight in all four markets and that, over the hold-out period, took values outside its entire training range. Retraining the full five-seed configuration without it improved the ensemble MAE by 1.67–2.35 €/MWh in Germany, Denmark and Slovakia (multivariate Diebold–Mariano p < 0.0001), reduced seed-to-seed variability from 1.1–2.7 to 0.17–0.86 €/MWh, raised interval coverage from 61–67% to 71–78%, and removed most of the systematic bias. We report the configuration without the index throughout. Two cautions follow: against single-seed evaluations, and against reading a large variable-selection weight as evidence that an input belongs in the model. Sixth, the prediction intervals undercover their nominal level: the nominal 80% interval contains 71.2–78.0% of the realized prices (64.2–75.6% when 2022 is withheld; Section 3.5), and the shortfall is largest in the lower tail in Spain and Slovakia, where 18.6% and 14.9% of prices fall below the 10th percentile against a nominal 10% (Section 3.2). Used as risk bounds—to size reserves or to bid to a risk limit—the intervals would therefore understate how often prices fall outside them, and they should first be recalibrated, for instance using the conformal approach mentioned in Section 3.2. Finally, the evaluation covers a single post-crisis year; rolling-origin designs spanning multiple years would strengthen external validity.
A further limitation concerns the variables that describe the state of the power system itself, which the models do not observe and which bear on the results in three ways. The first is interconnection. The models see only domestic load and renewable generation—not the cross-border capacity offered to the auction, which is published before gate closure, nor the conditions in neighboring zones, which set the price whenever the interconnectors are not congested. This is the most likely reason why the Danish price is the least well explained by the variables available here (r = 0.41); renewable generation in neighboring zones has been shown to depress domestic prices in its own right, with a greater effect the more interconnected the market is [39]. The second is generation availability. Planned and forced outages of large units shift the supply curve for days or weeks and are announced publicly, but the models register them only through the price history; they weigh most where a few large units supply much of the generation, as the nuclear units do in Slovakia. The third is flexibility. Hydro reservoir levels, the state of charge of storage, the ramping limits of thermal units and the response of flexible demand determine how cheaply a system follows residual load. They therefore matter most in the hours that are most demanding for the system: the steep residual-load ramps discussed above and the negative-price hours of Section 3.3, the one regime in which the simpler benchmarks still compete with the point forecast. Capacity held back for reserves is withdrawn from the day-ahead market as well, and its procurement is not modeled either. Most of these series are published, at least in part, on the ENTSO-E Transparency Platform, and extending the input set in this direction, rather than deepening the architecture, appears the more promising route to achieving further accuracy in tightly coupled markets.
In the context of the literature, the absolute error levels reported here (13–22 €/MWh for the ensemble) exceed those typical of the pre-crisis benchmark studies (roughly 2–5 €/MWh [10]), which reflects the substantially higher volatility of the 2024–2025 European markets rather than model quality; relative metrics are therefore more informative for cross-study comparison. The 22–56% improvement of the TFT ensemble over persistence is consistent with, and at the upper end of, the gains reported for deep learning in day-ahead price forecasting [10,16]. Additionally, the finding that the ensemble outperforms a lag-augmented tree ensemble in all four markets complements evidence from day-ahead applications [16,18] and the balancing-market study [17]. At the same time, our experience reconciles the mixed evidence on transformer superiority [19,20,21]: the advantage of the TFT materialized only after careful configuration of the training procedure, suggesting that reported failures of attention-based architectures may partly reflect tuning rather than architecture. A recent cross-border comparison points the same way: basis-expansion architectures performed competitively there, whereas transformer-based models could reach comparable accuracy but tended to require more adaptation and tuning [29].
5. Conclusions
This study benchmarked three forecasting approaches of increasing complexity on four European day-ahead electricity markets over the period 2015–2025, evaluated under an identical day-ahead protocol on a common 12-month hold-out period, with the deep-learning model deployed as an ensemble of five independently trained networks. Five conclusions emerge:
- A Random Forest equipped with standard price-history features is a far stronger benchmark than fundamentals-only specifications, significantly outperforming 24-h persistence in three of the four markets.
- The Temporal Fusion Transformer ensemble nevertheless attains the lowest MAE everywhere, with reductions against persistence ranging from 21.7% to 55.6%. Its advantage is statistically significant against persistence and against the Random Forest in all four markets, although in Slovakia the margin over the Random Forest is the narrowest and does not survive a squared-error loss.
- A single cross-market model is more accurate than market-specific TFT specialists in all four markets, by 0.79 to 2.18 €/MWh, with both sides deployed as five-seed ensembles. Therefore, joint training does more than merely replace four models with one, in a pattern consistent with sharing information across bidding zones, although the experiment does not isolate that mechanism. The gain over persistence is largest in Germany and Denmark, the two markets with the highest wind shares, but it is not monotonic in renewable penetration; seed-ensembling improves on both the average and the best individual seed everywhere.
- Replacing the realized fundamentals with the day-ahead forecasts published by transmission system operators changes the ensemble MAE by at most 0.22 €/MWh and leaves the ranking of the models and the pattern of significance intact, because the day-ahead price is itself formed from those forecasts. The perfect-foresight caveat common in fundamental price forecasting studies is therefore much weaker than it appears, at least when the forecasts are substituted at prediction time.
- What remains to improve is calibration rather than level: the point forecasts are close to unbiased and now lead the upper tail in three of the four markets, but the prediction intervals still undercover, and negative-price hours remain the one regime in which the simpler benchmarks compete with the point forecast—although the predicted 0.25 quantile identifies those hours better than either benchmark in three markets. Point accuracy is robust to excluding the 2022 crisis year; interval coverage is not.
Future work will incorporate natural gas and EU ETS carbon prices, train on TSO day-ahead forecasts rather than only evaluate on them, include the system-state variables identified in Section 4, apply adaptive recalibration of the systematic bias and conformal calibration of the prediction intervals, and evaluate a broader set of architectures (long short-term memory networks, N-HiTS, gradient boosting) with full hyperparameter optimization.
Supplementary Materials
The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/electricity7040116/s1, Table S1: Point accuracy of the five individually trained TFT networks, their mean ± standard deviation and the equally weighted ensemble, per market and per configuration; Table S2: Diebold–Mariano tests computed on hourly loss differentials with the Harvey small-sample correction and Bartlett weights (h = 24, 8759 hourly observations per market), shown next to the daily multivariate test of Table 3 for the same model pairs; Table S3: Coefficients of the adaptive multiple linear regression (Equation (1)), estimated by ordinary least squares on the expanding window and reported for the final re-estimation of the hold-out period; Table S4: Random Forest variable importance per market: Gini (mean decrease in impurity) and permutation importance (mean ± standard deviation over 10 shuffles), both in % of the total; Table S5: TFT variable-selection weights (%), averaged over the five seeds of the deployed configuration and over the last three months of the hold-out period; Table S6: Additive bias-correction experiment; Table S7: Ablation of the absolute positional index; Table S8: Point accuracy of the five market-specific specialist networks, per market and per seed, with their mean ± standard deviation, the equally weighted specialist ensemble and the global cross-market ensemble on the same hold-out period for reference; Table S9: Inputs of the operational forecast scenario of Section 3.1; Table S10: Detection of negative-price hours over the hold-out period (8759 h per market): confusion counts and classification metrics of the four detectors of Table 7; Table S11: Point accuracy of the five TFT networks of the deployed configuration retrained with the crisis year 2022 excluded from the training data, per market and per seed, with their mean ± standard deviation and the equally weighted ensemble (Section 3.5 and Table 8); Table S12: Mean day-ahead price and forecast accuracy over the hold-out period by quintile of the renewable share (Section 4).
Author Contributions
Conceptualization, J.Z. and M.P.; methodology, D.H.; software, J.Z.; validation, M.P., J.Z. and D.H.; formal analysis, D.H.; investigation, D.H.; resources, M.P. and V.S.; data curation, M.P.; writing—original draft preparation, D.H.; writing—review and editing, M.P. and V.S.; visualization, J.Z.; supervision, M.P.; project administration, M.P.; funding acquisition, M.P. All authors have read and agreed to the published version of the manuscript.
Funding
This study was supported by the Visegrad Fund under ID: 22530090.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The hourly day-ahead prices, system load, and renewable generation data are publicly available from the Energy-Charts platform (Fraunhofer ISE) at https://www.energy-charts.info (accessed on 20 July 2026). The day-ahead forecasts of load, wind and solar generation used in Section 3.1, together with the corresponding realized series, are publicly available from the ENTSO-E Transparency Platform at https://transparency.entsoe.eu (accessed on 15 September 2026). The evaluation notebooks, the trained model checkpoints, and all model forecasts generated in this study are openly available at https://doi.org/10.5281/zenodo.21859906, together with the exact export instructions needed to reconstruct the four input files. Further inquiries can be directed to the corresponding author.
Acknowledgments
During the preparation of this manuscript/study, the authors used Claude Opus 5 and Claude Opus 5.5 (Anthropic, San Francisco, CA, USA) for language editing and for reviewing the analysis code and outputs. 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.
Abbreviations
The following abbreviations are used in this manuscript:
| DM | Diebold–Mariano (test) |
| EPF | Electricity price forecasting |
| EU ETS | European Union Emissions Trading System |
| GPU | Graphics processing unit |
| LEAR | Lasso Estimated AutoRegressive model |
| MAE | Mean absolute error |
| ME | Mean error (actual minus forecast) |
| PI | Prediction interval |
| RES | Renewable energy sources |
| RF | Random Forest |
| rMAE | Relative mean absolute error (with respect to the naive persistence benchmark) |
| RMSE | Root mean squared error |
| SD | Standard deviation |
| TFT | Temporal Fusion Transformer |
| TSO | Transmission system operator |
References
- European Commission. The European Green Deal; COM(2019) 640 final; European Commission: Brussels, Belgium, 2019. [Google Scholar]
- European Commission. “Fit for 55”: Delivering the EU’s 2030 Climate Target on the Way to Climate Neutrality; COM(2021) 550 final; European Commission: Brussels, Belgium, 2021. [Google Scholar]
- Fraunhofer ISE. Energy-Charts: Renewable Share of Public Electricity Generation. Available online: https://www.energy-charts.info/index.html (accessed on 20 July 2026).
- 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] [Scilit]
- Janda, K. Slovak Electricity Market and the Price Merit Order Effect of Photovoltaics. Energy Policy 2018, 122, 551–562. [Google Scholar] [CrossRef] [Scilit]
- Prokhorov, O.; Dreisbach, D. The Impact of Renewables on the Incidents of Negative Prices in the Energy Spot Markets. Energy Policy 2022, 167, 113073. [Google Scholar] [CrossRef] [Scilit]
- Mier, M. European Electricity Prices in Times of Multiple Crises. Energy Econ. 2026, 161, 109481. [Google Scholar] [CrossRef] [Scilit]
- Schischke, A.; Rathgeber, A. The Impact of Renewables on Spillover Effects in Electricity Markets. Appl. Energy 2025, 399, 126489. [Google Scholar] [CrossRef] [Scilit]
- 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] [Scilit]
- Lago, J.; Marcjasz, G.; De Schutter, B.; Weron, R. Forecasting Day-Ahead Electricity Prices: A Review of State-of-the-Art Algorithms, Best Practices and an Open-Access Benchmark. Appl. Energy 2021, 293, 116983. [Google Scholar] [CrossRef] [Scilit]
- 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] [Scilit]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
- 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] [Scilit]
- 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] [Scilit]
- Lim, B.; Arık, S.Ö.; Loeff, N.; Pfister, T. Temporal Fusion Transformers for Interpretable Multi-Horizon Time Series Forecasting. Int. J. Forecast. 2021, 37, 1748–1764. [Google Scholar] [CrossRef] [Scilit]
- Jiang, H.; Pan, S.; Dong, Y.; Wang, J. Probabilistic Electricity Price Forecasting Based on Penalized Temporal Fusion Transformer. J. Forecast. 2024, 43, 1465–1491. [Google Scholar] [CrossRef] [Scilit]
- Saleh, A.; Amangeldina, A.; Tesfay, T.W.; Lafond, S.; Rexha, H.; Izhak, O. Forecasting Finnish aFRR Energy Reserve Market Prices Using Deep Learning and Tree-Based Models. Energy AI 2026, 24, 100724. [Google Scholar] [CrossRef] [Scilit]
- Fan, H.; Liu, W.; Zhang, Z.; Run, W.; Duan, Y.; Liu, D. EPformer: Unlocking Day-Ahead Electricity Price Forecasting Accuracy Using the Time–Frequency Domain Feature Learning Strategy Considering Renewable Energy. Renew. Energy 2026, 261, 125296. [Google Scholar] [CrossRef] [Scilit]
- Giacomazzi, E.; Haag, F.; Hopf, K. Short-Term Electricity Load Forecasting Using the Temporal Fusion Transformer: Effect of Grid Hierarchies and Data Sources. In Proceedings of the 14th ACM International Conference on Future Energy Systems; Association for Computing Machinery: New York, NY, USA, 2023; pp. 353–360. [Google Scholar]
- Ganesh, V.N.; Bunn, D. Forecasting Imbalance Price Densities with Statistical Methods and Neural Networks. Policy Regul. IEEE Trans. Energy Mark. 2024, 2, 30–39. [Google Scholar] [CrossRef] [Scilit]
- Deng, S.; Inekwe, J.; Smirnov, V.; Wait, A.; Wang, C. Seasonality in Deep Learning Forecasts of Electricity Imbalance Prices. Energy Econ. 2024, 137, 107770. [Google Scholar] [CrossRef] [Scilit]
- Gianfreda, A.; Ravazzolo, F.; Rossini, L. Comparing the Forecasting Performances of Linear Models for Electricity Prices with High RES Penetration. Int. J. Forecast. 2020, 36, 974–986. [Google Scholar] [CrossRef] [Scilit]
- Tehrani, S.; Juan, J.; Caro, E. Electricity Spot Price Modeling and Forecasting in European Markets. Energies 2022, 15, 5980. [Google Scholar] [CrossRef] [Scilit]
- Ganczarek-Gamrot, A.; Gorczyca-Goraj, A.; Pilot, K.; Kania, K. Electricity Price Volatility and the Performance of Machine Learning Forecasting Models in European Energy Markets. Energies 2025, 18, 6535. [Google Scholar] [CrossRef] [Scilit]
- Pavlík, M.; Kurimský, F.; Ševc, K. Renewable Energy and Price Stability: An Analysis of Volatility and Market Shifts in the European Electricity Sector (2015–2025). Appl. Sci. 2025, 15, 6397. [Google Scholar] [CrossRef] [Scilit]
- 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] [Scilit]
- Lago, J.; De Ridder, F.; Vrancx, P.; De Schutter, B. Forecasting Day-Ahead Electricity Prices in Europe: The Importance of Considering Market Integration. Appl. Energy 2018, 211, 890–903. [Google Scholar] [CrossRef] [Scilit]
- Gunduz, S.; Ugurlu, U.; Oksuz, I. Transfer Learning for Electricity Price Forecasting. Sustain. Energy Grids Netw. 2023, 34, 100996. [Google Scholar] [CrossRef] [Scilit]
- Elashhab, H.; Papineni, S.S.; Dorn, M.; Hagenmeyer, V.; Schafer, B. Deep Learning for Cross-Border Electricity Price Forecasting: A Comparative Study. IEEE Access 2026, 14, 133252–133263. [Google Scholar] [CrossRef] [Scilit]
- Pavlík, M.; Bereš, M. Effects of Electricity Price Volatility, Energy Mix and Training Interval on Prediction Accuracy: An Investigation of Adaptive and Static Regression Models for Germany, France and the Czech Republic. Energies 2025, 18, 3893. [Google Scholar] [CrossRef] [Scilit]
- Hyndman, R.J.; Koehler, A.B. Another Look at Measures of Forecast Accuracy. Int. J. Forecast. 2006, 22, 679–688. [Google Scholar] [CrossRef] [Scilit]
- Koenker, R.; Bassett, G. Regression Quantiles. Econometrica 1978, 46, 33–50. [Google Scholar] [CrossRef] [Scilit]
- Gneiting, T.; Raftery, A.E. Strictly Proper Scoring Rules, Prediction, and Estimation. J. Am. Stat. Assoc. 2007, 102, 359–378. [Google Scholar] [CrossRef] [Scilit]
- Diebold, F.X.; Mariano, R.S. Comparing Predictive Accuracy. J. Bus. Econ. Stat. 1995, 13, 253–263. [Google Scholar] [CrossRef] [Scilit]
- Harvey, D.; Leybourne, S.; Newbold, P. Testing the Equality of Prediction Mean Squared Errors. Int. J. Forecast. 1997, 13, 281–291. [Google Scholar] [CrossRef] [Scilit]
- Romano, Y.; Patterson, E.; Candès, E.J. Conformalized Quantile Regression. In Proceedings of the Advances in Neural Information Processing Systems 32; Neural Information Processing Systems Foundation: San Diego, CA, USA, 2019; Volume 32. [Google Scholar]
- Rokicki, T.; Bórawski, P.; Bełdycka-Bórawska, A.; Klepacki, B. Predicting Negative Day-Ahead Electricity Prices Across 12 European Bidding Zones: A Gate-Closure-Audited Explainable Machine Learning Framework. Appl. Sci. 2026, 16, 9063. [Google Scholar] [CrossRef] [Scilit]
- Montero-Manso, P.; Hyndman, R.J. Principles and Algorithms for Forecasting Groups of Time Series: Locality and Globality. Int. J. Forecast. 2021, 37, 1632–1653. [Google Scholar] [CrossRef] [Scilit]
- Stiewe, C.; Xu, A.L.; Eicke, A.; Hirth, L. Cross-Border Cannibalization: Spillover Effects of Wind and Solar Energy on Interconnected European Electricity Markets. Energy Econ. 2025, 143, 108251. [Google Scholar] [CrossRef] [Scilit]
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. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.





