ORIGINAL RESEARCH article

Front. Energy Res., 28 March 2025

Sec. Energy Efficiency

Volume 13 - 2025 | https://doi.org/10.3389/fenrg.2025.1477248

Forecasting day-ahead electric power prices with functional data analysis

  • 1. Department of Mathematics and Statistics, Bacha Khan University, Charsadda, Pakistan

  • 2. Department of Statistics, Quaid-i-Azam University, Islamabad, Pakistan

  • 3. Department of Mathematics, Shaheed Benazir Bhutto Women University, Peshawar, Pakistan

  • 4. Department of Computer Science, Electrical Engineering and Mathematical Sciences, Western Norway University of Applied Sciences, Bergen, Norway

Abstract

Day-ahead electricity prices in today’s competitive electric power markets have complex features such as high frequency, high volatility, non-linearity, non-stationarity, mean reversion, multiple periodicities, and calendar effects. These complicated features make price forecasting difficult. To address this, this research examines the application of functional data analysis to forecasting day-ahead electric power prices. Compared to classical time series forecasting approaches, functional data analysis is more appealing since it anticipates the daily profile, allowing for short-term projections. This technique uses a functional autoregressive (AR) and a functional autoregressive with exogenous predictors (AR) model to predict the next-day electric power prices. In addition, standard time-series forecasting models, including autoregressive (AR) AR, autoregressive integrated moving average (ARIMA), and ARIMA are also utilized for comparison. The model’s prediction performance was evaluated using data on electricity prices from the British electricity market, considering forecast error indicators and the same forecast statistical test. The results show that the proposed functional models (AR and AR) outperform standard time series models. In comparison to the benchmark models (AR, AR, ARIMA, ARIMA, and the proposed AR model), the AR model reduces: the day-ahead forecasting average MAPE by ranges of 5.02%–45.77%, 4.07%–40.63%, 3.80%–38.99%, 1.90%–24.22%, and 0.95%–13.78%; MAE by ranges of 9.43%–69.32%, 5.17%–65.48%, 6.04%–59.16%, 3.02%–42.01%, and 1.51%–26.59%; RMSE by ranges of 8.98%–40.97%, 6.68%–34.03%, 4.22%–24.58%, 3.91%–23.20%, and 2.30%–15.11%. Furthermore, compared with the literature-proposed best models, the AR model produces a significantly higher accuracy and efficient day-ahead forecast based on forecasting error indicators and an equal forecast statistical test. Furthermore, compared with the best models proposed in the literature, the AR model demonstrates significantly higher accuracy and efficiency in day-ahead forecasting, as evidenced by forecasting error indicators and an equal forecast statistical test.

1 Introduction

Electricity is an essential requirement for all aspects of modern life. However, large-scale energy storage remains a problem, complicating operating plans in the electricity sector. As a result, energy pricing in supply and demand is an issue since it is directly related to the quantity of consumed load. This connection serves as the foundation for all utility economic planning and administration. Furthermore, trustworthy and committed policies in development plans are essential. For example, generation units must prioritize reliability alongside other policies, such as environmental protection and renewable energy infrastructure development. These policies significantly affect the quality of delivered energy ().

Efficient planning in reorganized power systems is separated into four time periods: long-term (more than 10 years), medium-term (1 year), short-term (1 week to 1 month), and immediate planning. These plans must consider load usage, electricity pricing, economic conditions, and yearly electricity prices. Furthermore, the demand load quantity, a time-dependent nonlinear function, must be evaluated daily (day or night), seasonally (hot or cold), and considering local weather conditions (; ).

As a result, differing electricity demand patterns and levels vary significantly over time (at least hourly). As mentioned earlier, each phase has significant characteristics that improve managerial performance. During these periods, 1-day forecasting has the most significant impact on power prices. The most crucial advantage of short-term forecasting is that it enhances supply and demand. Therefore, selecting the most accurate and rapid approach for estimating electric power costs is critical and vital (; ).

To obtain efficient and accurate one-day-ahead electric power demand and prices, many studies have used classical time series forecasting models, including exponential smoothing, regression analysis, and various machine-learning models such as neural networks, fuzzy neural networks, and support vector machines (; ). For example, employed stochastic models for short-term price forecasting. They utilized the regression trees method to forecast electricity prices and compared the results with those of alternative approaches such as ARIMA, exponential smoothing, and neural networks. Empirical findings indicated that their proposed method outperformed other benchmark techniques regarding predictive accuracy. proposed a new hybrid short-term load forecasting method that combined multivariate linear regression (MLR) and long-short-term memory (LSTM) neural networks. suggested forecasting the electricity demand time series employing a hybrid prediction model that combined LSTM with empirical mode decomposition (EMD). Recurrent neural networks (RNNs) can be preferable as they implicitly capture the temporal context available in the time series or sequential data (; ; ; ). A gated recurrent unit (GRU) and LSTM networks have demonstrated efficiency in modeling and forecasting time series data (). GRU networks are mainly used in classification and are seldom applied in regression problems (; Ugurlu et al., 2018). employed combined neural networks (GRU + MLP, CNN + bidirectional GRU (BiGRU)) for predicting gas production in various reservoirs, showcasing remarkable prediction capabilities. conducted a comprehensive review of short-term demand prediction and compared the performance of artificial neural networks with classical TS methods. Their results indicate that artificial neural networks outperform classical techniques. With increasing uncertainty in electrical systems, anticipating electricity demand, generation, and pricing becomes challenging for actors in the electrical market (). Numerous strategies and solutions have been proposed in response to these challenges. However, each method entails its own advantages and disadvantages. As the electricity market integrates more renewable resources with intermittent behavior, the system experiences additional fluctuations and volatility, making the development of superior and efficient forecasting models complex (). To effectively handle complex TS data, it is essential to develop state-of-the-art visualization, modeling, and forecasting techniques to accommodate high- and infinite-dimensional data. Classical methods for multivariate data encounter difficulties when dealing with such complex data, leading to ineffective results. Therefore, alternative approaches, such as functional data analysis (FDA) methods, have been less explored in the literature.

One-day-ahead price forecasting is of utmost importance for market agents and system operators. Overproduction incurs penalties due to the inability to store electricity and the need to instantly meet demand. Price forecasting also facilitates efficient resource management, optimal scheduling, and production planning to minimize generation costs. Retailers heavily rely on price forecasts to secure the best deals for their energy requirements. Hence, predicting the price for the next day is a significant concern for electricity businesses. The advent of smart metering has increased the frequency of electricity consumption data, with measurements now available at intervals as short as every half-hour or even a few minutes. Consequently, forecasting prices for the following day require predicting many price values beyond the traditional, highlighting the need for innovative methodologies such as utilizing functional data methods (; ; ). FDA is a statistical framework that analyzes and models observed data as curves or functions. Functional time series (FTS) extends this framework to handle time-dependent functional data, enabling the analysis and forecasting of functional observations over time.

FTS techniques have found numerous applications in electricity markets. From a functional perspective, it is possible to generate long-term estimates of electricity demand or day-ahead clearing prices. The challenge of forecasting over longer horizons can be addressed by transforming it into a series of one-step-ahead functional forecasts. This can be achieved by segmenting the time series into segments of equal length corresponding to the desired forecast horizon. While various approaches exist for dealing with discrete TS, limited contributions specifically focus on FTS (). From a univariate FTS modeling perspective, the theory of linear FTS in Hilbert space was proposed by and by introducing the functional autoregressive (AR) model. Notably, the pioneering studies in this research area include functional Yule–Walker (YW) estimation and Sieve estimation. Subsequently, AR (1) was extended to order through sequential testing hypothesis methods (). investigated an adaptive functional autoregressive (AfAR) model for forecasting electricity price curves. By employing California electricity daily price data, their results demonstrated that the proposed AfAR model exhibits superior forecasting accuracy compared to several alternative approaches. forecast electricity demand and price series by dividing the TS into deterministic and stochastic components. The deterministic component was modeled and forecast using the conventional time series method, and the stochastic component was modeled and projected using the functional models. Both parametric and nonparametric functional models forecast electricity demand and prices. The results of the proposed method were compared with classical models. The results suggested that the proposed method performs relatively better than the competitors.

As seen in the above studies, the functional time series approach enhances the forecasting accuracy and efficacy of short-term electric power prices better than other methods and models. To test these studies, this research examines the application of functional data analysis to forecasting day-ahead electric power prices. Within the functional data analysis, this study proposes a functional autoregressive (

AR) and a functional autoregressive with exogenous variables (

AR

) model to predict next-day electric power prices. The

AR

model includes exogenous variables describing the complex features of electricity power prices (a long-term secular trend, daily, weekly, and annual periodicity, bank holidays). In the past, some research captured these complex features by components-wise estimation (

;

;

). In contrast, our research directly uses these features in a single model (

AR

) and checks the proposal’s performance in different ways. For instance, standard time series forecasting models, including the autoregressive (AR), the AR

, the autoregressive integrated moving average (ARIMA), and the ARIMA

, are also utilized for comparison. The model’s prediction performance was evaluated using data on electricity prices from the British electricity market, considering forecast error indicators and the same forecast statistical test. Thus, the key contributions of this study are the following.

  • • To improve the efficiency and accuracy of day-ahead electricity price forecasting, this work proposes novel functional autoregressive (AR) and functional autoregressive with exogenous variables (AR) models. The AR model includes exogenous variables that describe the complex features of electricity power prices (a long-run secular trend, daily, weekly, and annual periodicity, and bank holidays).

  • • Compare the performance of the proposed functional models with various standard time series models with and without exogenous information.

  • • To evaluate the performance of the proposed functional forecasting models, three different accuracy mean errors are determined: mean absolute error, root mean squared error, and mean absolute percent error; an equal forecast statistical test—the Diebold and Marino test; a visual evaluation.

  • • In this study, the results of the functional autoregressive with exogenous variables (AR) model are compared with the best model proposed in the literature, and the comparative results are recorded. Based on these results, this study’s proposed best combination model is highly accurate and efficient compared to the best models reported in the literature for day-ahead electricity price forecasting.

  • • Finally, while this study is limited to the British electricity market, it may be extended and generalized to other energy markets to assess the efficacy of the proposed functional forecasting model.

The rest of this study is structured thus. Section 2 gives an overview of the basics of the FDA. Section 3 presents an overview of the British electricity market and the out-of-sample forecasting results. Section 4 compares the current study’s proposed best model and the literature’s proposed best models. Section 5 summarizes the key conclusions drawn from our study and outlines potential future research directions.

2 Preliminaries of functional data analysis

This section addresses certain fundamental concepts that are required for developing functioning models. The TS of electricity prices is converted into functional data using specific basis functions. The daily electricity price for the day can be stated as follows:where is the value of the constant parameters, and are the Fourier basis functions. Figure 4 shows FTS curves for 1826 days, with each functional curve representing a daily price trend. Consider . The inner product of generates the norm . Define a set of random curves in with time domain where is a real and separable Hilbert space with a countable and orthonormal basis. We assume as a separable Hilbert space, with . Assume has a mean curve and the covariance operator , supplied by

The eigenfunctions of are known as functional principle components (FPCs), which are calculated by deconstructing the covariance function of the curves with interdependence. We establish the covariance function with the covariance function and extract the FPCs that correspond to . Thus, the mathematical form is given in Equation 2

The combination eigenvalue of the covariance function is denoted by . For every , the eigenfunctions are assumed to be orthonormal and normalized to the unit norm with . Using the FPC scores at time as the specification, the statistical method is to find the orthonormal functions with the most considerable variances of the leading scores . However, the λk formula is explained in Equation 3.

It follows that for since and are orthogonal for . The values of and are as follows. Subsequently, the Karhunen–Loève expansion of the function is defined in Equation 4.

The FPCs at time i are represented by the coefficients , which inherit the serial dependency from .

2.1 Functional AutoRegressive model of order

The price curves are modeled and forecast through a functional model called the AR model; mathematically, it is expressed as

where

are the

AR operators,

is the mean curve of

, and

represents the

lag of curve

. The

is a strong

-white noise with zero mean and finite second moment (

).

AR

chooses the order and dimension using a functional final prediction error (fFPE). For modeling and estimating the

in

Equation 5

by the

AR

model,

Equation 1

is utilized in the following three steps.

  • • Fix dimension D and obtain the estimated FPC scores as for every observation. , and the estimated k-variate FPC scores vectors

  • • For a fixed-order , construct the vector autoregressive model (VAR) = for eigenscore vectors to produce forecasting . The vectors are given , where Durbin–Levinson and innovation algorithms could be readily applied.

  • • The KL theorem is used to re-transform the multivariate time series into a functional version in the final step. The resultant is then employed as the one-step-ahead forecast of in accordance with projected FPC results and sample eigenfunctions.

2.2 Functional AutoRegressive model of order with deterministic part (AR)

To increase forecasting accuracy, AR modeling includes lagged values of a response variable as well as additional deterministic parts. Deterministic factors might be scalar, vector-valued, or functional. define the AR) model in Equation 6.

where

are functional variables,

denotes the scalars or vector explanatory variables, and

represents white noise. Here,

denotes the mean of the explanatory variable. The deterministic component consists of a long-term secular trend

, a yearly periodicity

, weakly seasonality

, bank holidays

, and forecast electricity price

. The dimension and order of the

AR

)

are obtained through fFPE. The estimation approach from

Section 2.1

is updated and summarized thus.

  • 1. a. Set the dimension D for and utilize the data to calculate vectors . These vectors contain the first D-predicted FPC scores.

    • b. When dealing with functional exogenous variables with a fixed value of , use the data to compute the vector , which contains the first leading FPC scores. This process should be repeated for each functional exogenous variable.

    • c. Next, integrate all the exogenous variable vectors into a single vector, ,

  • 2. Use and to obtain a one-step-ahead forecast as

  • 3. Using the KL theorem, obtain

The KL expansion provides a 1-day forecast for .

2.2.1 Order and dimension selection of AR and AR() models

This study aims to achieve accurate forecasting using AR by selecting the appropriate order and dimension D. This decreases the MSE of forecasting, which is asymptotically similar to . The fFPE is given as in Equation 7:where is the eigenvalue of . The variance–covariance matrix in 7 is an unbiased estimator of . The best D and is the minimizer of the fFPE function. For a further and detailed study, see .

2.3 Autoregressive model

The autoregressive (AR) algorithm is the most popular linear model used in univariate time series forecasting. It regresses the response variable using its lagged values. The order of the AR algorithm, represented by the symbol , is the total number of lag (past) values needed to anticipate a future value. In mathematics, AR can be expressed as

where is the constant called intercept, are the coefficients that need to be learned from the data, and is the noise. An AR is frequently employed in the electricity price modeling literature; this study also it takes into account. The maximum likelihood estimation (MLE) approach determines the model parameters. On the other hand, the AR() model represents the AR model with a deterministic part.

2.4 Autoregressive integrated moving average (ARIMA) model

The combination of the AR and the moving average (MA) models is called the “autoregressive moving average” model (ARMA) for stationary series. However, a likelihood function could not be derived from performing ML estimation of the parameters until 1970, when the classic Time Series Analysis () was published, including the full modeling methodology for univariate series, identification, estimations, diagnostics checking, and forecasting. The general form of the ARMA model can be presented thus:where represents the constant term (intercept), , are the AR and MA parameters, respectively, and is a Gaussian white noise series with average zero and variance of . By introducing a reverse shift operator B, Equation 8 can be written as:

To introduce ARIMA (r, d, s), consider as the first difference between . Hence, Equation 8 can be written as:

In Equation 9, B is the back-shift operator, and d indicates the series’ differencing. This model is written as “ARIMA (r, d, s)”, where “r” stands for AR order, “d” stands for series differencing, and”s” stands for MA order. The ARIMA model represents the ARIMA model with a deterministic part.

To finish this part of the study,

Figure 1

depicts the architecture of the proposed time series functional forecasting approach and the pointwise explanation below:

  • 1. The time series data is divided into two parts: validation data and testing data set. This study uses two different methods: the classical time series model and the functional time series model.

  • 2. Classical time series models such as AR, ARX, ARIMA, and ARIMAX are applied to the data to generate forecasts.

  • 3. The discrete-time series data is converted into functional data using Fourier basis functions.

  • 4. Functional time series models, such as fAR and fARX, are applied to the functional data.

  • 5. The optimal order and dimension of the proposed functional models are determined using the functional final prediction error.

  • 6. Functional principal component analysis is utilized in the proposed functional models.

  • 7. A vector autoregressive model of order p is estimated and forecast using the principal component scores. The fARX model is an extension of the fAR model that incorporates explanatory variables, such as long-run secular trends, yearly periodicity, weekly seasonality, bank holidays, and forecast electricity prices.

  • 8. The forecast vector is converted into functional data using the KL transformation, resulting in the final forecast.

FIGURE 1

2.5 Quality measures

This study has computed numerous quality indicators to compare the models. We convert the anticipated curves into half-hourly electricity pricing data to facilitate comparison. Three average accuracy measures are used to evaluate prediction accuracy and efficiency: 1) mean absolute percentage error (MAPE), 2) mean absolute error (MAE), and 3) root mean square error (RMSE), as well as the Diebold–Mariano equal forecasts statistical test (; ).

2.5.1 Mean absolute error

The MAE is derived by averaging the absolute difference between the prediction and the actual value while ensuring that the negative value does not cancel out the positive values. It can be stated thus:where is the observed data and is the predicted day-ahead electricity price for day and price period.

2.5.2 Mean absolute percentage error

To compute the MAPE, divide the average absolute error for each period by the observed values and multiply by 100. The MAPE effectively measures accuracy when a prediction variable is large (). It is a relative measure of forecast error that highlights the degree of difference between the predicted and actual values. The mathematical expression for the MAPE is

2.5.3 Root mean square error

The RMSE grows as the scale of the dependent variable grows. It compares forecasts from many models for the same dataset. The RMSE is the square root of the squared difference on average between the anticipated and actual values. The mathematical definition is:

2.5.4 The Diebold-Mariano test

The Diebold–Mariano (DM) test () is employed to evaluate the accuracy of the proposed functional time series forecasting models. This statistical test is commonly used in time series analysis to compare the accuracy of two forecasting models. It evaluates whether the errors generated by one model statistically differ from the errors of another (). To perform the DM test, the forecast errors of each model are calculated using a loss function. These errors are the differences between the observed values and the forecast values . The test statistic is then calculated by comparing the mean squared errors of the two models. Suppose the test statistic is greater than a certain threshold and the p-value is lower than a pre-determined significance level (e.g., ); in that case, we conclude that the forecasts from one model are statistically significantly better than the other.

The null and alternative hypotheses of the DM test are

—there is no difference in forecast accuracy between the two models .

—the two models differ in forecast accuracy .

Therefore, the null hypothesis implies no statistically significant difference in forecast accuracy between the models, while the alternative hypothesis suggests that a significant difference exists.

3 Case study and results

The liberalization of the United Kingdom’s electricity industry can be attributed to the regulatory and structural changes implemented in the late 1980s. These reforms sought to eliminate the state-owned monopoly and establish a competitive wholesale energy market. Recognizing that transmission and distribution are natural monopolies, the main focus of the reforms was the deregulation of the generation and supply sectors. Consequently, in 1990 the UK electricity market underwent reorganization, establishing the England and Wales power pool and dividing the government monopoly into three entities: National Power, Powergen, and Nuclear Energy.

The power pool served as a trading platform for half-hourly transactions. However, market power in the generation industry became a significant concern due to National Power and Powergen holding respective market shares of 50% and 30%. Meanwhile, Nuclear Electric, responsible for supplying the base load of nuclear power, essentially acted as a price taker. Market manipulation by these two corporations led to reduced competition, resulting in the average price remaining approximately 24 per megawatt-hour between 1994 and 1996 ().

A fully liberalized bilateral contracting system replaced the England and Wales power pool with the introduction of New Energy Trading Arrangements (NETA) in 2001 (becoming the British Electricity Trading Transmission Arrangements—BETTA—in 2005). This transition established a more stable market share for electricity companies in the generation and retail sectors. Additionally, the reforms resulted in the creation of three distinct power exchanges: the United Kingdom Power Exchange (UKPX), the UK Automated Power Exchange (APX UK), and the International Exchange (IE, formerly known as the International Petroleum Exchange—IPE). Subsequently, the amalgamation of APX and UKPX into APX Group in 2004, followed by the inclusion of Scotland in the UK power market in 2005, further enhanced market dynamics. This highly competitive and well-developed market exhibits a robust correlation between market price and market fundamentals ().

3.1 Data description and forecasting results

This study aims to accurately and efficiently forecast half-hourly electricity pricing data from APX from January 2018 to December 2022. To achieve this objective, we implemented an FDA to model and forecast the electricity price-time series in the APX. To understand the complex characteristics of electricity price dynamics over time, these characteristics are expected to include missing values, a nonlinear long-run secular trend, pronounced seasonality, high volatility, non-normality, and non-stationarity. A non-stationary process can be defined as one in which statistical features such as mean, variance, and autocorrelation vary with time. This indicates that the data lacks a steady mean or variance, making it difficult to examine using typical statistical approaches that presume stationarity. Thus, the key characteristics of non-stationary data are: a) trends: non-stationary data may show long-term trends in which values grow or decrease with time; b) seasonality: refers to recurrent patterns or cycles that occur at regular periods, such as seasonal influences in sales statistics; c) changing variability: the variability of the data may alter with time, resulting in periods of volatility followed by stability. For instance, Figure 2A shows the half-hourly electricity price time series with a red-line linear and blue-line nonlinear trend component. Figure 2B shows a boxplot for the half-hourly over 6 years, indicating high variations among the 24 hours (48 half hours). Figure 2C shows the autocorrelation plot of the original electricity prices at 336 lags, and Figure 2D shows the partial autocorrelation plot of original electricity prices at 336. These figures clearly illustrate a discernible long-term trend, as well as annual and weak seasonality. Furthermore, non-normality and non-stationarity are also evident from these visual representations.

FIGURE 2

On the other hand,

Table 1

summarizes the characteristics of the data before and after data transformations, such as taking the natural logarithm (addressing variance and standard deviation stabilization). For instance, for the electric power time series before and after data transformations, the minimum values: are 2.20 and 0.79, first quartile (37.28 and 3.62); median (43.96 and 3.78); mean (45.51 and 3.79); mode (37.81 and 3.63); third quartile (51.28 and 3.94); standard deviation (12.45 and 0.25); coefficient of variation (27.36 and 6.56); maximum (326.09 and 5.79). It is confirmed from this analysis that the log transformation attained normality in the data since the mean, median, and mode are approximately the same. However, the standard deviation is also much lower than the original series. To this end, further analysis proceeds with the log-transformed electric power price series for modeling and forecasting purposes. Thus, for modeling and forecasting, the log-transformed data are divided into two parts:

  • • validation data: from January 2018 to December 2021 (70,128 observations, covering i = 1461 days)

  • • testing data: from January 2022 until December 2022 (17,520 data points (hours), with i = 365 (days).

TABLE 1

StatisticSeriesLog (series)
Minimum2.200.79
1st Qu37.283.62
Median43.963.78
Mean45.513.79
Mode37.813.63
3rd Qu51.283.94
SD12.450.25
CV27.366.56
Max326.095.79

Summary statistics of British Electricity Market 2018–2022.

The models were estimated using an extension window approach derived from an annual 1-day out-of-sample forecast. As indicated in Figure 3, the discrete half-hourly electricity price is from January 2018 to December 2022. The Fourier base function transforms the discrete electricity power price data into a functional form (Figure 4). The mean curve can be represented with a solid black curve.

FIGURE 3

FIGURE 4

Figure 5 illustrates that the functional representation of electricity prices exhibits lower values during weekends than weekdays, indicating less electricity use over weekends. Figure 6 shows the first five FPCs, which account for a large number of data variations. Figure 7 shows the proportion of variation explained by each FPC. The graphic shows that the first PC accounts for about 60% of all data volatility. Accordingly, the second, third, fourth, and fifth FPCs account for 13%, 8%, 6%, and 5% of total variation.

FIGURE 5

FIGURE 6

FIGURE 7

The day-ahead forecasting accuracy of the models is measured using the MAE, MAPE, and RMSE. For instance, Table 2 summarizes the models’ overall accuracy, showing that the functional models outperform the classical time series models (AR, AR, ARIMA, and ARIMA models). Within the functional models, AR) demonstrates superior forecasting performance compared to AR. For instance, AR) achieves the lowest mean error—MAPE = 5.95, MAE = 4.17, and RMSE = 12.94—comparatively lower than the AR model. On the other hand, the functional models (AR and AR)) compared to the classical time series models (AR, AR, ARIMA, and ARIMA) obtain highly accurate forecasting mean errors. For example, AR) improves the forecasting mean errors ranging from 32.96%–84.41%, 36.22%–225.93%, and 17.81%–69.40%, for the MAPE, MAE, and RMSE, respectively. Therefore, the relatively least accurate mean error values across the board demonstrate the usefulness of the AR) forecasting model.

TABLE 2

ModelMAPEMAERMSE
AR10.9613.6021.93
AR10.0112.0919.62
ARIMA9.7510.2217.16
ARIMA7.857.1916.85
AR6.905.6815.25
AR()5.954.1712.94

British Electricity Market: out-of-sample forecasting error evaluation of functional models and traditional time series models considered.

On the other hand, a graphical comparison (Figure 8) shows the original and predicted values for each of the forecasting models that were taken into account in Table 2. The figure demonstrates how well the forecast from the proposed functional model (AR() matches the actual pricing. However, the AR and AR show competitive results. The classic AR model shows the worst forecasting results among all models considered. Therefore, we can determine that the AR( model outperformed the rest of the models.

FIGURE 8

After calculating the accuracy measures (MAPE, MAE, and RMSE), the Diebold–Mariano (DM) test was used to statistically assess the superiority of the proposed functional time series models (see Table 3 for the DM statistic p-values). The outcome of this table revealed that the proposed functional time series model (AR)) achieved statistically superior performance across all models; the AR model showed the second-best results. These findings confirm AR) as the most reliable model for day-ahead electricity price forecasting within the scope of this study.

TABLE 3

ModelARARARIMAARIMAARAR()
AR-0.080.090.040.040.05
AR0.92-0.100.030.030.05
ARIMA0.910.90-0.060.010.02
ARIMA0.960.970.94-0.070.09
AR0.960.970.990.93-0.11
AR()0.950.950.980.910.89-

British Electricity Market: Diebold–Mariano results (p-value) for all forecasting models.

Table 4 displays the weekly forecasting errors for the models under investigation. Monday, Wednesday, Saturday, and Sunday are typically associated with larger weekly errors than Tuesday, Thursday and Friday. Among the models, AR() achieves the lowest MAPE value of 3.99 on Thursday—a day with a relatively stable electricity load. Conversely, Sunday exhibits a higher MAPE score of 9.72. Consistent with the previous tables, the functional model with the deterministic component, AR(), outperforms the partial functional method, AR (). In contrast, the classical univariate time series models (AR, AR, ARIMA, and ARIMA) perform relatively poorly compared to the other models considered in this study.

TABLE 4

ErrorModelMondayTuesdayWednesdayThursdayFridaySaturdaySunday
MAEAR10.3512.8415.6119.389.2212.1215.67
AR9.2011.4113.8817.238.1910.7713.93
ARIMA7.789.6511.7314.566.929.1011.77
ARIMA5.486.798.2610.264.886.418.29
AR4.325.366.528.103.855.066.54
AR()3.173.944.795.942.833.724.80
MAPEAR11.799.9611.537.368.539.6517.91
AR10.779.1010.536.737.798.8116.36
ARIMA10.488.8610.256.557.588.5815.93
ARIMA8.447.138.255.276.106.9012.82
AR7.426.277.254.635.366.0711.27
AR()6.395.406.263.994.625.239.72
RMSEAR18.6220.3523.7521.9823.7226.5918.46
AR16.6618.2121.2519.6721.2323.7916.52
ARIMA14.5715.9318.5917.2118.5720.8114.45
ARIMA14.3115.6418.2516.9018.2320.4414.19
AR12.9514.1516.5215.2916.5018.4912.84
AR()10.9912.0114.0212.9814.0015.7010.90

British Electricity Market: weekly forecasting accuracy metrics evaluation of functional models and traditional time series models considered.

Table 5 presents the monthly forecasting errors for each model considered in this study. It is evident that December, January, and February exhibit relatively higher errors than other months. This can be attributed to increased electricity demand during these months. Nevertheless, the functional models perform better than the standard traditional time series models. Specifically, the direct functional model AR) exhibits lower forecasting errors than the other methods discussed here. The MAPE values for AR) range 3.034–6.486, indicating the effectiveness of this model.

TABLE 5

ErrorMonthJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember
MAEAR10.657.2014.4213.0822.6515.0112.6516.089.6412.4411.0018.39
AR9.466.3912.8211.6220.1313.3411.2414.298.5711.059.7816.35
ARIMA8.005.4110.839.8317.0111.279.5012.087.249.348.2613.82
ARIMA5.633.817.636.9211.987.946.698.515.106.585.829.73
AR4.453.016.035.479.466.275.296.724.035.204.607.69
AR()3.272.214.424.016.954.603.884.932.963.813.375.64
MAPEAR3.0312.7614.1110.659.3310.9513.0211.2410.9810.5410.6310.76
AR2.7711.6512.899.728.5210.0111.8910.2610.039.639.709.83
ARIMA2.6911.3412.559.468.299.7411.579.999.769.379.449.56
ARIMA2.179.1310.107.626.687.849.328.047.867.547.607.70
AR1.9111.7212.979.788.5710.0611.9610.3210.099.699.769.89
AR()1.646.927.655.775.065.947.066.095.955.725.765.84
RMSEAR24.9821.1625.8020.0321.7613.6323.9324.9521.2019.9717.3428.35
AR22.3518.9323.0917.9219.4712.2021.4222.3318.9717.8715.5125.37
ARIMA19.5516.5620.2015.6817.0310.6718.7319.5316.5915.6313.5722.19
ARIMA19.2016.2619.8315.3916.7310.4818.4019.1816.2915.3513.3321.79
AR17.3714.7217.9413.9315.139.4816.6517.3514.7413.8912.0619.71
AR()14.7512.4915.2311.8212.858.0514.1314.7312.5111.7910.2316.73

British Electricity Market: monthly forecasting accuracy evaluation of functional models and traditional time series models considered.

As is evident from the average accuracy errors (MAE, MAPE, and RMSE) and equal forecasting accuracy statistical test (DM test) and graphical results (line plots), the AR) model outperforms its counterpart, the AR model, and the standard classical time series models (AR, AR, ARIMA, and ARIMA). However, the effect of modifying the function models by incorporating the deterministic part was clearly seen, where the exogenous variables are denoted by long trend, yearly periodicity, seasonal periodicity, bank holidays, and electricity demand. Using these exogenous variables, the functional model is modified to AR(). The optimal dimension and order are chosen through fFPE. The vector AR model uses a scores vector and then a 1-day forecast of the aforementioned model.

To sum up this section, we can say that the suggested functional forecasting model with exogenous variables has a high degree of accuracy and efficiency for day-ahead for British electricity prices based on the accuracy mean errors (MAE, MAPE, and RMSE) and equal forecast statistical test (the DM test).

4 Discussion

This section compares the best proposed functional (AR()) forecasting model in this study with the proposed best models in the literature. A detailed comparison of this study’s best forecasting functional model with the literature’s best models is listed in Table 6. This confirms that the proposed (Stochastic-AR) best model from has been applied to the database utilized in the current work, and the average accuracy metrics have been calculated. The average accuracy metrics values reported for the proposed (Stochastic-AR) best model of are MAPE = 9.81 (65.01%), MAE = 11.29 (170.61%), and RMSE = 18.12 (40.00%), which are significantly higher than our accuracy mean error values: MAPE = 5.95, MAE = 4.17, and RMSE = 12.94. The proposed (the FAR(P) model) best model in Jan et al. (2022) has been compared to the current research dataset and produced performance metrics comparatively higher than our proposal (the AR() model). For example, the computed forecasting average errors using the proposed (the FAR(P) model) best model in Jan et al. (2022) are 6.50, 5.18, and 14.55—significantly higher than our proposed (AR()) best model forecasting average accuracy errors. Additionally, in , the proposed (the best model 4) was used in our dataset obtained mean accuracy metrics also comparatively greater than the AR() model at 4.46%, 20.81%, and 10.02% for the MAPE, MAE, and RMSE, respectively. Furthermore, the developed best model (Ensemble) of was used in the current research database and the average metric errors computed, such as MAPE, MAE, and RMSE—comparatively higher (5.30%, 23.20%, and 11.10%) than our best functional model. In , the best forecasting model (NP) was applied to our database and the average mean errors computed. However, in comparison, the computed mean errors in the forecasting model were 10.68%, 27.52%, and 11.18% for the MAPE, MAE, and RMSE, respectively—higher than our best functional model. In summary, it is evident that the best functional model of this work achieved higher accuracy than the best models found in the literature.

TABLE 6

ModelMAPEMAERMSE
AR()5.954.1712.94
Stochastic-AR 9.8111.2918.12
FAR(P) 6.505.1814.55
46.215.0414.24
Ensemble 6.265.1414.38
NPVARE6.585.3214.39

British Electricity Market (pound/MWh): comparison of one-day-ahead average accuracy metrics between proposed functional best models and literature best models.

TABLE 7

Abbreviations/SymbolsMeaning
FDAFunctional data analysis
FTSFunctional time series
ARFunctional autoregressive
ARFunctional autoregressive with exogenous predictors
ARAutoregressive
ARAutoregressive with exogenous predictors
MAPEMean absolute percentage error
MAEMean absolute error
RMSERooted mean square error
TSTime series
fFPEFunctional final prediction error
Electricity prices
Constant parameter
Fourier basis functions
Eigenvalues
Eigenfunctions
Eigenscores
Mean function
AR operators

Table of nomenclature.

The proposed functional time series model used in this study has proven to be very accurate and effective in predicting the next-day power price in the British electricity market. These precise forecasts can help sellers (buyers and suppliers) optimize their bid planning, maximize revenue, and better use the resources required to generate electricity. Offering a stable and cost-effective energy system benefits end users. Furthermore, the accurate projection and understanding of energy prices in developing countries can help traders make more effective commercial and trade plans and better asset allocations. Finally, sellers (buyers and suppliers) can create more robust trading strategies based on the proposed AR() model and choose models with the most remarkable risk reward ration.

The statistical computing language programming environment R-studio implements analysis models. In comparison, all computations were performed with Intel(R) Core(TM) i7-6600 @ 2.80 GHz CPU. R uses GAM, tsDyn, and forecast libraries to model and predict standard time series forecast models. We wrote our own source code to model and forecast AR and AR() models, which also use R’s fda library. The documentation of the packages provides detailed information on the algorithms used in the estimation.

5 Conclusion

Forecasting electricity prices in a deregulated power market is complex and crucial. The price time series of electric power exhibits features such as high frequency, long-term trends, multiple seasonal patterns, spikes or jumps, and the effects of bank holidays. Addressing these features is essential for accurate price forecasting. This study has focused on the problem of day-ahead electricity price forecasting using functional data analysis. The electricity prices were modeled and forecast through two functional models, employing four classical time series models (AR, AR, ARIMA, and ARIMA) for this purpose. The price series was transformed into a functional form, and AR was utilized for modeling and forecasting. The functional model was further modified by introducing some essential exogenous information (specific features): AR(). Meanwhile, the AR, AR, ARIMA, and ARIMA models employed conventional time series models for modeling and forecasting electricity prices. In comparison to the benchmark models (AR, AR, ARIMA, ARIMA, and the proposed AR model), the AR model reduces the day-ahead forecasting average MAPE by a range of 5.02%–45.77%, 4.07%–40.63%, 3.80%–38.99%, 1.90%–24.22%, and 0.95%–13.78%; MAE by a range of 9.43%–69.32%, 5.17%–65.48%, 6.04%–59.16%, 3.02%–42.01%, and 1.51%–26.59%; RMSE by a range of 8.98%–40.97%, 6.68%–34.03%, 4.22%–24.58%, 3.91%–23.20%, and 2.30%–15.11%. Furthermore, compared with the literature’s proposed best models, the AR model produces a significantly higher accuracy and efficient day-ahead forecast based on forecasting error indicators and an equal forecast statistical test. Compared with the best models proposed in the literature, the AR model demonstrates significantly higher accuracy and efficiency in day-ahead forecasting, as evidenced by forecasting error indicators and an equal forecast statistical test.

This study focuses entirely on the British electricity market. The idea should include additional electrical markets, such as the European, American, and Chinese markets. Other energy market factors are electricity demand, production, consumption, curves, natural gas pricing, wind speed, and crude oil prices. This will enable a more in-depth assessment of the upgraded functional model’s performance. There are various approaches to broaden the field of future study. Other functional factors, such as temperature, consumer load, fuel, carbon dioxide emission costs, average solar radiation, and wind speed, can be included in the model to improve electricity price forecasting accuracy.

Statements

Data availability statement

Publicly available datasets were analyzed in this study; the data can be found at: https://www.kaggle.com/datasets/thedevastator/gb-electrical-grid-half-hourly-data-2008-present.

Author contributions

FJ: conceptualization, data curation, formal analysis, investigation, methodology, resources, software, validation, visualization, writing–original draft, and writing–review and editing. HI: conceptualization, formal analysis, funding acquisition, methodology, project administration, resources, software, supervision, visualization, writing–original draft, and writing–review and editing. MT: data curation, formal analysis, investigation, resources, and writing–review and editing. MK: funding acquisition, investigation, project administration, supervision, and writing–review and editing.

Funding

The authors declare that no financial support was received for the research, authorship, and/or publication of this article.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors, and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

  • 1

    AueA.NorinhoD. D.HörmannS. (2015). On the prediction of stationary functional time series. J. Am. Stat. Assoc.110, 378392. 10.1080/01621459.2014.909317

  • 2

    BaruahR. D.OrganeroM. M. (2023). “Integrating explicit contexts with recurrent neural networks for improving prognostic models,” in 2023 IEEE aerospace conferenceGermany, (IEEE), 18.

  • 3

    BibiN.ShahI.AlsubieA.AliS.LoneS. A. (2021). Electricity spot prices forecasting based on ensemble learning. IEEE Access9, 150984150992. 10.1109/access.2021.3126545

  • 4

    BosqD. (2000). Linear processes in function spaces: theory and applications. Germany, Springer Science and Business Media. 149.

  • 5

    BosqD.BlankeD. (2008). Inference and prediction in large dimensions. John Wiley and Sons.

  • 6

    BoxG. (2013). “Box and jenkins: time series analysis, forecasting and control,” in A very British affair: six britons and the development of time series analysis during the 20th centuryGermany, (Springer), 161215.

  • 7

    Carbo-BustinzaN.IftikharH.BelmonteM.Cabello-TorresR. J.De La CruzA. R. H.López-GonzalesJ. L. (2023). Short-term forecasting of ozone concentration in metropolitan lima using hybrid combinations of time series models. Appl. Sci.13, 10514. 10.3390/app131810514

  • 8

    ChanS.-C.TsuiK. M.WuH.HouY.WuY.-C.WuF. F. (2012). Load/price forecasting and managing demand response for smart grids: methodologies and challenges. IEEE signal Process. Mag.29, 6885. 10.1109/msp.2012.2186531

  • 9

    ChaouchM. (2013). Clustering-based improvement of nonparametric functional time series forecasting: application to intra-day household-level load curves. IEEE Trans. Smart Grid5, 411419. 10.1109/tsg.2013.2277171

  • 10

    ChenY.ChuaW. S.KochT. (2018). Forecasting day-ahead high-resolution natural-gas demand and supply in Germany. Appl. energy228, 10911110. 10.1016/j.apenergy.2018.06.137

  • 11

    ChenY.LiB. (2017). An adaptive functional autoregressive forecast model to predict electricity price curves. J. Bus. and Econ. Statistics35, 371388. 10.1080/07350015.2015.1092976

  • 12

    CoelhoC.CostaM. F. P.FerrásL. L. (2024). Enhancing continuous time series modelling with a latent ode-lstm approach. Appl. Math. Comput.475, 128727. 10.1016/j.amc.2024.128727

  • 13

    DudekG. (2015). “Short-term load forecasting using random forests,” in Intelligent systems’ 2014: proceedings of the 7th IEEE international conference intelligent systems IS’2014, Warsaw, Poland, September 24-26, 2014, , volume 2: tools, architectures, systems, applications (Springer), 821828.

  • 14

    FargallaM. A. M.YanW.DengJ.WuT.KiyingiW.LiG.et al (2024). Timenet: time2vec attention-based cnn-bigru neural network for predicting production in shale and sandstone gas reservoirs. Energy290, 130184. 10.1016/j.energy.2023.130184

  • 15

    GersF. A.EckD.SchmidhuberJ. (2001). “Applying lstm to time series predictable through time-window approaches,” in International conference on artificial neural networksUSA, 9 to September 12, 2025, (Springer), 669676.

  • 16

    GonzalesS. M.IftikharH.López-GonzalesJ. L. (2024). Analysis and forecasting of electricity prices using an improved time series ensemble approach: an application to the peruvian electricity market. AIMS Math.9, 2195221971. 10.3934/math.20241067

  • 17

    HippertH. S.PedreiraC. E.SouzaR. C. (2001). Neural networks for short-term load forecasting: a review and evaluation. IEEE Trans. power Syst.16, 4455. 10.1109/59.910780

  • 18

    HorváthL.KokoszkaP. (2012). Inference for functional data with applications, Springer Science and Business Media. 200.

  • 19

    IftikharH.BibiN.Canas RodriguesP.López-GonzalesJ. L. (2023a). Multiple novel decomposition techniques for time series forecasting: application to monthly forecasting of electricity consumption in Pakistan. Energies16, 2579. 10.3390/en16062579

  • 20

    IftikharH.Turpo-ChaparroJ. E.Canas RodriguesP.López-GonzalesJ. L. (2023b). Day-ahead electricity demand forecasting using a novel decomposition combination method. Energies16, 6675. 10.3390/en16186675

  • 21

    IftikharH.Turpo-ChaparroJ. E.Canas RodriguesP.López-GonzalesJ. L. (2023c). Forecasting day-ahead electricity prices for the Italian electricity market using a new decomposition—combination technique. Energies16, 6669. 10.3390/en16186669

  • 22

    Inglada-PérezL.GilS. G. y. (2024). A study on the nature of complexity in the Spanish electricity market using a comprehensive methodological framework. Mathematics12, 893. 10.3390/math12060893

  • 23

    JanF.ShahI.AliS. (2022). Short-term electricity prices forecasting using functional time series analysis. Energies15, 3423. 10.3390/en15093423

  • 24

    KarakatsaniN. V.BunnD. W. (2008). Forecasting electricity prices: the impact of fundamentals and time-varying coefficients. Int. J. Forecast.24, 764785. 10.1016/j.ijforecast.2008.09.008

  • 25

    KarimF.MajumdarS.DarabiH.HarfordS. (2019). Multivariate lstm-fcns for time series classification. Neural Netw.116, 237245. 10.1016/j.neunet.2019.04.014

  • 26

    KokoszkaP.ReimherrM. (2013). Determining the order of the functional autoregressive model. J. Time Ser. Analysis34, 116129. 10.1111/j.1467-9892.2012.00816.x

  • 27

    LagoJ.MarcjaszG.De SchutterB.WeronR. (2021). Forecasting day-ahead electricity prices: a review of state-of-the-art algorithms, best practices and an open-access benchmark. Appl. Energy293, 116983. 10.1016/j.apenergy.2021.116983

  • 28

    LiJ.DengD.ZhaoJ.CaiD.HuW.ZhangM.et al (2020). A novel hybrid short-term load forecasting method of smart grid using mlr and lstm neural network. IEEE Trans. Industrial Inf.17, 24432452. 10.1109/tii.2020.3000184

  • 29

    LisiF.PelagattiM. M. (2018). Component estimation for electricity market data: deterministic or stochastic?Energy Econ.74, 1337. 10.1016/j.eneco.2018.05.027

  • 30

    LisiF.ShahI. (2020). Forecasting next-day electricity demand and prices based on functional models. Energy Syst.11, 947979. 10.1007/s12667-019-00356-w

  • 31

    LiuB.FuC.BielefieldA.LiuY. Q. (2017). Forecasting of Chinese primary energy consumption in 2021 with gru artificial neural network. Energies10, 1453. 10.3390/en10101453

  • 32

    McKenzieJ. (2011). Mean absolute percentage error and bias in economic forecasting. Econ. Lett.113, 259262. 10.1016/j.econlet.2011.08.010

  • 33

    PaparoditisE.SapatinasT. (2013). Short-term load forecasting: the similar shape functional time-series predictor. IEEE Trans. power Syst.28, 38183825. 10.1109/tpwrs.2013.2272326

  • 34

    PinhãoM.FonsecaM.CovasR. (2022). Electricity spot price forecast by modelling supply and demand curve. Mathematics10, 2012. 10.3390/math10122012

  • 35

    QuispeF.SalcedoE.IftikharH.ZafarA.KhanM.Turpo-ChaparroJ. E.et al (2024). Multi-step ahead ozone level forecasting using a component-based technique: a case study in lima, Peru. AIMS Environ. Sci.11, 401425. 10.3934/environsci.2024020

  • 36

    QureshiM.IftikharH.RodriguesP. C.RehmanM. Z.SalarS. A. (2024). Statistical modeling to improve time series forecasting using machine learning, time series, and hybrid models: a case study of bitcoin price forecasting. Mathematics12, 3666. 10.3390/math12233666

  • 37

    RajabiR.EstebsariA. (2019). “Deep learning based forecasting of individual residential loads using recurrence plots,” in 2019 IEEE milan PowerTech (IEEE), 15.

  • 38

    ShahI.IftikharH.AliS. (2022a). Modeling and forecasting electricity demand and prices: a comparison of alternative approaches. J. Math.2022, 3581037. 10.1155/2022/3581037

  • 39

    ShahI.IftikharH.AliS.WangD. (2019). Short-term electricity demand forecasting using components estimation technique. Energies12, 2532. 10.3390/en12132532

  • 40

    ShahI.JanF.AliS. (2022b). Functional data approach for short-term electricity demand forecasting. Math. problems Eng.2022, 114. 10.1155/2022/6709779

  • 41

    TaheriS.TalebjediB.LaukkanenT. (2021). Electricity demand time series forecasting based on empirical mode decomposition and long short-term memory. Energy Eng. J. Assoc. Energy Eng.118, 15771594. 10.32604/ee.2021.017795

  • 42

    TalebjediB.LaukkanenT.HolmbergH. (2024). Integration of thermal energy storage for sustainable energy hubs in the forest industry: a comprehensive analysis of cost, thermodynamic efficiency, and availability. Heliyon10, e36519. 10.1016/j.heliyon.2024.e36519

  • 43

    UgurluU.OksuzI.TasO. (2018). Electricity price forecasting using recurrent neural networks. Energies11, 1255. 10.3390/en11051255

Summary

Keywords

electric power market, functional data analysis, day-ahead electricity price forecasting, classical time series models, functional time series models

Citation

Jan F, Iftikhar H, Tahir M and Khan M (2025) Forecasting day-ahead electric power prices with functional data analysis. Front. Energy Res. 13:1477248. doi: 10.3389/fenrg.2025.1477248

Received

07 August 2024

Accepted

25 February 2025

Published

28 March 2025

Volume

13 - 2025

Edited by

A. S. M. Monjurul Hasan, University of Technology Sydney, Australia

Reviewed by

Burcin Cakir Erdener, National Renewable Energy Laboratory (DOE), United States

Behnam Talebjedi, Aalto University, Finland

Updates

Copyright

*Correspondence: Hasnain Iftikhar, ; Mehak Khan,

Disclaimer

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.

Outline

Figures

Cite article

Copy to clipboard


Export citation file


Share article

Article metrics