
==== Front
Heliyon
Heliyon
Heliyon
2405-8440
Elsevier

S2405-8440(24)12662-X
10.1016/j.heliyon.2024.e36631
e36631
Research Article
RV-FELM: Futures commodity price forecasting based on RIME-VMD algorithm coupled with FA-ELM
Yang Xiong a
Zhang Zihang b
Xu Huihua 2748603179@qq.com
c⁎
a Fuzhou University Zhicheng College, Fuzhou, China
b School of Accounting, Zhongnan University of Economics and Law, Wuhan, China
c Concord University College, Fujian Normal University, Fuzhou, China
⁎ Corresponding author. 2748603179@qq.com
23 8 2024
15 9 2024
23 8 2024
10 17 e3663111 1 2024
14 8 2024
20 8 2024
© 2024 The Author(s)
2024
https://creativecommons.org/licenses/by-nc-nd/4.0/ This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).
Commodity futures are an important hedging tool in material trade, and by accurately predicting prices, countries and firms are able to make informed production and consumption decisions. This paper introduces a novel machine learning ensemble method that combines decomposition algorithms and physical optimization algorithms to predict commodity futures prices. First, the VMD(Variational mode decomposition) is optimized by the RIME algorithm (Rime optimization algorithm) to obtain the optimal modal decomposition results, and the trend and seasonal terms are predicted using the ELM (Extreme Learning Machines) and FA (Fourier Attention) models, respectively, and the results are finally synthesized. The results show that the MAPE(mean absolute percentage error) of one-step, three-step, and six-step methods for predicting crude oil prices are 0.48%, 0.66%, and 0.75%, respectively, and the MAPE of soybean prediction results are 0.22%, 0.27%, and 0.37%, respectively. The empirical results and ablation experiments show that it outperforms other benchmark models in terms of both horizontal and directional accuracy. Notably, it outperforms in predicting soybean futures prices, which demonstrates the ability of our model to better capture the characteristics of both the time and frequency domains of the series, to take sufficient consideration of the series characteristics, and to ensure robustness.

Highlights

• RIME algorithm optimizes VD decomposition, offering strong interpretability and robustness to sequence process.

• Futures prices split into time/frequency domains. Predictions integrated from ELM and Fourier attention models.

• Frequency domain analysis aids in studying seasonality and capturing series fluctuation characteristics.

Keywords

Trend decomposition-RIME-VMD integrated model
Fourier attention
Commodity futures
Crude oil futures prices
Ensemble learning method
==== Body
pmc1 Introduction

Commodities serve as fundamental raw materials pivotal for large-scale industrial and agricultural production and consumption. The fluctuation of their prices exerts a profound impact on a nation's economic activities. Commodity futures, as a vital tool, offer traders essential references and mechanisms to navigate the risks associated with spot price volatility. Facilitating price discovery and hedging, these futures play a crucial role in mitigating uncertainties in the market.

The prediction of commodity futures prices holds immense potential in aiding enterprises to strategize their production and consumption patterns. Furthermore, it contributes significantly to formulating and executing more effective national trade and monetary policies. These predictions aren't confined merely to domestic considerations; they also serve as critical indicators of global economic shifts. However, their predictability is increasingly challenged by a myriad of uncertain factors such as geopolitical dynamics, technological advancements, and the impacts of globalization.

Historically, traditional models like the autoregressive moving average (ARIMA) and autoregressive conditional heteroscedasticity (GARCH) have been employed in futures price prediction. Wang's [1] utilization of the ARIMA model in forecasting agricultural futures showcased promising short-term fitting results, while Chu Dong's [2] adaptation of the ARMA-GARCH model effectively addressed heteroscedasticity concerns in soybean futures' price volatility.

Recent years have witnessed a paradigm shift towards the integration of machine learning methods and optimization algorithms, including artificial neural networks (ANNs), support vector regression (SVR), and genetic algorithms, among others, in the realm of futures price forecasting. Shazly [3] and colleagues amalgamated genetic training and neural networks to enhance oil futures price predictions, leveraging volatility pattern identification to augment prediction accuracy. Similarly, Gao Lin et al. [4] optimized BP neural network parameters through genetic algorithms, yielding more precise futures price predictions compared to conventional BP neural networks. Yang Xiao's [5] application of an optimal SVR model, obtained via a network search method, demonstrated low-error prediction capabilities for China's gold futures prices.

The rapid advancements in artificial intelligence technology have led to an increased suitability of machine learning and diverse intelligent optimization algorithms in forecasting futures prices. This extends beyond financial markets to encompass domains like wind power generation, air quality index, and other nonlinear and highly volatile time series.

The quest to address the inherent nonlinearity and pronounced volatility within intricate time series, spanning diverse domains such as futures prices, wind power generation, and solar radiation, has propelled the exploration of hybrid decomposition methodologies within prediction models. Lu's [6] pioneering work exemplifies this trend, employing a radial basis function (RBF) neural network model integrated with empirical mode decomposition (EMD). By decomposing lengthy correlated sequences into multiple shorter-correlated sub-sequences, Lu markedly enhanced the predictive accuracy of the stock index futures model, underscoring the efficacy of this decomposition strategy. Similarly, Wang Jue [7] and collaborators delved into the fusion of singular spectrum analysis (SSA) with the extreme learning machine (ELM) framework. Their meticulous study encompassed prediction endeavors in corn, crude oil, and gold futures prices. Empirical analysis convincingly demonstrated that the SSA-ELM ensemble learning method consistently outperformed singular AR, SVR, and ANN models, marking a noteworthy advancement in predictive accuracy. In the domain of solar radiation prediction, Sun et al. [8] pioneered the utilization of ensemble empirical mode decomposition as a decomposition methodology, further employing the least squares support vector regression for precise simulation. Their innovative approach yielded high-precision estimations of solar radiation, demonstrating the potential of this hybrid framework in accurately modeling complex environmental variables. Furthermore, Abdoos' [9] groundbreaking work in leveraging variational mode decomposition coupled with the extreme learning machine for wind power generation prediction significantly reduced prediction errors compared to other established hybrid decomposition models and singular predictive models. This achievement underscored the effectiveness of decomposing original time series data, enabling machine learning methods to predict sub-sequences with heightened accuracy and precision. Research by Pekaya et al. [10] investigated the utilization of machine learning algorithms for enhancing revenue projection precision in the metals manufacturing sector. Altan et al. [11] verified the efficacy of complex bio-inspired computational methods in anticipating cryptocurrency market fluctuations. The work of Stefenon et al. [12] introduced an innovative multi-layered predictive system for assessing pollution levels on electrical insulators, exhibiting its resilience when processing intricate ecological information. Within the power industry, Zhang et al. [13] performed an analytical assessment of integrated demand prediction strategies for an urban electricity provider in China, emphasizing the tangible advantages of such amalgamated approaches. Cumulatively, these investigations exemplify the wide-ranging implementations and progressions in chronological data analysis across diverse domains.

This research builds on the innovative foundation laid by Su et al. [14], who pioneered an optimization algorithm inspired by physical phenomena. Their pioneering approach simulates the fine-grained growth dynamics of both soft and hard ice in freezing fog, culminating in an algorithmic framework that replicates the exploration and exploitation behaviors that are crucial in optimization methods. This novel algorithm elaborates a dual strategy that encompasses both soft ice search mechanisms and hard ice puncture methods. This duality greatly enhances the algorithm's ability to integrate exploration and exploitation within the optimization domain. Based on this fundamental concept, this study advances this algorithmic paradigm. The algorithm has been carefully refined to refine the greedy selection mechanism while optimizing the population dynamics at the critical stage of optimal solution selection.

In this paper, the excellent mechanism of the RIME optimization algorithm is utilized to effectively strengthen the decomposition capability of the VMD, which makes the trend and seasonal terms of the decomposition results more prominent, and then the two are integrated into the forecasting using the ELM and FA models, respectively, to provide a comprehensive and detailed capture of the sequence characteristics in both the time and frequency domains. The core objective is to predict crude oil futures prices, which are critical in commodity futures. Rigorous testing confirms that the accuracy of the algorithmic model we have developed has improved significantly. This validation highlights the potential of our improved framework, demonstrating its robustness in real-world forecasting.

2 Variable description

Our research employs a range of factors to examine and anticipate the valuation of raw material forward contracts. The subsequent segment elaborates on these factors:• Original Time Series (xt): This represents the actual futures price at time t. It serves as the foundational data for our predictions.

• Predicted Value (xˆt+m): This denotes the predicted value of the futures price m steps ahead at time t. This value is obtained through the TD-RIME-VG ensemble learning method.

• Lag Order (k): This indicates the lag order used in the prediction model. In this study, k is set to 5, meaning the prediction for m days ahead is influenced by the previous 5 days' data.

• Mean Absolute Percentage Error (MAPE): This metric evaluates the level error between the predicted values and the actual values. It is calculated as Eq. (1):(1) MAPE=1T∑t=1T|xt−xˆtxt|×100%

• Normalized Root Mean Square Error (NRMSE): This metric assesses the normalized level error of the prediction model. It is calculated as Eq. (2):(2) NRMSE=1T∑t=1T(xt−xˆt)2×1x¯×100%

• Directional Symmetry Statistic (DS): Calculates the percentage of correctly predicted directions, evaluating a model's ability to forecast trend changes. It is calculated as Eq. (3):(3) DS=1T∑t=2Tdt×100%

where dt is defined as Eq. (4):(4) dt={1if (xt−xt−1)(xˆt−xt−1)>00otherwise

• Diebold-Mariano Statistic (DM): A measure that compares the forecast accuracy of two competing models, assessing if their prediction errors differ significantly.

• Pesaran-Timmermann Statistic (PT): Gauges the consistency between predicted and actual directional changes, testing the directional accuracy of forecasts.

3 Construction of RV-FELM method

This section provides a comprehensive overview of three key components: the Variational Mode Decomposition (VMD) decomposition algorithm, the RIME algorithm rooted in physical phenomena, and the Fourier Attention model, each of which is a key aspect of the field of commodity futures price forecasting modeling.

3.1 Variational mode decomposition

The Variational Mode Decomposition (VMD) method, conceptualized by Dragomiretskiy and Zosso in 2014 [15], stands as a pivotal signal decomposition technique characterized by its adaptability and non-recursiveness. This innovative approach possesses a distinct capability to effectively address the challenges posed by highly volatile and nonlinear time series data. By decomposing such complex data into multiple relatively stationary sub-sequences, VMD triumphs over conventional EMD decomposition methods [16] by mitigating issues such as end-point effects and mode mixing. Notably, VMD boasts a more robust mathematical theoretical foundation, elevating its applicability and reliability in real-world scenarios. The fundamental principle underlying VMD centers on the formulation and resolution of variational problems. This core concept enables VMD to achieve its decomposition objectives, facilitating the extraction of intrinsic mode functions in a manner that circumvents the limitations encountered by traditional methods. By leveraging variational optimization, VMD engenders a framework capable of disentangling intricate time series data into parts, offering a profound advancement in signal decomposition methodologies.

1. Construction of the variational problem (1) Calculate the analytic signal of each uk(t), uk(t) by using the Hilbert transform as Eq. (5):(5) [δ(t)+jπt]⋅uk(t)

(2) Adjust each uk(t), uk(t) to the corresponding base frequency band by using exponential correction as Eq. (6):(6) [(δ(t)+jπt)⋅uk(t)]e−jωkt

(3) Calculate the squared norm of the gradient of the above signal, estimate the width of each uk(t), uk(t) and construct the following constrained variational problem as Eq. (7):(7) min{uk,wk}{∑k‖∂t[(δ(t)+jπt)⋅uk(t)]e−jωkt‖22} s.t. ∑kuk=f

Where u1,u2,…,uk are the K modal functions obtained by VMD decomposition, and w1,w2,…,wk are the frequency centers of each modal component.

2. Solution of the variational problem (1) This paper introduces the quadratic penalty factor α and the Lagrange operator λ(t), and transform the constrained variational problem into an unconstrained variational problem. The extended Lagrange expression is Eq. (8):(8) L({uk},{wk},λ)=α∑k‖∂t[(δ(t)+jπt)⋅uk(t)]e−jωkt‖22+‖x(t)−∑kuk(t)‖22+〈λ(t),x(t)−∑kuk(t)〉

(2) This paper uses the alternating direction method of multipliers to solve the above variational problem, and dynamically alternate updating ukn+1, wkn+1 and γn+1, to find the “saddle point” of the extended Lagrange expression, that is, to update the center frequency and bandwidth of each modal component.

3.2 RIME optimization algorithm

This study takes cues from rime-ice growth, introducing a soft-rime search strategy that mimics particle motion for algorithm search. It also proposes a hard-rime puncture mechanism simulating crossover behavior among hard rime agents to enhance algorithm exploration. Additionally, improvements in the metaheuristic algorithm's selection mechanism, including a novel positive greedy selection mechanism, are suggested. The culmination of these advancements results in the RIME algorithm, showcasing enhanced performance by integrating these three mechanisms.

3.2.1 Rime cluster initialization

Motivated by real-world scenarios, this paper regards each rime agent as the focal agent of the algorithm, with the collective of these agents forming the rime-population, which embodies the algorithm's overall population. Initially, the entire rime-population, denoted as R, undergoes initialization. This population consists of rime agents (S), wherein each rime-agent comprises d rime-particles (Xij) as illustrated and detailed in Eq. (1). Consequently, the rime-population R can be directly represented by the rime-particles Xii, as indicated in Eq. (9), (10).(9) R=[S1S2⋮Si],Si=[xi1xi2⋯xij]

(10) R=[x11x12⋯x1jx21x22⋯x2j⋮⋮⋱⋮xi1xi2⋯xij].

3.2.2 Soft-rime search strategy

In a dynamic environment, the growth of soft rime exhibits pronounced randomness, allowing rime particles to freely cover a substantial portion of an attached object's surface while gradually expanding in a consistent direction. Drawing inspiration from the behavior of soft rime growth, this study introduces a soft-rime search strategy leveraging the potent randomness and expansive coverage of rime particles. This strategy facilitates swift coverage of the entire search space during initial iterations, mitigating susceptibility to local optima.

The positional calculation of the rime particles is delineated in Eq. (11):(11) Rijnew =Rbest ,j+r1⋅cos⁡θ⋅β⋅(h⋅(Ubij−Lbij)+Lbij),r2<E

Where, Rijnew  represents the updated particle's new position, where i and j refer to the j−th particle within the i−th rime-agent. Meanwhile, Rbest ,j denotes the j−th particle belonging to the best rime-agent within the rime-population, R. The parameter r1 assumes a random value within the range (-1,1) and influences the direction of particle movement in conjunction with the cosine function.

3.2.3 Hard-rime puncture mechanism

Eq. (12) defines the hard-rimepuncture mechanism for updating particle positions:(12) Rijnew =Rbest ,j,r3<Fnormr (Si)

Where, Rijnew  denotes the new position of the updated particle. Meanwhile, Rbest ,j represents the j−th particle of the best rime-agent within the rime-population, R. Additionally, Rpnormr(Si) refers to the normalized value of the current agent's fitness, signifying the probability of selection for the i−th rime-agent. Furthermore, r3 is a random number within the range (-1,1).

3.2.4 Positive greedy selection mechanism

Su et al. introduces an enhanced aggressive greedy selection approach, comparing updated fitness values of agents with their pre-update values, replacing both fitness and solution if an improvement occurs. This mechanism actively maintains high-quality agents, enhancing global solutions, while also facilitating population evolution toward optimal directions.

3.3 Proposed RIME algorithm

In this paper, a novel stepwise search and exploitation strategy, influenced by soft-rime particle movements, constitutes the algorithm's core optimization method. Subsequently, a hard-rime puncture mechanism, inspired by hard-rime agent crossover, facilitates dimensional interchange between ordinary and optimal agents, enhancing solution accuracy. Moreover, an improved positive greedy selection mechanism, rooted in the greedy selection principle, aims to bolster population diversity and mitigate local optima by altering optimal solution selection. As shown in Fig. 1.Figure 1 RIME Algorithm Construction Framework.

Figure 1

3.4 Construction method of RV-FELM model

In order to improve the prediction accuracy of commodity futures prices, this paper proposes a new RV-FELM ensemble learning method based on VMD decomposition, Fourier Attention prediction model ELM model and RIME optimization algorithm. The construction framework of the ensemble learning method is shown in Fig. 1. The specific construction algorithm of RV-FELM is as follows:(1) Decompose the highly volatile nonlinear price series into several reasonable subsequences using the VMD algorithm based on the RIME optimization algorithm.

(2) Deconstruct the trend term and seasonal term using ELM model and FA model, and forecast them separately, frequency domain Attention can erase the high-frequency noise in the seasonal data, which is more robust.

(3) Integrate the prediction results in time domain and frequency domain separately and compare with the original series.

4 Empirical analysis of the prediction performance of RV-FELM ensemble learning method

In this section, the RV-FELM ensemble learning method is used to predict the crude oil commodity futures prices at different forward steps, and the prediction results of the ensemble learning method are analyzed for errors and examined, and the prediction performance of the RV-FELM ensemble learning method is comparatively analyzed. The framework diagram is shown in Fig. 2.Figure 2 Construction Framework of RV-FELM Ensemble Learning Method.

Figure 2

4.1 Data description and evaluation criteria

In Fig. 3, the commodity futures price data utilized in this study comprises the daily West Texas Intermediate (WTI) crude oil futures prices traded on the New York Stock Exchange spanning from January 4, 2000, to February 28, 2020, encompassing a total of 5138 closing price observations across trading days, obtained from the Wind database. This dataset is partitioned into two distinct subsets: the training set and the test set. The training set, covering the period from January 4, 2000, to December 31, 2018, encompasses 4829 trading days of data and serves the purpose of model training. Meanwhile, the test set, comprising data from January 1, 2019, to February 28, 2020, includes 309 trading days and is employed to assess the predictive accuracy of the model.Figure 3 Original data of WTI crude oil futures price.

Figure 3

Prediction levels of different steps forward are used to test the prediction accuracy of RV-FELM ensemble learning method. The time series of WTI crude oil futures prices is set as xt(t=1,2,...,T). The prediction method can be formulated as Eq. (13):(13) xˆt+m=f(xt+xt−1+…+xt−(k−1)),t=1,2,…,T

Where xˆt+m represents the predicted value m steps forward of the original sequence at time t, xt represents the actual value of the original sequence at time t, and k represents the order of lag. In this paper, k is set to 5, that is, the prediction on the m day in the future is affected by the previous 5 days in history. m is selected as 1, 3 and 6, that is, this paper makes a forward, three-step and six-step forecast for crude oil commodity futures prices.

In assessing the predictive prowess of the model, this study adopts evaluation criteria from two vantage points: level accuracy and directional accuracy. Level accuracy gauges the alignment between the model's predicted values and the actual values, while directional accuracy assesses the consistency in the directional change between the model's predicted values and the actual values. Level accuracy is appraised using two metrics: mean absolute percentage error (MAPE) and normalized root mean square error (NRMSE). Directional accuracy is measured through the directional symmetry statistic (DS). The formulas for each indicator are provided as Eq. (14) ∼ (16)(14) MAPE=1T∑t=1T|xt−xˆtxt|×100%

(15)  NRMSE =1x¯1T∑t=1T(xt−xˆt)2×100%

(16) DS=1T∑t=2Tdt×100%, where dt={1 if (xt−xt−1)(xˆt−xt−1)>00 otherwise 

below:

Where xt and xˆt are the actual and predicted values of the test set samples, x is the sample mean value of the test set, and T is the number of samples in the test set.

Furthermore, for a comprehensive assessment of both the level and directional prediction performances through a statistical lens, the study employs the Diebold-Mariano (DM) statistic and the Pesaran-Timmermann (PM) statistic. The DM statistic serves to ascertain if there exists a significant difference in the prediction accuracy among various models [17], while the PM statistic aims to establish the consistency of directional changes between the model's predicted values and the actual values [18].

4.2 Benchmark models and parameter settings

For comparison purposes, this paper uses some other traditional prediction methods as benchmark models, and compares them with the RV-FELM ensemble learning method in terms of prediction performance. According to the previous literature review, the models commonly used to predict futures prices are ARIMA, ANN and SVR. ARIMA is a typical method for predicting time series, and its ability to capture linear relationships is excellent. ANN and SVR are popular machine learning techniques, and since there are many network structures and methods for ANN, this paper only uses ELM, which has superior performance and wide application, as a representative of ANN methods. Therefore, there are four prediction models without decomposition methods as comparison benchmarks, namely ARIMA, SVR, ELM and RIME-ELM. In order to test the decomposition effect of VMD on crude oil commodity futures prices, this paper also adds EEMD decomposition method to compare with VMD, so there are two more hybrid decomposition models as benchmarks, namely EEMD-ELM and RIME-EEMD-ELM.

Parameters are crucial for model performance, and this paper gives a unified explanation of the parameters of the models involved in the test. For the ELM model, the number of hidden layer neurons is set to 10, and the activation function of hidden layer neurons is sigmoid function. For the SVR model, the cost parameter is set to 1, the γ parameter is set to 0.2, the ε parameter is set to 0.01, and the kernel function is RBF kernel function. In the ARIMA(p-d-q) model, the optimal form of parameters is determined by the autocorrelation plot and partial autocorrelation plot, as well as the AIC and BIC criteria. For the EEMD decomposition, the number of ensembles is set to 50, and the standard deviation of added white noise is set to 0.1. For the VMD decomposition, the number of modes K is set to 10, and the discrimination accuracy ε is set to 10-7. The daily data sequence of WTI crude oil futures price is decomposed by VMD into 10 BIMF (bandwidth intrinsic mode function) sub-sequences, as shown in Fig. 4.Figure 4 BIMFs after VMD decomposition.

Figure 4

4.3 RIME-VMD module

This section presents the results of VMD parameter optimization using the RIME algorithm. We provide convergence curves and optimization outcomes for the VMD parameters k and alpha. Our experiments determined the optimal values to be K=10 and alpha=2500.

We analyzed Hilbert marginal spectra to obtain the energy distribution of signals across frequencies, assessing time series volatility and enhancing RIME algorithm interpretability. This analysis offers insights into how RIME decomposes and processes signals, as illustrated in Figure 5, Figure 6.Figure 5 Convergence curve.

Figure 5

Figure 6 Hilbert marginal spectrum.

Figure 6

The experimental section provides detailed visualizations and explanations, demonstrating RIME's effectiveness in optimizing VMD parameters and its utility in time series analysis.

4.4 Prediction accuracy analysis

4.4.1 Level prediction accuracy analysis

The level accuracy of the prediction model is represented by two indicators: MAPE and NRMSE. Fig. 7 and Fig. 8 show the level prediction performance of the prediction model at different prediction levels.Figure 7 Comparison of MAPE results of prediction models.

Figure 7

Figure 8 Comparison of NRMSE results of prediction models.

Figure 8

Figure 7, Figure 8 yield the following insights:

1) RV-FELM demonstrates significant advantages in one-step, three-step, and six-step prediction accuracy, with MAPE values of 0.48%, 0.66%, and 0.75%, and NRMSE values of 0.65%, 0.88%, and 1.00 respectively. These values outperform other benchmark models across various prediction intervals, underscoring the method's minimal prediction errors and exceptional accuracy in forecasting commodity futures prices. 2) Hybrid decomposition methods notably elevate the hierarchical accuracy of prediction models. EEMD and VMD effectively transform non-stationary futures price sequences into stationary subsequences, markedly enhancing the horizontal predictive performance of individual models. 3) RV-FELM's predictive capability for commodity futures prices surpasses that of RIME-EEMD-ELM, indicating VMD's superior decomposition effect on commodity futures prices compared to EEMD.4) Models optimized by RIME, particularly ELM, exhibit heightened horizontal accuracy compared to single ELM models. This enhancement underscores RIME's effectiveness in optimizing the initial connection weights and thresholds of ELM, thus enhancing its level prediction performance. 5) Prediction models utilizing hybrid decomposition methods display greater stability in long-term forecasting of commodity futures prices. With increasing forward steps, the rate of prediction error escalation is slower, contrasting models without decomposition methods. 6) Among the forecasting models without decomposition methods, RIME-ELM has the most robust horizontal forecasting performance, followed by LSTM(Long short-term memory), while ELM, SVR, ANN and ARIMA have comparable horizontal forecasting accuracy. This suggests that the difference in the forecasting effectiveness of the individual conventional models for commodity futures prices is minimal.

The DM test is further applied to evaluate the significance of the difference in level prediction performance between models. As shown in Table 1, Table 2 and Table 3, it can be seen that at different prediction levels with different forward steps, the level prediction accuracy of RV-FELM ensemble learning method is significantly different from that of other benchmark models, the models with hybrid decomposition methods are significantly different from those without decomposition methods in terms of level accuracy, RIME-ELM is significantly different from other single models in terms of level accuracy, and there is no significant difference in level prediction accuracy between ELM, SVR and ARIMA. The test results are consistent with the above conclusions.Table 1 DM Test Results of Models for One-Step Ahead Prediction.

Table 1Method	Benchmark model	
RI-EE-ELM	EE-ELM	RI-ELM	ELM	LSTM	ANN	SVR	ARIMA	
RV-FELM	-4.5212***	-4.8629***	-5.0617***	-5.3123***	-4.9235***	-5.3571***	-5.3741***	-5.4012***	
(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	
RI-EE-ELM		-2.8712***	-4.356***	-4.3641***	-4.4781***	-4.5125***	-4.7155***	-5.1265***	
	(0.0012)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	
EE-ELM			-4.3125***	-4.4651***	-4.7012***	-4.6981***	-4.7134***	-4.9216***	
		(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	
RIME-ELM				-2.3731***	-2.4512***	-2.5331***	-2.6313***	-2.7012***	
			(0.1325)	(0.0134)	(0.0121)	(0.0112)	(0.0106)	
ELM					-0.3968(0.2993)	0.4735(0.5145)	0.6687(0.7801)	0.8084(0.8973)	
LSTM						-0.8125(0.3801)	0.5117(0.6827)	0.7121(0.7768)	
ANN							-0.7124(0.4612)	0.3016(0.7543)	
SVR								0.8635(0.3911)	

Table 2 DM Test Results of Models for Three-Step Ahead Prediction.

Table 2Method	Benchmark model	
RI-EE-ELM	EE-ELM	RI-ELM	ELM	SVR	ARIMA	
RV-FELM	-4.3132***	-4.7519***	-5.2147***	-5.0143***	-5.3041***	-5.3542***	
(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	
RI-EE-ELM		-2.2412***	-6.8164***	-6.6705***	-6.6831***	-6.9135***	
	(0.0141)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	
EE-ELM			-7.1451***	-7.3082***	-7.1061***	-7.0374***	
		(0.0000)	(0.0000)	(0.0000)	(0.0000)	
RIME-ELM				-1.5152***	-1.7531***	-1.8013***	
			(0.0704)	(0.0691)	(0.0715)	
ELM					-0.4615(0.3112)	0.3616(0.7125)	
SVR						0.6174(0.4621)	

Table 3 DM Test Results of Models for Six-Step Ahead Prediction.

Table 3Method	Benchmark model	
RI-EE-ELM	EE-ELM	RI-ELM	ELM	SVR	ARIMA	
RV-FELM	-5.5132***	-5.4126***	-6.2117***	-6.5573***	-5.3741***	-6.4018***	
(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	
RI-EE-ELM		-2.4313***	-4.356***	-5.7511***	-5.6579***	-6.0573***	
	(0.0141)	(0.0000)	(0.0000)	(0.0000)	(0.0000)	
EE-ELM			-5.9052***	-5.6848***	-5.5988***	-5.9842***	
		(0.0000)	(0.0000)	(0.0000)	(0.0000)	
RIME-ELM				-2.2742***	-2.1725***	-3.3846***	
			(0.0230)	(0.0298)	(0.0007)	
ELM					-1.1124(0.2660)	0.6232(0.5332)	
SVR						0.3957(0.6923)	

4.4.2 Direction prediction accuracy analysis

The direction accuracy of the prediction model is represented by the DS indicator. Fig. 9 shows the direction prediction performance of the prediction model at different prediction levels.Figure 9 Comparison of DS Results of Prediction Models.

Figure 9

Fig. 9 yields the following conclusions:

1) RV-FELM demonstrates superior direction prediction abilities across one-step, three-step, and six-step predictions, with DS statistics of 89.94%, 83.77%, and 83.42%, respectively, outperforming other benchmark models at various prediction horizons. This highlights the ensemble method's robust capability in accurately forecasting future trends and directional changes in commodity futures prices. 2) Models employing hybrid decomposition methods exhibit notably enhanced direction accuracy across diverse prediction intervals compared to those without decomposition methods. VMD and EEMD(Ensemble empirical mode decomposition) decomposition methods significantly bolster the directional prediction performance of individual models. 3) Among different forward steps, RV-FELM showcases superior directional prediction effectiveness over RIME-EEMD-ELM, underscoring VMD's more pronounced enhancement on the model's directional prediction capabilities compared to EEMD. 4) Across models with or without decomposition methods, RIME-optimized ELM demonstrates superior directional accuracy over single ELM models, illustrating the capacity of RIME parameter optimization to enhance ELM's directional prediction performance. 5) The directional accuracy of models employing hybrid decomposition methods notably declines as the number of forward steps increases, indicating a substantial short-term enhancement in directional prediction performance through decomposition methods that diminishes over time. In contrast, models without decomposition methods maintain a DS indicator around 50%, suggesting no significant deviation in directional prediction accuracy compared to random guessing in predicting futures price changes.

The PT test is further applied to evaluate the significance of the superior direction prediction performance of each model. As shown in Table 4, it can be seen that the change direction of the prediction values and the actual values of the hybrid decomposition models are consistent, while the direction prediction performance of the models without decomposition is not ideal. The test results are consistent with the above conclusions.Table 4 PT Test Results of Prediction Models.

Table 4Forecasting horizons	Model		
RV-FELM	RI-EE-ELM	EE-ELM	RI-ELM	ELM	SVR	ARIMA	
One-step-ahead	13.9196***	11.8664***	11.7549***	1.4286*	-1.2566	-2.2308	-2.2558	
(0.0000)	(0.0000)	(0.0000)	(0.0766)	(0.8955)	(0.9872)	(0.9880)	
Three-step-ahead	11.7521***	10.2592***	11.2869***	0.0943	0.5072	0.7267	0.4067	
(0.0000)	(0.0000)	(0.0000)	(0.4642)	(0.3060)	(0.2337)	(0.3421)	
Six-step-ahead	11.7482***	9.6468***	5.9210***	0.3250	0.0671	0.3606	-0.1275	
(0.0000)	(0.0000)	(0.0000)	(0.3726)	(0.4733)	(0.3592)	(0.5507)	

This indicates the advantage of RV-FELM ensemble learning method in direction prediction, and the important role of decomposition methods in improving the direction prediction performance of the model. Therefore, this paper considers RV-FELM ensemble learning method as an effective method for predicting commodity futures prices, which can achieve good results in both level accuracy and direction accuracy.

4.5 Robustness analysis

To examine the reliability of the RV-FELM ensemble learning method in forecasting commodity futures prices, this research opts for the daily data of soybean futures prices traded on the Chicago Board of Trade (CBOT) as a fresh dataset for testing purposes. The dataset mirrors the time span, training and test sample sizes identical to those of the WTI crude oil futures price dataset, obtained from the Wind database. Fig. 10 presents the raw daily data portraying CBOT soybean futures prices.Figure 10 Original Data of CBOT Soybean Futures Price.

Figure 10

Fig. 10 illustrates the output generated by the RV-FELM ensemble learning method for the novel test sample, showcasing a notably close alignment between the prediction output and the actual expected values. This alignment signifies the sustained exceptional predictive capability of RV-FELM in forecasting soybean futures prices. To contrast this advantage, EEMD-ELM and ARIMA models undergo testing across various prediction levels, with results presented in Table 5. Notably, RV-FELM consistently exhibits markedly superior MAPE, NRMSE, and DS indicators compared to EEMD-ELM and ARIMA at diverse prediction intervals, indicating its heightened accuracy in predicting CBOT soybean futures prices. Fig. 11 shows how the RV-FELM model performs on the CBOT dataset. These findings further underscore the robustness and superior predictive performance of the RV-FELM ensemble learning method.Table 5 Prediction Results of CBOT Soybean Futures Price.

Table 5Forecasting horizons	Value	Model	
RV-FELM	EE-ELM	RIME-ELM	ARIMA	ANN	LSTM	
One-step-ahead	MAPE (%)	0.22	0.42	0.38	0.71	1.27	0.46	
NRMAE (%)	0.27	0.53	0.41	0.91	1.59	0.55	
DS (%)	89.94	82.47	76.17	50.97	39.76	75.28	


	
Three-step-ahead	MAPE (%)	0.27	0.45	0.43	1.27	1.45	0.51	
NRMAE (%)	0.34	0.58	0.47	1.62	2.12	0.64	
DS (%)	86.36	77.27	72.16	50.65	35.14	71.23	


	
Six-step-ahead	MAPE (%)	0.37	0.62	0.54	1.86	1.61	0.58	
NRMAE (%)	0.49	0.79	0.52	2.31	2.74	0.74	
DS (%)	82.14	66.88	68.19	47.40	31.27	66.37	

Figure 11 CBOT Soybean Futures Price Test Set Forecasts.

Figure 11

5 Conclusion and prospect

In this paper, a new RV-FELM ensemble learning method based on decomposition and optimization algorithm is proposed and used to predict commodity futures prices. Firstly, RIME physical optimization algorithm is used to improve the VMD decomposition performance, and then commodity futures price data is decomposed into a series of BIMF subsequences. Then, according to different sequence characteristics, the ELM and FA models are used to predict the sequence from both time domain and frequency domain perspectives, and the obtained results are integrated to obtain the final prediction results.

The empirical results show that the RV-FELM ensemble learning method has significantly better prediction effects for one-step, three-step, and six-step ahead predictions of commodity futures price series than other benchmark models. The results of DM test and PT test verify that the RV-FELM ensemble learning method proposed in this paper can make more effective predictions for commodity futures prices in both level accuracy and direction accuracy. In addition, the prediction accuracy of RV-FELM ensemble learning method is tested again with a new sample of commodity futures price, CBOT soybean futures price, and it is found that its prediction performance is still superior, which proves that RV-FELM ensemble learning method has good robustness.

Compared with the traditional single prediction method, the ensemble learning method based on decomposition and optimization algorithm proposed in this paper has higher prediction accuracy and direction prediction accuracy for nonlinear and highly fluctuating time series. Its main contributions are three:

(1) The VMD algorithm decomposes the nonlinear and highly variable time series into a series of stationary BIMF subseries without any prior information. This reduces the difficulty of predicting the original time series by a single prediction model and significantly improves the prediction accuracy. (2) RIME algorithm is a new optimization algorithm based on physics, which has a high interpretability and generalization. Therefore, it can optimize the parameters of each part quickly and improve the prediction accuracy of the model without affecting the prediction speed. (3) The sequence is processed in different dimensions in the time domain and frequency domain to effectively capture the internal features of the sequence, and the FA algorithm can effectively remove the noise in the frequency domain to achieve accurate prediction of the frequency domain sequence.

The RV-FELM integrated learning method proposed in this paper can be extended to air quality prediction, wind speed prediction, electricity price prediction and other fields. Future research will explore the following aspects: (1) In terms of algorithms, more machine learning methods will be compared, and new algorithms will be used to replace the simple additive integral in the hybrid decomposition model, so as to further improve the prediction accuracy of ensemble learning methods; (2) In terms of variables, it can be extended from univariate time series prediction to multivariate time series prediction, such as taking other factors affecting commodity futures prices as input variables to make multivariate commodity futures price prediction; (3) For time series with high volatility, FA model can be used to effectively de-noise high-frequency sequence features to achieve accurate capture and processing of useful information, so as to better predict sequence fluctuations.

Funding

This work is partially supported by the Innovation Strategy Research Plan Project of Fujian Province under Grant No. 2023R0034 , and also by the 10.13039/501100020783 Social Science Planning Project of Fujian Province under Grant No. FJ2021C026 .

For ethics approval

Review and/or approval by an ethics committee was not needed for this study because this is not a medical article, there are no ethical issues involved.

CRediT authorship contribution statement

Xiong Yang: Writing – original draft, Methodology, Formal analysis, Data curation. Zihang Zhang: Writing – original draft, Visualization, Methodology, Data curation. Huihua Xu: Writing – review & editing, Conceptualization.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Data availability

The data used in this article can be obtained by contacting the corresponding author.
==== Refs
References

1 Wang C. Forecast on price of agricultural futures in China based on arima model Asian Agric. Res. 8 2016 9 16 (1812–2016–144753)
2 Chu D. Comparative study on time series models for predicting soybean futures prices Finance Econ. 12 2015 116 119
3 El Shazly M. Lou A. Comparing the forecasting performance of futures oil prices with genetically evolved neural networks Int. Adv. Econ. Res. 22 2016 361 376
4 Gaol L. Li Q. Research and application of improving bp neural network for futures price Electron. Meas. Technol. 23 2019
5 Yang X. Research on svr intelligent prediction of China's gold futures prices Friends Acc. 17 2017 50 53
6 Huifeng L. Price forecasting of stock index futures based on a new hybrid emd-rbf neural network model Agro Food Ind. Hi-Tech 28 1 2017 1744 1747
7 Wang y. Qi C. Li M. Prediction of commodity prices based on ssa-elm Syst. Eng. Theory Pract. 37 8 2017 2004 2014
8 Sun S. Wang S. Zhang G. Zheng J. A decomposition-clustering-ensemble learning approach for solar radiation forecasting Sol. Energy 163 2018 189 199
9 Abdoos A.A. A new intelligent method based on combination of vmd and elm for short term wind power forecasting Neurocomputing 203 2016 111 120
10 Pekkaya M. Uysal Z. Altan A. Karasu S. Artificial intelligence-based evaluation of the factors affecting the sales of an iron and steel company Turk. J. Electr. Eng. Comput. Sci. 32 1 2024 51 67
11 Altan A. Karasu S. Bekiros S. Digital currency forecasting with chaotic meta-heuristic bio-inspired signal processing techniques Chaos Solitons Fractals 126 2019 325 336
12 Stefenon S.F. Ribeiro M.H.D.M. Nied A. Mariani V.C. Coelho L.D.S. Leithardt V.R.Q. Silva L.A. Seman L.O. Hybrid wavelet stacking ensemble model for insulators contamination forecasting IEEE Access 9 2021 66387 66397
13 Zhang T. Pan Y. Huang L. Zhong X. An empirical study of combinational load forecasting in a city power company of China Energy Rep. 11 2024 637 650
14 Su H. Zhao D. Heidari A.A. Liu L. Zhang X. Mafarja M. Chen H. Rime: a physics-based optimization Neurocomputing 532 2023 183 214
15 Dragomiretskiy K. Zosso D. Variational mode decomposition IEEE Trans. Signal Process. 62 3 2013 531 544
16 Huang N.E. Shen Z. Long S.R. Wu M.C. Shih H.H. Zheng Q. Yen N.-C. Tung C.C. Liu H.H. The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis R. Soc. Lond. Proc., Ser. A, Math. Phys. Eng. Sci. 454 1971 1998 903 995
17 Pesaran M.H. Timmermann A. A simple nonparametric test of predictive performance J. Bus. Econ. Stat. 10 4 1992 461 465
18 Wu Z. Huang N.E. Ensemble empirical mode decomposition: a noise-assisted data analysis method Adv. Adapt. Data Anal. 1 01 2009 1 41
