1 Introduction

Electricity is the predominant form of energy used worldwide. With the advent of digitalization and the industrial revolution, electricity consumption has experienced a significant increase globally. In recent years, the European Union has witnessed a surge in the use of electric vehicles, further emphasizing the importance of electricity as an energy source. Given the widespread use of electricity and the high demand in Europe, accurately forecasting electricity prices has become a crucial from both economic and social consideration [1]. A comprehensive analysis of electricity prices, coupled with reliable predictions, can assist governments and businesses in formulating optimal policies and maximizing profits. As a result, this subject has garnered considerable attention among researchers. For instance, Klopicic et al. [2] conducted a comprehensive investigation into the evolution of the retail electricity market within the European Union. Their analysis incorporated statistical measures such as the arithmetic mean, standard deviation, and average exchange rates. Nonetheless, these statistical metrics primarily serve as indicators of the dynamics between electricity consumers and suppliers. Notably, the crucial market determinant, electricity price, was not factored into their study. In another study, Vailtali [3] examined electricity transmission dynamics in the southeastern European region. This research emphasized the considerable variation in electricity transmission costs across the states within the region. Such divergence underscores the inherent volatility in electricity prices and the market’s inherent instability. Tschora et al. [4] explored the effectiveness of various forecasting techniques, including random forest (RF), convolutional neural network (CNN), support vector regression (SVR), and deep neural network (DNN), for predicting next-day electricity prices. Their findings indicated that DNN and SVR were suitable methods, whereas RF and CNN exhibited limitations in forecasting day-ahead electricity prices. Chen et al. [5] introduced a hybrid least square-SVM method for forecasting the electricity price on the last day of each month, considering all preceding days of that month as input for their model. Their findings revealed that the electricity price data is affected by noise, and mitigating this noise can lead to enhanced accuracy in prediction outcomes. Ugurlu et al. [6] proposed a three-layer gated recurrent unit for predicting next-day electricity prices, utilizing the electricity prices at each hour of the present day as inputs. They demonstrated that models based on RNNs exhibit greater accuracy in predicting short-term electricity prices due to their ability to retain information from prior data. However, it’s noteworthy that their investigation did not extend to predicting long-term electricity prices. Xie et al. [7] introduced the XGB-SHAP method to forecast electricity prices for the following day. Their study focused on the PJM electricity market within the United States and demonstrated an impressive 94% accuracy rate (MAPE = 6%). Parhizkari et al. [8] compared extreme machine learning (ELM) and multi-layer perceptron (MLP) for mid-term electricity price prediction, revealing that ELM outperformed MLP. Pourhaji et al. [9] investigated long short-term memory (LSTM) with monthly and seasonal clustering to predict short-term electricity prices. Their results indicated that monthly clustering yielded superior performance compared to both seasonal clustering and non-clustering methods. Additionally, Lago et al. [10] conducted a review of existing methods for forecasting day-ahead electricity prices. Their study confirmed that nearly all deep neural network models outperformed the Lasso estimated autoregressive model, although it’s worth noting that the Lasso model exhibited higher computational efficiency.

Predicting long-term electricity prices is a challenging task due to the complex nature of their behavior [11], which is influenced by factors such as economic growth [12], weather conditions [13], and social events [1]. The electricity market is highly volatile, characterized by sharp price spikes. However, there has been limited research on forecasting monthly electricity prices. Ribeiro et al. [14] introduced an ensemble learning model for predicting industrial and commercial electricity prices in Brazil for the next 3 months. Xie et al. [15] utilized tensor fusion and LSTM to forecast the month-ahead electricity prices for residential, commercial, and industrial sectors. Jahangir et al. [16] proposed a hybrid LSTM model combined with dimension reduction techniques for monthly electricity price prediction. Sultana et al. [17] incorporated the past 5 months’ weather data as input and introduced an enhanced support vector regression method for month-ahead electricity price prediction. Windler et al. [18] employed a deep feed-forward neural network for month-ahead electricity price prediction, focusing on long-term prices.

Given the intricacies of the electricity market influenced by non-storage attributes of electricity, coupled with the impact of various stochastic factors like temperature, renewable energy production variations, and socio-economic influences on electricity consumption [12, 13], analyzing and predicting electricity prices become a challenging task. Researchers have adopted diverse stochastic factors to improve the accuracy of electricity price forecasting. For instance, Wagner et al. used expected photovoltaic and wind energy production as inputs for predicting electricity prices [25]. In a similar vein, Jahangir et al. utilized load demands and different power sources for electricity price forecasting [16]. Ugurlu et al. [6] predicted electricity prices by considering various lagged prices and forecasting demand/supply scenarios. Ribeiro’s approach [14] involved using energy generation, lagged energy prices, and demand to predict electricity prices. Notably, these parameters are mostly stochastic and exhibit high irregularity, resulting in unstable forecasting outcomes. To address this challenge, this paper opts to focus solely on historical monthly electricity prices as a means to overcome the instability associated with the highly irregular and stochastic nature of the considered parameters.

The electricity market is highly competitive, and accurate price forecasting can result in significant cost savings for industries [9]. SVR, feedforward neural network (FNN), nonlinear regression (NLR), and grey models, along with their improved versions, are widely used in the electricity price analysis. SVR, FNN, and NLR methods are suitable for long-term predictions, requiring a sufficient amount of input data. On the other hand, grey models work well with smaller datasets (minimum 4 elements) and are more appropriate for short-term forecasting [19]. To the best of our knowledge, nearly all grey models demonstrate limited ability to predict more than 5 subsequent time series elements with an acceptable error [20, 21]. Notably, grey models have been found to achieve optimal results in predicting the next elements [22, 23]. Therefore, we have defined the prediction of the month-ahead electricity selling price as short-term prediction and the prediction of the 7 upcoming months as long-term prediction. This approach aligns with similar studies, such as Ribeiro et al., who categorized month-ahead electricity price prediction as short-term forecasting [9], and Azad et al., who considered the prediction of wind speed for the next 6 months as long-term forecasting [24]. We focus on monthly electricity prices in Bulgaria, Greece, Hungary, and Romania, aiming to investigate the efficiency of the aforementioned methods in analyzing electricity prices in these regions. The study demonstrated that NLR, FNN, and SVM are not efficient in accurately predicting the electricity selling price for the upcoming months. Therefore, this paper has three main objectives. First, it proposes an improved support vector regression approach to forecast electricity prices for the next 7 months (see Sect. 3). Second, it utilizes SVR to identify trends in monthly electricity prices for the next 7 months, which is particularly important for investment companies. The second objective is deemed more crucial than the first. Third, we explore the effectiveness of the grey Verhulst method for short-term electricity price prediction. The remaining sections of the paper are organized as follows: Sect. 2 discusses the FNN, SVR, and GVM methods. Section 3 presents the numerical results and the improved SVR approach. Finally, Sect. 4 provides a conclusion and suggests future research directions.

2 Materials and methods

2.1 Database

The database obtained from European association for the cooperation of transmission system operators for electricity(ENTSO-e) website [26], specifically focusing on wholesale average monthly electricity prices within the spot market. Notably, any applicable fees, charges, or taxes at the national level have been excluded from this data. During the data preprocessing stage, missing values are estimated by using interpolation methods based on neighboring values. To obtain daily prices, the average of hourly prices within a day is calculated, while the average of daily prices within a month is considered as the monthly price.

2.2 Nonlinear regression method

The objective of the nonlinear regression method is to determine the unknown coefficients (c = [c1, c2, c3]) of the predefined function f(x, c) that minimize the difference between the estimated output f(xi) and the actual output yi

$$ \begin{gathered} Min\,\sum\limits_{i = 1}^{n} {\varepsilon_{i}^{2} } \hfill \\ s.t.\,\,\,\,\,\left| {\left. {f(x_{i} ,c) - y_{i} } \right|} \right. \le \varepsilon ,\,\,i = 1,...,n, \hfill \\ \end{gathered} $$
(1)

where n is the number of input point and εi i = 1,…, n are the error of the regression [27, 28].

In this study, the experimental results show that the function f in the following form is suitable for predicting the future electricity prices. We will use the decomposition method to obtain the values of the unknown coefficients c1, c2 and c3.

$$ f(x) = c_{1} \left( {\frac{\pi }{2} - \frac{{\sin (x - c_{2} )}}{{c_{3} }}} \right). $$
(2)

2.3 Feedforward neural network

FNN is a widely employed neural network model for time series forecasting [27]. In this research, a two-layer FNN architecture is considered, with each layer consisting of 20 neurons. The MATLAB software is utilized for the calculations, where its predefined parameters left unchanged. Consequently, the ReLU function is chosen as the activation function, and the limited-memory Broyden-Fletcher-Goldfarb-Shannon quasi-Newton algorithm is employed as the optimization algorithm to determine the unknown weights.

2.4 Grey Verhulst method

Grey system theory refers to a specific category of time series forecasting methods that are suitable for dealing with incomplete or small datasets [21]. The initial step of grey models involves transforming the input time series into another increasing time series known as the augmentation-generated time series [22, 23]. The most commonly used augmented series is the first-order augmented sequence (1-AGO), denoted as X1 = (\({{\varvec{x}}}_{1}^{1},\dots ,{{\varvec{x}}}_{{\varvec{n}}}^{1}\)), which is defined as follows:

$$ x_{i}^{1} = \sum\limits_{j = 1}^{i} {x_{j}^{0} } , $$
(3)

where X0 = {\({{\varvec{x}}}_{1}^{0},\dots ,{{\varvec{x}}}_{{\varvec{n}}}^{0}\)} represents the original time series.

In the subsequent step, a differential equation with unknown parameters is employed to capture the dynamics of the augmented time series. The algorithm aims to determine the unknown parameters in a way that minimizes the modeling error. The grey Verhulst model employs the following nonlinear equation to approximate the 1-AGO sequence [20]:

$$ \frac{dx}{{dt}} + ax = bx^{{^{2.} }} . $$
(4)

In our study, we utilize the least square method to estimate the unknown coefficients in the grey Verhulst model.

2.5 Support vector regression

SVR is an efficient tool for regressing nonlinear data. SVR considers a subset of input data for determining the unknown coefficients w and b of the function.

$$ f(x) = w^{T} \Phi (x) + b, $$
(5)

where \(\Phi\) is mapping, \(w\in {R}^{n}\) and b are called weighted and intercept coefficients [28]. This paper used the following optimization problem and the sequential minimal optimization method for determining unknown coefficients

$$ \begin{gathered} Min\,\frac{1}{2}\left\| w \right\|^{2} + C\sum\limits_{i = 1}^{n} {\xi_{i} + \xi_{i}^{*} } \hfill \\ s.t\,\,\,\,\,\,y_{i} - w^{{^{T} }} x - b \le \varepsilon + \xi_{i} , \hfill \\ \,\,\,\,\,\,\,\,\,\,w^{{^{T} }} x + b - y_{i} \ge \varepsilon + \xi_{i,}^{*} \hfill \\ \,\,\,\,\,\,\,\,\,\,(\xi_{i} ,\xi_{i}^{*} ) \ge 0, \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\, \hfill \\ \end{gathered} $$
(6)

where the constant C and ε are related to maximum acceptable error and the variables \({}_{i}\) and \({}_{i}^{*}\) represent the extent of exceeding the acceptable error ε [29, 30].

2.6 Modified support vector regression

MSVR is a variation of SVR specifically designed for long-term prediction. The method consists of two main steps. In the first step, the given time series, which spans the period [0, T], is divided into two distinct subsets: Subset 1 and Subset 2. Subset 1 is defined on the interval [0, T1], while Subset 2 is defined on the interval [T1 + 1, T]. In this step, SVR is applied to Subset 1 to determine the unknown parameters of the model. In the second step, the model obtained from Step 1 is utilized to predict the values of the time series in the interval [T1 + 1, T]. In this step, the error of the model is calculated and utilized to modify the output of the model. Algorithm 1 provides a detailed description of this process.

MSVR, a variant of SVR, is specifically tailored for long-term predictions. The method involves a three-step process:

  • Data segmentation The initial time series, spanning from 0 to T, is segmented into two distinct subsets: Subset 1 and Subset 2. Subset 1 covers the interval [0, T1], while Subset 2 spans [T1 + 1, T]. Subset 1 is utilized to train the SVR model, and Subset 2 is reserved for testing. Adjustment parameters are determined based on the accuracy of the SVR model when tested on Subset 2 (Step 3).

  • SVR model training The regression SVR model is established using Subset 1.

  • Prediction and model refinement Employing the model obtained in Step 2, the values of the time series in the range [T1, T] are predicted. The prediction error is utilized to refine and modify the derived regression model.

The detailed step-by-step process is provided in Algorithm 1. This methodology enables MSVR to iteratively improve predictions by iteratively adjusting based on the test set’s errors, thereby enhancing the accuracy of long-term forecasting.

Algorithm 1
figure a

Modified support vector regression

3 Results

In this section, we assess the effectiveness of the MSVR method and compare it with SVR, NLR, and FNN for electricity price forecasting. Our experimental findings demonstrate that for predicting the electricity price for the next 7 months (F = 7), modifying SVR by considering only 3 elements (k = 3) yields satisfactory results. Additionally, we demonstrate that GVM produces reliable predictions for the electricity price 1 month-ahead, where the reciprocal of the input is taken into account.

To compare the results, we employ the mean average percentage error (MAPE) as our evaluation metric. MAPE is commonly used in practical applications due to its scale independence [22]. The efficiency of a forecasting method is classified into four categories based on the MAPE value, as shown in Table 1.

Table 1 A scale of judgement for prediction accuracy

To facilitate a comprehensive comparison, aside from MAPE, this study also incorporates Mean Absolute Error (MAE)[6] and Root Mean Square Error (RMSE) as evaluation metrics for long-term prediction [31].This section can be divided into subheadings to provide a structured and clear presentation of the experimental results. The subheadings are experimental results, their interpretation, and experimental conclusions.

3.1 Bulgaria

3.1.1 Month-ahead prediction

The monthly electricity prices spanning from July 2021 to October 2021 are taken as the input for GVM to predict the electricity price for November 2021. The obtained results, shown in Table 2 where R-MAPE and F-MAPE are the MAPE of simulated and MAPE of predicted data respectively. The results demonstrate that the GVM method exhibits a high level of accuracy in its predictions.

Table 2 The GVM result for month-ahead electricity price prediction in Bulgaria

3.1.2 Long-term prediction

The monthly electricity prices from October 2016 to August 2022 are used as input data for SVR, NLR and FNN to predict the electricity prices from February 2022 to September 2022. The actual and predicted results for the NLR and FNN methods are depicted in Figs. 1 and 2, respectively.

Fig. 1
figure 1

Actual and predicted monthly electricity prices (Feb 2022–Sep 2022) utilizing NLR

Fig. 2
figure 2

Actual and predicted monthly electricity prices (Feb 2022–Sep 2022) using FNN

To apply Algorithm 1, the SVR method is first utilized to calculate the monthly electricity prices for the period November 2021 to September 2022. Subsequently, the monthly electricity prices are predicted for the period February 2022 to September 2022 using both SVR and MSVR. The actual and predicted values by SVR and MSVR are plotted in Figs. 3 and 4, respectively.

Fig. 3
figure 3

Actual and predicted monthly electricity prices (Nov 2021–Sep 2022) using SVR

Fig. 4
figure 4

Actual and predicted monthly electricity prices (Nov 2021–Sep 2022) using MSVR

Figure 3 illustrates that SVR accurately predicts the trends and peaks of the monthly electricity prices in Bulgaria, while Fig. 4 displays the modified values obtained through MSVR. A comparison of the accuracy of long-term prediction methods is presented in Table 3, which indicates that MSVR achieves a high level of accuracy in long-term predictions.

Table 3 Comparison of different methods for long-term monthly electricity price prediction in Bulgaria

3.2 Greece

3.2.1 Month-ahead prediction

The monthly electricity prices spanning from September 2021 to December 2021 are taken as the input for GVM to predict the electricity price for January 2022. The obtained results, shown in Table 4, demonstrate that the GVM method exhibits a high level of accuracy in its predictions.

Table 4 The GVM result for month-ahead electricity price prediction in Greece

3.2.2 Long-term prediction

The monthly electricity prices from October 2016 to March 2022 are used as input data for NLR and FNN to predict the electricity prices from April 2022 to November 2022. The actual and predicted results for the NLR and FNN methods are depicted in Figs. 5 and 6, respectively.

Fig. 5
figure 5

Actual and predicted monthly electricity prices (Apr 2022–Nov 2022) using NLR

Fig. 6
figure 6

Actual and predicted monthly electricity prices (Apr 2022–Nov 2022) using FNN

To apply Algorithm 1, the SVR method is first utilized to calculate the monthly electricity prices for the period January 2022 to November 2022. Subsequently, the monthly electricity prices are predicted for the period April 2022 to November 2022 using both SVR and MSVR. The actual and predicted values by SVR and MSVR are plotted in Figs. 7 and 8, respectively.

Fig. 7
figure 7

Actual and predicted monthly electricity prices (Jan 2022–Nov 2022) using SVR

Fig. 8
figure 8

Actual and predicted monthly electricity prices (Jan 2022–Nov 2022) using MSVR

Figure 7 illustrates that SVR accurately predicts the trends and peaks of the monthly electricity prices in Greece, while Fig. 8 displays the modified values obtained through MSVR. A comparison of the accuracy of long-term prediction methods is presented in Table 5, which indicates that MSVR achieves a high level of accuracy in long-term predictions.

Table 5 Comparison of different methods for long-term monthly electricity price prediction in Greece

3.3 Hungary

3.3.1 Month-ahead prediction

The monthly electricity prices spanning from March 2021 to June 2021 are taken as the input for GVM to predict the electricity price for July 2021. The obtained results, shown in Table 6, demonstrate that the GVM method exhibits a high level of accuracy in its predictions.

Table 6 The GVM result for month-ahead electricity price prediction in Hungary

3.3.2 Long-term prediction

The monthly electricity prices from January 2015 to September 2021 are used as input data for NLR and FNN to predict the electricity prices from October 2021 to May 2022. The actual and predicted results for the NLR and FNN methods are depicted in Figs. 9 and 10, respectively.

Fig. 9
figure 9

Actual and predicted monthly electricity prices (Oct 2021–May 2022) using NLR

Fig. 10
figure 10

Actual and predicted monthly electricity prices (Oct 2021–May 2022) using FNN

To apply Algorithm 1, the SVR method is first utilized to calculate the monthly electricity prices for the period July 2021 to May 2022. Subsequently, the monthly electricity prices are predicted for the period Oct. 2021 to May 2022 using both SVR and MSVR. The actual and predicted values by SVR and MSVR are plotted in Figs. 11 and 12, respectively. Figure 11 illustrates that SVR accurately predicts the trends and peaks of the monthly electricity prices in Hungary, while Fig. 12 displays the modified values obtained through MSVR. A comparison of the accuracy of long-term prediction methods is presented in Table 7, which indicates that MSVR achieves reasonable accuracy in long-term predictions.

Fig. 11
figure 11

Actual and predicted monthly electricity prices (Jul 2021–May 2022) using SVR

Fig. 12
figure 12

Actual and predicted monthly electricity prices (Jul 2021–May 2022) using MSVR

Table 7 Comparison of different methods for long-term monthly electricity price prediction in Hungary

3.4 Romania

3.4.1 Month-ahead prediction

The monthly electricity prices spanning from March 2021 to June 2021 are taken as the input for GVM to predict the electricity price for July 2021. The obtained results, shown in Table 8, demonstrate that the GVM method exhibits reasonable accuracy in its predictions.

Table 8 The GVM result for month-ahead electricity price prediction in Romania

3.4.2 Long-term prediction

The monthly electricity prices from Jan 2015 to September 2021 are used as input data for NLR and FNN to predict the electricity prices from October 2021 to May 2022. The actual and predicted results for the NLR and FNN methods are depicted in Figs. 13 and 14, respectively.

Fig. 13
figure 13

Actual and predicted monthly electricity prices (Oct 2021–May 2022) using NLR

Fig. 14
figure 14

Actual and predicted monthly electricity prices (Oct 2021–May 2022) using FNN

To apply Algorithm 1, the SVR method is first utilized to calculate the monthly electricity prices for the period July 2021 to May 2022. Subsequently, the monthly electricity prices are predicted for the period October 2021 to May 2022 using both SVR and MSVR. The actual and predicted values by SVR and MSVR are plotted in Figs. 15 and 16, respectively.

Fig. 15
figure 15

Actual and predicted monthly electricity prices (Jul 2021–May 2022) using SVR

Fig. 16
figure 16

Actual and predicted monthly electricity prices (Jul 2021–May 2022) using MSVR

Figure 15 illustrates that SVR accurately predicts the trends and peaks of the monthly electricity prices in Romania, while Fig. 16 displays the modified values obtained through MSVR. A comparison of the accuracy of long-term prediction methods is presented in Table 9, which indicates that MSVR achieves a high level of accuracy in long-term predictions.

Table 9 Comparison of different methods for long-term monthly electricity price prediction in Romania

4 Conclusion

With the rapid development of technology and digitalization, the electricity market has garnered significant attention from economists, governments, and investors. Accurate prediction of electricity prices can potentially save governments millions of dollars. However, achieving precise predictions poses a considerable challenge due to the intricate interplay of factors affecting electricity production and demand. These factors encompass weather patterns, governmental policies, renewable energy technologies, and fuel costs, all of which are inherently uncertain [32]. Notably, probabilistic models [32] considering these uncertainties may lack robustness and can be significantly influenced by volatile inputs. While there have been numerous studies on short-term electricity price prediction, the research on long-term prediction is relatively limited. This paper focuses on GVM for month-ahead selling price prediction and investigates the efficiency of three long-term prediction methods: NLR, FNN, and SVR.

The methods are applied to monthly electricity prices of four European countries—Bulgaria, Greece, Hungary, and Romania—chosen due to their shared borders and similar weather and economic conditions. The results demonstrate that GVM is an efficient tool for month-ahead electricity price prediction. However, NLR and FNN heavily rely on input parameters, making parameter selection a crucial task. In contrast, SVR and GVM exhibit robustness to their input parameters.

While SVR effectively predicts trends and peaks in monthly electricity prices, its accuracy is not satisfactory. To address this limitation, we propose a modification approach where the first three predicted elements from SVR are adjusted. The results indicate that the MSVR method is efficient for long-term monthly electricity price prediction. However, the values of MAPE are bigger than 5% and its improvement should be considered for future works. In addition, considering the factors such as the amount of renewable energy production, delivering cost, weather and environmental conditions and coal, gas and CO2 prices should be considered for improving the accuracy of the considered short-term forecasting grey model. Future research directions include investigating the efficiency of hybrid GVM-SVR models, exploring more complex and multi variable grey models [33, 34] especially for short-term prediction, and comparing them with recent hybrid neural network forecasting methods across different regions.