The integration of distributed energy resources (DERs) into modern power systems is becoming increasingly important as new multi-resource electricity transactions emerge [
1]. DERs, including residential photovoltaic (PV) systems, demand response (DR), and energy storage systems (ESSs), have the potential to provide numerous technical and environmental advantages [
2]. However, there are still a number of transactional and reliability challenges associated with integrating distributed energy resources (DERs) into existing power grids [
3]. The inclusion of these energy assets introduces additional complexity in forecasting future electricity prices, as traditional models may no longer be sufficient [
4]. Due to their intermittent nature and variability, PV-powered DERs can significantly impact the supply and demand dynamics of the power system, which increases uncertainty in price forecasting.
In this context, accurate electricity price forecasting has an important role in decision making by various stakeholders and the development of innovative business and market models towards a future power grid [
5]. Market players such as generators, retailers, and consumers require accurate price forecasting to optimize their operations, manage their energy portfolios, and make informed decisions about energy transactions according to their interests [
6]. This also enables innovative business models, such as peer-to-peer energy trading, grid balancing services, and energy aggregation platforms, along with DER integration. These developments foster a dynamic and decentralized energy landscape, offering opportunities to enhance efficiency and sustainability in the energy sector [
7].
To address these challenges and take advantage of the aforementioned opportunities, the present paper aims to predict intra-day electricity prices using a tuned multi-step forecasting model called Time2Vec Transformer (T2V-TE). This model incorporates a combination of stacked transformer encoders and a special time-varying embedding called Time2Vec. To evaluate the performance of the model, (both point and probabilistic approaches), different comparison baseline forecasting models were considered, including Holt–Winters, XGBoost, and LSTM-based models, to analyze historical hourly electricity prices in the Colombian wholesale market. This analysis was conducted in the context of the increasing integration of DERs and the exploration of new market insights.
1.1. Literature Review
The electricity price is a crucial factor in energy markets and current power grids, playing a pivotal role in providing a reliable and economically efficient power supply [
1,
12,
13]. Therefore, precise electricity price forecasting is essential for all stakeholders, as it empowers them to make informed decisions that increase profitability and reduce risks in competitive electricity markets. In addition, it enhances the overall stability and optimal operation of the power grid, even in scenarios involving the inclusion of new energy resources such as DERs.
However, developing a robust electricity price forecasting model (with either a probabilistic or point-wise approach) presents significant challenges. Not only does it display a level of seasonality, but it also exhibits highly nonlinear and time-varying features [
14]. Consequently, there has been a strong interest in developing models that can effectively deal with these complex issues. Various approaches have explored advanced regression models to manage the complexities of accurately predicting electricity prices, including statistical time series analysis methods as well as various artificial intelligence (AI) algorithms.
Initially, traditional time series analysis forecasting models (e.g., linear regression, moving averages, auto-regressive models, etc.) were used, including more sophisticated ones (e.g., ARIMA, SARIMA, exponential smoothing, Box–Jenkins, state-space, or hybrid statistical models) [
15], to capture patterns and seasonality in electricity price data. Several studies, including [
16,
17,
18,
19], have examined electricity price forecasting using this approach. These models were the basis for the development of more robust forecasting methods. In [
16], an ARIMA model coupled with a neural network (a multi-layer perceptron in this case) was developed. The ARIMA model captured linear patterns, while the MLP modeled the remaining nonlinear residuals. The results suggest that the combined model produces lower forecast errors, measured by the mean absolute percentage error (MAPE) and mean absolute deviation (MAD), than either model used separately.
Likewise, the authors in [
17,
18] developed some ARIMA, SARIMA, GARCH, and hybrid models for modeling and forecasting electricity prices. They explore various model structures and evaluate their accuracy using statistical measures (
and MAPE). The results highlight the competitiveness of these hybrid models for this task. A hybrid model combining multivariate linear regression with ARIMA and Holt–Winters models is presented in [
19]. Tests on data from the Iberian electricity market show superior performance (from MAPE) compared to some benchmark models, with promising results under different scenarios.
There are also studies [
20,
21,
22] focusing on the comparison of different time series analysis methods for electricity price forecasting. In [
20], the authors compare several prediction models, including SARIMA, SARIMAX, and ARIMA, to predict day-ahead electricity prices in Germany. The SARIMAX model with exogenous variables performed the best, enhancing the forecast accuracy. The authors in [
21] compare double and triple exponential smoothing for electricity price forecasting from volatility, using elastic net regularization. The results show superior performance for triple exponential smoothing and reduced mean square error with regularization. The findings enable informed decision making for power generation scheduling in the electricity market. Furthermore, accurate forecasting results have been obtained through various auto-regressive statistical models and their derivatives, as presented in [
22]. Detailed computational procedures are provided along with numerical results and performance (MAPE), with some promising results and issues to consider.
However, the time series analysis models commonly presented rely on linear relationships and stationarity, hindering their accuracy for data with high variability and seasonality, as well as predicting values multiple steps into the future, even in hybrid models. Nonetheless, these models perform acceptably when the seasonality of the data is low (e.g., week- or month-long patterns with small deviations). Consequently, these models prove more fitting for other energy-related tasks. They also promotes the exploration of various forecasting methods. In this regard, machine learning (ML) algorithms have shown promising results in the prediction of electricity prices both in point and probabilistic approaches [
23], given their suitability for the high variability (associated with nonlinearity) and seasonality evident in these data. Many researchers have developed predictive models to forecast electricity prices in various countries and scenarios. Some of the ML models widely used for this task include support vector machines (SVMs) [
24,
25,
26], tree-based models [
27,
28,
29], k-nearest neighbor (KNN) [
30,
31,
32], shallow architectures of artificial neural networks (ANNs) [
33,
34,
35], quantile regressor as a probabilistic forecasting approach [
36,
37,
38], and different related hybrid models [
39,
40,
41,
42,
43,
44,
45,
46].
For instance, in [
26], an electricity price and short-term load forecasting model is presented using improved SVM and KNN algorithms. The study utilized the New York Independent System Operator (NYISO) dataset for six months, and applied feature selection and extraction techniques. The modified SVM and KNN models are evaluated using metrics such as MAE, RMSE, and MAPE. In a similar vein, in [
29], the prediction of electricity prices in Victoria, Australia was analyzed using various tree-based regression algorithms, including gradient boosting, decision tree, and random forest regression models, with the performance evaluated using metrics such as MAE and
. Furthermore, in [
46], a hybrid machine learning model for short-term electricity price forecasting is proposed. The model merges linear regression with ensemble tree-based models. Metrics such as MSE and MAE are used to fit and evaluate the performance of the model. The results reveal that the proposed model outperforms other single and hybrid models in terms of prediction accuracy. In [
39], the authors used the SVR-based hybrid model alongside various feature selection techniques to forecast electricity price spikes. Likewise, the authors in [
45] developed a hybrid forecasting model that combines a seasonal component auto-regressive model with an ANN model. The model was applied to forecast day-ahead electricity prices with acceptable accuracy.
As with statistical time series analysis models, there are also some studies [
47,
48,
49] that focus mainly on the comparison of different ML models for electricity price forecasting under specific contexts. In [
47,
48], the authors compare forecasting models for predicting short-term electricity prices in the Italian market. Different regression methods, including SVM, Gaussian process, decision trees, MLP, parametric and non-parametric methods are evaluated using performance metrics such as MAE, RMSE, R, and percentage error anomalies. Likewise, the authors in [
49] provide an extensive overview of the current level of advancement in short-term electricity price prediction. They examine the application of single and hybrid machine learning models, assess their effectiveness through evaluation metrics like MAE, RMSE, and MSE, and identify the influence of distinct features on their forecasting performance. In this case, they use data from the Nord Pool market.
However, the above ML models and comparisons for electricity price forecasting only focus on shallow learning. Since shallow ML models are sensitive to overfitting and gradient vanishing, they are limited in their ability to handle large data and complex nonlinear (extreme variant) issues [
50]. Therefore, the combination of intelligence optimization theories and advancements in computer technology has led to a growing research interest in predictive models in this area, particularly using deep learning (DL) architectures due to their remarkable performance and broad application scope. There have been developments in electricity price time series prediction models with different architectures, some of which are: convolutional network (CNN) [
51,
52,
53], recurrent neural network (RNN)-based models [
54,
55,
56,
57,
58], generative models [
59,
60], Bayesian networks (BNs) [
61,
62], and hybrid models (ensembles, signal preprocessing steps, among others) [
63,
64,
65,
66].
Among the various deep learning architectures used for this task, RNN-based models stand out for their recurrent feedback network framework. Unlike other forecasting models, RNNs consider the temporal and abstract correlations of the time series, enabling a more thorough and comprehensive modeling of the time series data. For instance, in [
56,
67], the authors present a hybrid forecasting model for the short-term prediction of electricity load and price. The model integrates wavelet transform with feature selection based on entropy and mutual information, utilizing LSTM networks. The results (using MAPE, RMSE, and variance) show in both cases the accuracy of the load and price predictions. Similarly, in [
58], electricity price forecasting is explored, focusing on proposed long-term and short-term memory networks using historical prices, timestamps, and additional engineering features. The research results highlight the meaningful impact of feature selection on forecast accuracy and the importance of selecting appropriate test datasets, especially when drastic trend changes occur in historical data.
Despite the variety of objectives and architectures employed in the development of predictive models in this field, most of them have predominantly utilized a point or deterministic approach. However, there are other outstanding concerns. Firstly, raw features containing outliers and high-dimensional data can complicate feature extraction. Hence, feature preprocessing will be critical in obtaining representations that facilitate precise forecasting. Secondly, point forecast models lack the ability to adequately assess the forecast uncertainty in electricity prices, which is detrimental to the risk trade-off, considering the data noise [
68]. Both of these factors are crucial to consider when using these models as input for informed decision-making tools. However, there is still a lack of development in these issues.