Next Article in Journal
The Permutation Flow Shop Scheduling Problem with Human Resources: MILP Models, Decoding Procedures, NEH-Based Heuristics, and an Iterated Greedy Algorithm
Previous Article in Journal
Continuous-Control-Set Model Predictive Control for Three-Level DC–DC Converter with Unbalanced Loads in Bipolar Electric Vehicle Charging Stations
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Two-Delay Combination Model for Stock Price Prediction

School of Electrical Engineering, Computing and Mathematical Sciences, Curtin University, Perth, WA 6845, Australia
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(19), 3447; https://doi.org/10.3390/math10193447
Submission received: 4 August 2022 / Revised: 8 September 2022 / Accepted: 8 September 2022 / Published: 22 September 2022

Abstract

:
This paper proposes a new linear combination model to predict the closing prices on multivariate financial data sets. The new approach integrates two delays of deep learning methods called the two-delay combination model. The forecasts are derived from three different deep learning models: the multilayer perceptron (MLP), the convolutional neural network (CNN) and the long short-term memory (LSTM) network. Moreover, the weight combination of our proposed model is estimated using the differential evolution (DE) algorithm. The proposed model is built and tested for three high-frequency stock data in financial markets—Microsoft Corporation (MSFT), Johnson & Johnson (JNJ) and Pfizer Inc. (PFE). The individual and combination forecast methods are compared using the root mean square error (RMSE) and the mean absolute percentage error (MAPE). The state-of-the-art combination models used in this paper are the equal weight (EW), the inverse of RMSE (INV-RMSE) and the variance-no-covariance (VAR-NO-CORR) methods. These comparisons demonstrate that our proposed approach using DE weight’s optimization has significantly lower forecast errors than the individual model and the state-of-the-art weight combination procedures for all experiments. Consequently, combining two delay deep learning models using differential evolution weights can effectively improve the stock price prediction.

1. Introduction

Forecasting time series, mainly stock prices, is a complicated and challenging task for stock market investors. A high accuracy stock price prediction method helps investors make a profit (buying or selling a stock at a specific price) [1]. Motivated by significant profits in stock market investment, researchers and investors have focused on stock price prediction research for decades [2].
In the beginning stage, several parametric statistical models, such as autoregressive moving average (ARMA) [3], autoregressive integrated moving average (ARIMA) [4], vector autoregression (VAR) [5] and the generalized autoregressive conditional heteroskedasticity (GARCH) [6] were used to predict the stock price. Although these models have been widely applied in the prediction of time series, they have poor performance for financial time series analysis due to the limitations of parametric statistics [7]. First, they assume a linear model structure; however, the financial time series observations have a nonlinear pattern.
Secondly, they assume constant variance, while financial time series are noisy and have time-varying volatility [8]. To overcome these issues and improve the accuracy of stock price forecasting, nonlinear machine learning (ML) techniques have been applied for financial prediction. Traditional machine learning models, such as the k-nearest neighbor algorithm (KNN), artificial neural networks (ANNs), support vector machines (SVMs) and random forest (RF), are often utilized to learn the relationship between the features from the technical analysis and price movement [2].
However, in recent years, many studies have revealed that deep learning models are superior to traditional machine learning models in the financial market [9]. The vast majority of deep learning algorithms are supervised techniques, including multilayer perceptron (MLP), convolutional neural network (CNN) and long short-term memory (LSTM) networks. Multilayer perceptron (MLP) or a multilayer neural network (MLNN) is a fully connected feed-forward artificial neural network (ANN) class. The MLPs have high self-learning ability and fault tolerance; however, they have limitations in the learning process as the pattern of stock price time series has tremendous amounts of noise and high dimensions [10].
A convolutional neural network (CNN) is a class of deep learning methods. There are three types of different dimensions of CNN, one-dimensional CNN (1D-CNN), two-dimensional CNN (2D-CNN) and three-dimensional CNN (3D-CNN), which are usually used for time series data, image data and 3D image data, respectively. The advantage of CNN compared to its predecessors is that it automatically identifies the relevant features without any human supervision [11]. Using the convolution function, CNN can also extract essential and distinctive features from images. However, this method requires large memory and computation load because big data must be prepared [12].
A long short-term memory (LSTM) network is a type of recurrent neural network capable of handling long-term dependencies between data by controlling the input gate, the forget gate and the output gate. The benefit of LSTM is that it is insensitive to the input data length compared to other methods that handle series of data [9]. The weakness of LSTM is that the big data and massive processing time for training are required [13].
Deep learning techniques have been widely studied in stock price prediction in recent years. However, the nature of stock price time series is usually non-linear, non-parametric and chaotic, which is highly difficult to fit models using traditional statistics procedures. Moreover, the combination methods have become widespread in stock price prediction, and many more suitable models for stock prediction have been proposed. The linear combination method is one of the ways for scholars to predict the stock price more accurately. This technique was introduced by Bates and Granger [14]. The main objective of this approach is to combine the benefits of different single forecasting models.
Several studies have confirmed that the combination forecast has superior efficiency to the individual method [15]. However, weight selection is a significant challenge of the linear combination forecast method. In this work, the differential evolution algorithm is applied to seek the optimal weight of the combination procedure. The DE algorithm is one of the most powerful tools for global optimization. The DE algorithm has been applied to numerous areas, such as engineering, science, industry and finance, because it is easy to understand, simple to implement, widely applicable, has good performance and has good reliability [10]. To our knowledge, there is no literature on combining different delays for stock price prediction. Moreover, little work in the literature was on the delay (look-back) period [16]. This motivated us to combine two delay forecasts and estimate the weights using the differential evolution algorithm.
In this paper, we propose the two-delay combination using deep learning techniques to predict closing prices. We also present the new weights of the hybrid model to improve the forecasting accuracy using the differential evolution algorithm. The paper presents the following research contributions:
  • The two-delay combination using deep learning technique is proposed to predict the closing prices to improve the accuracy of the individual deep learning procedure.
  • We apply a differential evolution algorithm for the weight estimation of our proposed technique and compare it with the state-of-the-art weight estimation of the linear combination methods.
  • The two-delay combination using deep learning model is applied to three real-world stock price time series. The performance of our proposed model is compared to the well-known deep learning method.
The remainder of this paper is structured as follows. Section 2 presents the idea of combining two delay deep learning forecasting techniques and their estimated weights. The data visualization is displayed in Section 3. The empirical results are represented in Section 4. The discussion of the results are detailed in Section 5. Finally, our conclusions are given in Section 6.

2. Methodology

Time series prediction has been a challenging task for over five decades. A large amount of literature has focused on the method to obtain accurate forecasts in numerous practical applications. In general, two main methods can improve the accuracy of forecasting results: (1) developing and proposing new forecasting models and (2) hybridizing existing forecasting models. Based on the advantage of the combination forecast technique from the previous section, we focus on only the hybrid model. The famous hybrid structure consists of the parallel and series hybrid structures [17]. The linear combination of parallel structures is challenging for researchers. The main aim of this area is to seek the optimal weight of each forecast. The framework of two classifications of hybrid structures is shown in Figure 1.
The delay ( m ) in this paper refers to the network’s input length (look-back) or how many previous timesteps are used to predict the next timestep. For example, the delay is defined as four indicates that we allow our network to look back at four data to predict the next timestamp. Consequently, the predicted priced at time t + 1 ( x t + 1 ) is produced using past observations at time t , t 1 , t 2 and t 3 ( x t , x t 1 , x t 2 , x t 3 ) . In this work, each prediction model was trained to utilize two different delays for the predicted values, i.e., 43 (half-day trading delay) and 79 (one-day trading delay).

2.1. Classical Deep Learning Model

Time series forecasting using deep learning methods has been viral among researchers for more than 20 years due to the ability to deal with non-linear and multi-dimensional problems. In this paper, three well-known deep learning models—namely, the multilayer perceptron (MLP), the convolutional neural network (CNN) and the long short-term memory (LSTM) network—are applied to predict the closing stock price.
  • Multilayer Perceptron (MLP)
MLP is a feedforward artificial neural network class. It consists of an input layer, one or more hidden layers and an output layer. The hyperparameters of the network are the number of neurons in each layer, the number of layers and the activation function. This model has been applied to media recording [18], stock price prediction [19], medical [20], environmental science [21] and engineering [22].
The structure of the MLP is displayed in Figure 2.
  • Convolutional Neural Network (CNN)
CNN has become a trending tool in recent years, particularly in the image processing community, because it provides exceptional accuracy in this field [23]. CNNs are most effective in applications that include face recognition [24], object detection [25], environmental [26], cloud image analysis [27], traffic flow [28] and stock prediction [29].
CNN is a type of deep neural network (DNN) composed of the convolution layer and the pooling layer. In CNN architectures, there are different layers: convolutional, max-pooling and fully connected MLP layers. The number of hidden layers, the number of units in each layer, the activation functions, the learning rate, the number of epochs, the batch size (minibatch size) and the kernel size are the hyperparameters of the CNN model [12]. Figure 3 depicts the overall architecture of a CNN.
  • Long Short-Term Memory (LSTM) Network
The primary objectives of LSTM are to capture long-term dependencies and determine the optimal time delay (lag) for time series problems. The hidden state of the LSTM model is divided into a short-term state and a long-term state. This method has been effectively employed in numerous studies involving time series forecasting, such as traffic flow prediction [30], wind power prediction [31], human trajectory prediction [32] and stock price prediction [8]. The LSTM model architecture consists of different numbers of layers and variant types of units in each layer. The number of hidden layers, the number of units in each layer, the regularization techniques, the activation functions, the learning rate, the number of epochs, the batch size (minibatch size) and the sequence length are the hyperparameters of the LSTM model [30]. The LSTM structure is presented in Figure 4.

2.2. Combination Forecast

To improve the single deep learning forecast accuracy, a linear combination forecast is proposed. Many researchers have studied this topic and built several combination forecast techniques to improve the forecast accuracy [15]. In this paper, we propose the two-delay combination using the deep learning method to predict the closing prices. The general two-delay combination forecast can be defined as [34]
y ^ c = i = 1 2 w i y ^ i ,
where y ^ c is the combined forecast, w 1 , w 2 are the combination weights, and y ^ i are the predicted prices obtained from each delay prediction model.
The prediction model for the single DL method consists of seven parts: data collecting, data pre-processing, hyperparameter optimization, model training, model saving, model testing and prediction output. The flowchart of the hybrid deep learning process is shown in Figure 5.
The structure of the linear hybrid forecast is displayed in Figure 6.
This structure starts with obtaining the multivariate stock price time series. Then, the predicted prices of each delay are computed using the deep learning model. We then combine the forecast results using the linear combination method. Next, the weights are computed using the state-of-the-art methods and the DE algorithm. Finally, the RMSE and MAPE are calculated to compare the forecasting performance obtained from various weight estimation techniques.
The state-of-the-art of the linear combination forecast methods used in this paper are as follows:
  • Equal Weights (EW)
This approach assigns equal weights to two-delay forecast. The simple average forecast [35] is
w 1 = w 2 = 0.5
  • Inverse of RMSE (INV-RMSE) Weights
This method was proposed with the weights proportional to their individual inverse of the RMSE. The general formula is as follows [35];
w 1 = R M S E 2 R M S E 1 + R M S E 2 ,
w 2 = R M S E 1 R M S E 1 + R M S E 2 ,
where R M S E 1 , R M S E 2 are the RMSE obtained from the first and the second delay, respectively.
  • Variance No Covariance (VAR-NO-CORR) Weights
The optimal weights can be obtained as [36]
w 1 = σ 2 2 σ 1 2 + σ 2 2 ,
w 2 = 1 w 1 ,
where σ 1 2 and σ 2 2 are the variances obtained from the first and the second delay, respectively.
The pseudocode of the DE algorithm is displayed in Algorithm 1.
The Algorithm 1 starts with defining some parameters, such as the number of population size ( N P ) , the crossover ratio ( C R ) , the mutation ratio ( F ) and the constant term ( T O L ). An initial population is generated using a uniform distribution on the interval [0, 1], where x L and x U are the lower and upper bounds for the decision parameter, respectively. In the mutation process, three individuals ( x r 1 , x r 2 , x r 3 ) are selected in the population set of N P elements, with r 1 r 2 r 3 i . F is a user-defined constant known as the mutation factor, F [ 0 , 1 ] .
We then apply all values to obtain the mutant vectors ( v i ) . The trial vectors ( u i ) are generated by mixing the parameters of the target vectors ( x i ) with the mutant vectors ( v i ) according to a selected crossover probability ( C R ) . The selection scheme is applied in the DE algorithm for the next step. The predicted stock prices of the test set are imported to compute the fitness of the target vectors and the fitness of trial vectors. The best solution is chosen by comparing the fitness of the trial vectors and the corresponding target vectors. We then calculate the predicted stock prices ( f i ) of each DL model.
Next, the observed prices are imported to compute the error measurement. The errors between the observed and predicted stock prices are calculated. The mean absolute percentage error (MAPE) is applied to seek an optimal weight ( x i ) . The optimization process stops whenever the MAPE is less than a constant term ( T O L ) or the number of iterations reaches the limit. Finally, the weights are applied in the hybrid predictive model Equation (1) to obtain the combined forecast.
Algorithm 1 DE Pseudocode for weight identification.
  • Require: N P = 10 , C R = 0.6 , F = 0.2 , T O L = 0.01 , x L = 5 , x U = 5 , M A P E min = 100 , m a x G = 1000 and G = 0 .
1:
Generate the initial population
2:
x i G = x i L + r a n d ( 0 , 1 ) · ( x i U x i L ) , i = 1 , , N P
3:
  While ( M A P E min > T O L or G < m a x G )
4:
    for  i = 1 to N P
5:
    Randomly select r 1 , r 2 , r 3 1 , 2 , , N P where r 1 r 2 r 3 i
    Mutation
6:
       v i G = x r 1 G + F · ( x r 2 G x r 3 G )
    Crossover
7:
      if  r a n d ( 0 , 1 ) < = C R
8:
         u i G = v i G
9:
        else
10:
         u i G = x i G
11:
      end if
    Selection: s u m E m = 0 , s u m E = 0
12:
    Import the predicted stock prices y ^ k ( m 1 ) k = 1 n , y ^ k ( m 2 ) k = 1 n and the observed stock prices Y k k = 1 n
13:
      for  k = 1 to n
14:
         f i m ( k ) = u i G y ^ k ( m 1 ) + ( 1 u i G ) y ^ k ( m 2 )
15:
         f i m ( k ) = x i G y ^ k ( m 1 ) + ( 1 x i G ) y ^ k ( m 2 )
16:
         e m ( k ) = f i m ( k ) Y ( k ) / Y ( k )
17:
         e ( k ) = f i ( k ) Y ( k ) / Y ( k )
18:
         s u m E m = s u m E m + e m ( k )
19:
         s u m E = s u m E + e ( k )
20:
      end for
21:
       M A P E m = s u m E m × 100 / n
22:
       M A P E = s u m E × 100 / n
23:
        if  M A P E m < M A P E
24:
           x i G + 1 = u i G
25:
           M A P E i = M A P E m
26:
        else
27:
           x i G + 1 = x i G
28:
           M A P E i = M A P E
29:
        end if
30:
      end for
31:
     M A P E m i n = min ( M A P E i )
32:
     G = G + 1
33:
  end while
34:
Compute the predicted combination forecast model using the optimal weight
In order to demonstrate the effectiveness of the proposed model, the evaluation metrics—namely, the root mean square error (RMSE) and the mean absolute percentage error (MAPE)—are employed. The definitions of the two evaluation metrics are as follows:
R M S E = 1 n t = 1 n ( Y t y ^ t ) 2 ,
M A P E = 1 n t = 1 n Y t y ^ t Y t × 100 ,
where Y t is the actual value, y t ^ is the predicted value at time t, and n is the size of the observation.
MAPE is a prevalent error measure in many works. A forecast model can be considered high, good, reasonable and inaccurate when the MAPE error is less than 10%, 11–20%, 21–50% and over 50%, respectively [37].

2.3. Hyperparameter Optimization

Deep learning algorithms have several variables, known as hyperparameters. It is challenging to choose optimal hyperparameters before the training data. Trial-and-error is one popular technique for choosing the model’s variables; however, it takes a long time. In this work, SHERPA, which is an open-source software for hyperparameter tuning of machine learning models, is applied to select the hyperparameters of each model in each stock [38]. Some articles also apply the SHERPA algorithm for hyperparameter optimization in neural network (NN) fields.
Beucler et al. [39] introduced a systematic way of enforcing nonlinear analytic constraints in neural networks via constraints in the architecture or the loss function. They implemented the three NN types and used SHERPA for hyperparameter optimization in each NN type. Ott et al. [40] introduced a software library, the Fortran–Keras Bridge (FKB), which is used for computing large-scale scientific projects and integrating with modern deep learning methods.
Before applying SHERPA to our model, it is necessary to prescribe the parameter search space. For the whole experiment, some parameters are set: the optimizer is stochastic gradient descent (SGD) and the loss function is a mean square error. For the parameter search space used in DL methods, the choice of the activation functions is linear, relu, tanh, softmax and sigmoid, the choice of batch size is 32,64,128, 256, 512 and 1024, and the learning rates fall between 0.001 and 0.1. The hyperparameter search spaces of the MLP, CNN and LSTM methods are shown in Table 1.

3. Data Visualization

The intraday multivariate variables, including the opening price, the highest price, the lowest price, the closing price and the trading volume, which are recorded with the frequency of every 5 min, were extracted from the Thomson Reuters database between January 2021 and June 2022 for a total of 29,625 prices [41].
This information is called OHLCV. We selected some of the exciting stocks on the New York Stock Exchange (NYSE), including Microsoft Corporation (MSFT), Johnson & Johnson (JNJ) and Pfizer Inc. (PFE). The NYSE is an American stock exchange in the Financial District of Lower Manhattan in New York City, traded between 9.30 a.m. and 4.00 p.m. without a lunch break on weekdays. The descriptive statistics, including the minimum (Min), maximum (Max), mean, standard deviation (SD), skewness and kurtosis of the closing prices obtained from three stocks, are shown in Table 2.
The descriptive statistics of the closing prices obtained from three different stocks (currency in USD) were analyzed using the minimum, maximum, mean, standard deviation, skewness and kurtosis. As shown in Table 2, the mean price of MSFT was 279.12 USD. The lowest, highest and standard deviation prices were 212.20 USD, 349.31 USD and 32.57 USD. The mean of the JNJ stock and the standard deviation were 168.15 USD and 6.77 USD, respectively. The JNJ prices dropped to 148.49 USD and peaked at 186.45 USD. For Pfizer Inc. stock, 45.17 USD was the average price, and 6.97 USD was the standard deviation. The price range, skewness and kurtosis were 28.10, 0.0720 and −1.1761.
Time series plots of the observed prices along with the training set (blue line), validation set (red line) and test set (green line) are displayed in Figure 7.
It can be noticed in Figure 7 that the original closing prices of the training and validation sets for three different stocks are non-stationary. The MSFT stock shows an upward trend. JNJ displays fluctuations, while Pfizer Inc. presents an upward trend with slight fluctuations. Moreover, it is interesting to consider the JNJ and PFE stocks because they are the USA’s large pharmaceutical companies that sell medications and COVID-19 vaccines internationally.
We then focused on the data pre-processing before applying for model training and testing. After obtaining data from the Thomson Reuters database, we cleaned up any errors and filled in any missing data using a splines interpolation method. The data consists of five input variables: the opening price, highest price, lowest price, closing price and volume. In addition, we aimed to forecast the closing price at the end of every 5 min of trading. The historical financial data series were divided into three sets—namely, the training, validation and test sets.
For each stock, 19,829 data points from January to December 2021 were used for training and validating the deep learning models. We used 83% (January–October 2021) for training (learning parameters) and the remaining 17% (November–December 2021) to validate the network performance and avoid overfitting. The remaining six months (January–June 2022) were used to assess the model performance. Finally, the data were normalized using MinMaxScaler. All the experiments were conducted under Google Colaboratory (also known as Google Colab). The MinMaxScaler formula is as follows [35].
x = x x min x max x min ,
where x is the value in the interval [0, 1], x presents the observed price, and x min and x max represent the minimum and the maximum of the set of stock price, respectively. The inverse normalization function is
y ^ i = y i · ( x max x min ) + x min .
Here, y ^ i is the predicted value, and y i presents the network output value.

4. Numerical Results

After the data pre-processing step, the optimal hyperparameters on the training set of three stocks obtained from the SHERPA algorithm with two delays are represented in Table 3.
Table 3 presents the optimal hyperparameters obtained from the SHERPA algorithm using the training set of three stocks. All predictive experiments were performed using the Python tool, Scikit-learn and TensorFlow package. The selected CNN model architecture of JNJ stock is shown in Figure 8.
The details of the CNN architecture of JNJ stock (Figure 8) are as follows. The first layer is the input layer, which contains the shape (43,5). This indicates that we use the multivariate input, including the opening, highest, lowest, volume and closing prices of the previous 43’s stock price records. The CNN model consists of only one convolution layer that extracts 32 feature maps from the input data with a kernel of size 2. The output shape of the third layer is (21,32) because the max-pooling layer reduces the dimension of the data by a factor of 1/2. Next, a flattening operation is used for transformation of the max-pooling layer into a one-dimension array ( 21 × 32 = 672 ).
After that, the one-dimensional vector is passed through a dense layer and sent to the final output layer. In a one-day trading delay, the CNN architecture process is similar to a half-day trading delay, except the previous one-day OHLVC values (79 observations) are added to the model. The CNN model consists of only one convolution layer that extracts 64 feature maps from the input data with a kernel of size 5. After the max-pooling step, the size of the feature maps to 37. The output flatten later is (None, 2368) shows that we flatten the output of the convolutional layers to create a one-dimension vector ( 37 × 64 = 2368 ). Next, the number of neurons in the dense layer is 104. Finally, the closing prices for the next timestamp are computed using the 104 nodes at the output of the dense layer.
For deep learning forecasting, overfitting is one of the most significant problems in training neural networks. This occurs when the model performs well on training data but generalizes poorly to unseen data (the training loss is significantly lower than the validation loss) [26]. The weight regularization ( L 2 -sum of the squared weights) is one of the regularization techniques added to the architectures [42] to deal with the overfitting issue. The loss curve against epochs of the selected deep learning network architecture is illustrated in Figure 9.
From Figure 9, it can be observed that the training and validation losses decrease and are stabilized around the same point (around the value 1 × 10 3 ). That means our model architecture can be used for closing price prediction. We then compute and compare the evaluation metrics for other stocks’ training and validation sets. The RMSE and MAPE obtained from the MLP, CNN and LSTM models over the training and validation set are shown in Table 4 and Table 5, respectively.
As shown from Table 4 and Table 5, the overall results of the RMSE and the MAPE obtained from the training and validation sets are almost similar, resulting in further confirmation of no overfitting [26]. It indicates that the performance of all individual DL models behaves well on both the training and validation sets and can be applied to predict out-of-sample data sets. However, the gap in the evaluation metrics obtained from the training and validation sets can be notable for PFE stock. It might be because the training and validation set patterns are quite different, as shown in Figure 7c. There is a strong upward trend on the validation set, while the training set presents upward and downward trends from June to October 2021.
After receiving the individual forecast from two different delays, the optimal weights are chosen using the state-of-the-art method and DE algorithm (Algorithm 1). We then compute the predicted closing prices obtained from our proposed model and compare them with the individual forecast for each stock. The evaluation metrics of the test set on three stocks obtained from the single and the combination forecast are shown in Table 6.
Table 6 reveals the RMSE and MAPE of two individual delays of deep learning models (half-day delay and one-day delay) and combination forecasting models using the state-of-the-art and DE weights for the MLP, CNN and LSTM models. It indicates that the two-delay combination model using DE algorithm weight provides the lowest RMSE for all single deep learning models and stocks. Furthermore, our proposed model has higher forecasting accuracy because the MAPE values for all cases are lower than 10%. The prediction model of the test set obtained from the two-delay combination model for three stocks is shown in Table 7.
The comparison of the prediction curves between the individual delay deep learning model and the combination model and its actual price curve of three stocks obtained from the MLP, CNN and LSTM models are illustrated in Figure 10, Figure 11, Figure 12, Figure 13, Figure 14, Figure 15, Figure 16, Figure 17 and Figure 18. respectively.
Figure 10, Figure 11, Figure 12, Figure 13, Figure 14, Figure 15, Figure 16, Figure 17 and Figure 18 present the observed closing prices compared to the predicted prices obtained from the individual delay deep learning and combination models between January and June 2022. For all figures, the blue lines display the actual closing prices, and the green and magenta dashed lines represent the predicted closing prices obtained from individual deep learning models with half-day and one-day delays, respectively. The yellow, cyan and black dashed lines refer to the two-delay combination method obtained from the state-of-the-art methods—namely, the equal weights, the inverse of RMSE weights and the variance-no-covariance weight methods.
The red lines show the predicted closing prices obtained from the two-delay combination model using the DE weight-optimization algorithm. The predicted prices obtained from the single delay and two-delay combination predictive models show similar stock price patterns to the actual stock prices. Our proposed combination model via DE weight optimization performed better than the individual forecast and the state-of-the-art weight linear combination because our proposed model provides the lowest RMSE and MAPE for all stocks.
In this work, we focus on one-step-ahead prediction. Based on the results obtained from Table 6 and Figure 10, Figure 11, Figure 12, Figure 13, Figure 14, Figure 15, Figure 16, Figure 17 and Figure 18, we applied the two-delay combination model via the DE weight optimization method to predict the one-step-ahead closing price on 1 July 2022. The forecast closing prices obtained from our proposed model on the MSFT, JNJ and PFE stocks with three deep learning models are shown in Table 8.

5. Discussion of the Results

The empirical results show that the patterns of the predicted closing price obtained from our proposed method are similar to the actual prices for all three stocks. It is interesting for the Johnson & Johnson stock (Figure 11) that the predicted prices obtained from our proposed model reached 181.73 USD on 10 February 2022 because there was a steady actual price drop since 1 February 2022 and a rapid increase to 171.66 USD on 9 February 2022. However, the accuracy improved when the CNN model was applied as shown in Figure 14.
In addition, the predicted prices are matched to the actual prices when using the LSTM model because this model is capable of handling long-term dependencies. Another exciting thing is that our proposed technique via the DE weight optimization method is outstanding when the individual method performs poorly in predicting the observations. For example, in Figure 18, all individual and state-of-the-art combination methods provide low performance (underestimate) to predict the Pfizer stock.
Using the DE weight optimization in the combination procedure can improve the accuracy of the predicted prices. In summary, the evaluation metrics obtained from the DE weight optimization method are lower than the single delay and the other state-of-the-art weight combination methods for all stocks. It can be confirmed that the two-delay combination model using the differential evolution weights identification was more effective than the single DL technique and the other baseline linear combination methods.

6. Conclusions

Stock price prediction has become widespread in research. Accurately predicted price movements help investors decide to buy and sell stocks and reduce unexpected risks. This paper proposes a new combination technique to predict closing prices. This technique is called the two-delay combination model because it combines two different delays—namely, half-day and one-day—for each popular deep learning method. One challenging task of the linear combination forecast is weight identification. We utilized the differential evolution algorithm to obtain the optimal weights of the linear combination forecast procedures.
Three high-frequency multivariate data in financial markets used in this paper were collected from the Thomson Reuters database every 5 min between January 2021 and June 2022. The training (January–October 2021) and validation (November–December 2021) sets were applied to construct and validate the model, while the remaining six months (January–June 2022) were used to assess the model performance. Three deep learning models—namely, the MLP, CNN and LSTM—were tested using three stocks, including Microsoft Corporation (MSFT), Johnson & Johnson (JNJ) and Pfizer Inc. (PFE).
We evaluated the performance of our proposed model by comparing the evaluation metrics, including the RMSE and the MAPE, with the individual method. In our experiments, we compared the evaluation metrics of the proposed and single DL models. We also showed that linear combination forecast using DE weight optimization performed better than other state-of-the-art weight estimations. One benefit of our proposed technique is that applying several DL methods in the combination forecast method is unnecessary.
Based on the general idea of the combination forecast model, it requires at least two different methods to build the forecast combination. Under our proposed technique, using only one method with two different data delays can reduce the evaluation metrics. Consequently, the proposed delay combination model is a method with potentially satisfactory prediction performance. Our future research work will attempt to add further external factors (such as the company’s profit/loss, demand and supply) to improve the forecasting accuracy. We will also consider multi-step-ahead predictions on the stock price time series.

Author Contributions

Conceptualization, M.R.; methodology, M.R.; software, M.R.; validation, M.R. and H.X.; formal analysis, M.R.; investigation, M.R.; resources, M.R.; data curation, M.R.; writing—original draft preparation, M.R. and H.X.; writing—review and editing, M.R. and H.X.; visualization, M.R. and H.X.; supervision, H.X.; project administration, H.X.; funding acquisition, H.X. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the Australian Research Council (DP160102819) and the 2022 Science and Engineering Faculty Small Grant, Curtin University.

Data Availability Statement

Not applicable.

Acknowledgments

The authors would like to thank the anonymous referees for their valuable comments and suggestions.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Long, J.; Chen, Z.; He, W.; Wu, T.; Ren, J. An integrated framework of deep learning and knowledge graph for prediction of stock price trend: An application in Chinese stock exchange market. Appl. Soft Comput. 2020, 91, 106205. [Google Scholar] [CrossRef]
  2. Yang, C.; Zhai, J.; Tao, G. Deep learning for price movement prediction using convolutional neural network and long short-term memory. Math. Probl. Eng. 2020, 2020, 1–13. [Google Scholar] [CrossRef]
  3. Tang, H. Stock Prices Prediction Based on ARMA Model. Mathematical Problems in Engineering. In Proceedings of the 2021 International Conference on Computer, Blockchain and Financial Development (CBFD), Nanjing, China, 23–25 April 2021. [Google Scholar]
  4. Wadi, S.A.L.; Almasarweh, M.; Alsaraireh, A.A.; Aqaba, J. Predicting closed price time series data using ARIMA Model. Mod. Appl. Sci. 2018, 12, 181–185. [Google Scholar] [CrossRef]
  5. Ibrahim, A.; Kashef, R.; Li, M.; Valencia, E.; Huang, E. Bitcoin network mechanics: Forecasting the btc closing price using vector auto-regression models based on endogenous and exogenous feature variables. J. Risk Financ. Manag. 2020, 13, 189. [Google Scholar] [CrossRef]
  6. Liu, E. Comparison of stock price prediction ability based on GARCH and BP-ANN. In Proceedings of the Second International Conference on Computing and Data Science (CDS), Stanford, CA, USA, 28–29 January 2021. [Google Scholar]
  7. Henrique, B.M.; Sobreiro, V.A.; Kimura, H. Literature review: Machine learning techniques applied to financial market prediction. Expert Syst. Appl. 2019, 124, 226–251. [Google Scholar] [CrossRef]
  8. Baek, Y.; Kim, H.Y. ModAugNet: A new forecasting framework for stock market index value with an overfitting prevention LSTM module and a prediction LSTM module. Expert Syst. Appl. 2018, 113, 457–480. [Google Scholar] [CrossRef]
  9. Chen, Y.; Lin, W.; Wang, J.Z. A dual-attention-based stock price trend prediction model with dual features. IEEE Access 2019, 7, 148047–148058. [Google Scholar] [CrossRef]
  10. Nguyen, T.T.; Yoon, S. A novel approach to short-term stock price movement prediction using transfer learning. Appl. Sci. 2019, 9, 4745. [Google Scholar] [CrossRef]
  11. Alzubaidi, L.; Zhang, J.; Humaidi, A.J.; Al-Dujaili, A.; Duan, Y.; Al-Shamma, O.; Farhan, L. Review of deep learning: Concepts, CNN architectures, challenges, applications, future directions. J. Big Data 2021, 8, 1–74. [Google Scholar]
  12. Hoseinzade, E.; Haratizadeh, S. CNNpred: CNN-based stock market prediction using a diverse set of variables. Expert Syst. Appl. 2019, 19, 273–285. [Google Scholar] [CrossRef]
  13. Qian, F.; Chen, X. Stock prediction based on LSTM under different stability. In Proceedings of the Fourth International Conference on Cloud Computing and Big Data Analysis (ICCCBDA), Chengdu, China, 12–15 April 2019. [Google Scholar]
  14. Bates, J.M.; Granger, C.W. The combination of forecasts. J. Oper. Res. Soc. 1969, 20, 451–468. [Google Scholar] [CrossRef]
  15. Petropoulos, F.; Svetunkov, I. A simple combination of univariate models. Int. J. Forecast. 2020, 36, 110–115. [Google Scholar] [CrossRef]
  16. Saud, A.S.; Shakya, S. Analysis of look back period for stock price prediction with RNN variants: A case study on banking sector of NEPSE. Procedia Comput. Sci. 2019, 167, 788–798. [Google Scholar] [CrossRef]
  17. Hajirahimi, Z.; Khashei, M. Hybrid structures in time series modeling and forecasting: A review. Eng. Appl. Artif. Intell. 2019, 86, 83–106. [Google Scholar] [CrossRef]
  18. Jeong, S.; Lee, J. Iterative signal detection scheme using multilayer perceptron for a bit-patterned media recording system. Appl. Sci. 2020, 10, 8819. [Google Scholar] [CrossRef]
  19. Gao, P.; Zhang, R.; Yang, X. The application of stock index price prediction with neural network. Math. Comput. Appl. 2020, 25, 53. [Google Scholar] [CrossRef]
  20. Rehman, I.U.; Nasralla, M.N.; Philip, N.Y. Multilayer perceptron neural network-based QoS-aware, content-aware and device-aware QoE prediction model: A proposed prediction model for medical ultrasound streaming over small cell networks. Electronics 2019, 8, 194. [Google Scholar] [CrossRef]
  21. Parsimehr, M.; Shayesteh, K.; Godini, K.; Varkeshi, M.B. Using multilayer perceptron artificial neural network for predicting and modeling the chemical oxygen demand of the Gamasiab River. Avicenna J. Environ. Health Eng. 2018, 5, 15–20. [Google Scholar] [CrossRef]
  22. Anemangely, M.; Ramezanzadeh, A.; Tokhmechi, B.; Molaghab, A.; Mohammadian, A. Drilling rate prediction from petrophysical logs and mud logging data using an optimized multilayer perceptron neural network. J. Geophys. Eng. 2018, 15, 1146–1159. [Google Scholar] [CrossRef]
  23. Miglani, A.; Kumar, N. Deep learning models for traffic flow prediction in autonomous vehicles: A review, solutions, and challenges. Veh. Commun. 2019, 20, 100184. [Google Scholar] [CrossRef]
  24. Ben Fredj, H.; Bouguezzi, S.; Souani, C. Face recognition in unconstrained environment with CNN. Vis. Comput. 2020, 37, 217–226. [Google Scholar] [CrossRef]
  25. Cai, Z.; Vasconcelos, N. Cascade R-CNN: High quality object detection and instance segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 2019, 43, 1483–1498. [Google Scholar] [CrossRef] [PubMed]
  26. Haidar, A.; Verma, B. Monthly rainfall forecasting using one-dimensional deep convolutional neural network. IEEE Access 2018, 6, 69053–69063. [Google Scholar] [CrossRef]
  27. Phung, V.H.; Rhee, E.J. A deep learning approach for classification of cloud image patches on small datasets. J. Inf. Commun. Converg. Eng. 2018, 16, 173–178. [Google Scholar]
  28. Zhang, W.; Yu, Y.; Qi, Y.; Shu, F.; Wang, Y. Short-term traffic flow prediction based on spatio-temporal analysis and CNN deep learning. Transp. A Transp. Sci. 2019, 15, 1688–1711. [Google Scholar] [CrossRef]
  29. Kamalov, F. Forecasting significant stock price changes using neural networks. Neural Comput. Appl. 2020, 32, 17655–17667. [Google Scholar] [CrossRef]
  30. Yang, B.; Sun, S.; Li, J.; Lin, X.; Tian, Y. Traffic flow prediction using LSTM with feature enhancement. Neurocomputing 2019, 332, 320–327. [Google Scholar] [CrossRef]
  31. Zhou, B.; Ma, X.; Luo, Y.; Yang, D. Wind power prediction based on LSTM networks and nonparametric kernel density estimation. IEEE Access 2019, 7, 165279–165292. [Google Scholar] [CrossRef]
  32. Fernando, T.; Denman, S.; Sridharan, S.; Fookes, C. Soft+ hardwired attention: An lstm framework for human trajectory prediction and abnormal event detection. Neural Netw. 2018, 108, 466–478. [Google Scholar] [CrossRef]
  33. Chen, Y.; Fang, R.; Liang, T.; Sha, Z.; Li, S.; Yi, Y.; Song, H. Stock price forecast based on CNN-BiLSTM-ECA Model. Sci. Program. 2021, 2021, 2446543. [Google Scholar] [CrossRef]
  34. Kourentzes, N.; Barrow, D.; Petropoulos, F. Another look at forecast selection and combination: Evidence from forecast pooling. Int. J. Prod. Econ. 2018, 209, 226–235. [Google Scholar] [CrossRef]
  35. Ling, L.; Zhang, D.; Mugera, A.W.; Chen, S.; Xia, Q. A forecast combination framework with multi-time scale for livestock Products’ price forecasting. Math. Probl. Eng. 2019, 2019, 8096206. [Google Scholar] [CrossRef] [Green Version]
  36. Andrawis, R.R.; Atiya, A.F.; El-Shishiny, H. Combination of long term and short term forecasts, with application to tourism demand forecasting. Int. J. Forecast. 2010, 2011, 870–886. [Google Scholar] [CrossRef]
  37. Ghimire, S.; Yaseen, Z.M.; Farooque, A.A.; Deo, R.C.; Zhang, J.; Tao, X. Streamflow prediction using an integrated methodology based on convolutional neural network and long short-term memory networks. Sci. Rep. 2020, 11, 17497. [Google Scholar] [CrossRef]
  38. Hertel, L.; Collado, J.; Sadowski, P.; Ott, J.; Baldi, P. Sherpa: Robust hyperparameters optimization for machine learning. SoftwareX 2020, 126, 098302. [Google Scholar] [CrossRef]
  39. Beucler, T.; Pritchard, M.; Rasp, S.; Ott, J.; Baldi, P.; Gentine, P. Enforcing analytic constraints in neural networks emulating physical systems. Phys. Rev. Lett. 2021, 126, 098302. [Google Scholar] [CrossRef]
  40. Ott, J.; Pritchard, M.; Best, N.; Linstead, E.; Curcic, M.; Baldi, P.A. A Fortran-Keras deep learning bridge for scientific computing. Sci. Program. 2020, 2020, 8888811. [Google Scholar] [CrossRef]
  41. Reuters, T. Thomson Reuters Tick History Intraday Summaries. 2021. Available online: https://hosted.datascope.reuters.com/DataScope (accessed on 6 March 2022).
  42. Brownlee, J. Better Deep Learning: Train Faster, Reduce Overfitting, and Make Better Predictions; Machine Learning Mastery: Vermont, VIC, Australia, 2018. [Google Scholar]
Figure 1. The schematic framework of the hybrid process [17].
Figure 1. The schematic framework of the hybrid process [17].
Mathematics 10 03447 g001
Figure 2. The MLP architecture [23].
Figure 2. The MLP architecture [23].
Mathematics 10 03447 g002
Figure 3. Fully convolutional neural network architecture on time series classification [27].
Figure 3. Fully convolutional neural network architecture on time series classification [27].
Mathematics 10 03447 g003
Figure 4. A generalized LSTM feature [33].
Figure 4. A generalized LSTM feature [33].
Mathematics 10 03447 g004
Figure 5. The single deep learning flowchart.
Figure 5. The single deep learning flowchart.
Mathematics 10 03447 g005
Figure 6. The two-delay hybrid forecast.
Figure 6. The two-delay hybrid forecast.
Mathematics 10 03447 g006
Figure 7. Timeseries plots of MSFT, JNJ and PFE stocks. (a) Microsoft Corporation. (b) Johnson & Johnson. (c) Pfizer Inc.
Figure 7. Timeseries plots of MSFT, JNJ and PFE stocks. (a) Microsoft Corporation. (b) Johnson & Johnson. (c) Pfizer Inc.
Mathematics 10 03447 g007
Figure 8. The CNN architecture of JNJ stock. (a) Half-day trading delay ( m = 43 ). (b) One-day trading delay ( m = 79 ).
Figure 8. The CNN architecture of JNJ stock. (a) Half-day trading delay ( m = 43 ). (b) One-day trading delay ( m = 79 ).
Mathematics 10 03447 g008
Figure 9. The convergence plot between the loss function of the training and validation sets while training the CNN of JNJ stock. (a) Half-day trading delay ( m = 43 ). (b) One-day trading delay ( m = 79 ).
Figure 9. The convergence plot between the loss function of the training and validation sets while training the CNN of JNJ stock. (a) Half-day trading delay ( m = 43 ). (b) One-day trading delay ( m = 79 ).
Mathematics 10 03447 g009
Figure 10. The forecasting curve for actual data versus the individual and combination methods of MSFT stock obtained from the MLP model between January and June 2022.
Figure 10. The forecasting curve for actual data versus the individual and combination methods of MSFT stock obtained from the MLP model between January and June 2022.
Mathematics 10 03447 g010
Figure 11. The forecasting curve for actual data versus the individual and combination methods of JNJ stock obtained from the MLP model between January and June 2022.
Figure 11. The forecasting curve for actual data versus the individual and combination methods of JNJ stock obtained from the MLP model between January and June 2022.
Mathematics 10 03447 g011
Figure 12. The forecasting curve for actual data versus the individual and combination methods of PFE stock obtained from the MLP model between January and June 2022.
Figure 12. The forecasting curve for actual data versus the individual and combination methods of PFE stock obtained from the MLP model between January and June 2022.
Mathematics 10 03447 g012
Figure 13. The forecasting curve for actual data versus the individual and combination methods of MSFT stock obtained from CNN model between January and June 2022.
Figure 13. The forecasting curve for actual data versus the individual and combination methods of MSFT stock obtained from CNN model between January and June 2022.
Mathematics 10 03447 g013
Figure 14. The forecasting curve for actual data versus the individual and combination methods of JNJ stock obtained from CNN model between January and June 2022.
Figure 14. The forecasting curve for actual data versus the individual and combination methods of JNJ stock obtained from CNN model between January and June 2022.
Mathematics 10 03447 g014
Figure 15. The forecasting curve for actual data versus the individual and combination methods of PFE stock obtained from CNN model between January and June 2022.
Figure 15. The forecasting curve for actual data versus the individual and combination methods of PFE stock obtained from CNN model between January and June 2022.
Mathematics 10 03447 g015
Figure 16. The forecasting curve for actual data versus the individual and combination methods of MSFT stock obtained from LSTM model between January and June 2022.
Figure 16. The forecasting curve for actual data versus the individual and combination methods of MSFT stock obtained from LSTM model between January and June 2022.
Mathematics 10 03447 g016
Figure 17. The forecasting curve for actual data versus the individual and combination methods of JNJ stock obtained from LSTM model between January and June 2022.
Figure 17. The forecasting curve for actual data versus the individual and combination methods of JNJ stock obtained from LSTM model between January and June 2022.
Mathematics 10 03447 g017
Figure 18. The forecasting curve for actual data versus the individual and combination methods of PFE stock obtained from LSTM model between January and June 2022.
Figure 18. The forecasting curve for actual data versus the individual and combination methods of PFE stock obtained from LSTM model between January and June 2022.
Mathematics 10 03447 g018
Table 1. Hyperparameter search space of three machine learning models.
Table 1. Hyperparameter search space of three machine learning models.
ModelHyperparameter Search Space Values
NameRangeParameter Type
MLPHidden unit1[32, 256]Discrete
Hidden unit1[32, 256]Discrete
CNNConv1D[10, 32, 64, 128]Choice
kernel size[1, 2, 3, 4, 5]Choice
Hidden unit[32, 256]Discrete
LSTMLSTM(layer1)[32, 256]Discrete
LSTM(layer2)[32, 256]Discrete
Table 2. Descriptive statistical analysis results of three original stock prices.
Table 2. Descriptive statistical analysis results of three original stock prices.
IndexMinMaxMeanSDSkewnessKurtosis
MSFT212.20349.31279.1232.570.0581−0.8656
JNJ148.49186.45168.156.770.3691−0.5416
PFE33.3861.4845.176.970.0720−1.1761
Table 3. The optimal hyperparameters of three deep learning models.
Table 3. The optimal hyperparameters of three deep learning models.
ModelOptimal Hyperparameters
Half-Day Trading Delay (m = 43)One-Day Trading Delay (m = 79)
MSFTJNJPFEMSFTJNJPFE
MLP
• Hidden unit11501365814682111
• Hidden unit29923118618422090
• Activationtanhtanhtanhtanhtanhtanh
• Learning rate0.0014930.0124790.0025150.0015380.0100000.001650
CNN
• Conv1D1283232326464
• Kernel size224453
• Hidden unit185768811110472
• Activationrelurelutanhtanhrelurelu
• Learning rate0.0217970.0070430.0051200.0064770.0095090.008842
LSTM
• LSTM(layer1)243136171145196175
• LSTM(layer2)23823110623590130
• Activationtanhrelutanhrelurelurelu
• Learning rate0.0021900.0124790.0011760.0010160.0065480.001473
Table 4. The root mean square error of three deep learning models.
Table 4. The root mean square error of three deep learning models.
ModelStockHalf-Day Trading Delay (m = 43)One-Day Trading Delay (m = 79)
Traning SetValidation SetTraning SetValidation Set
MLPMSFT2.26762.10152.53063.4690
JNJ1.51541.22212.25841.7014
PFE0.34070.97370.30130.7835
CNNMSFT3.09182.16212.51002.0179
JNJ0.90380.76421.11920.9089
PFE1.18012.55910.71511.8346
LSTMMSFT2.70981.90764.71872.1386
JNJ1.16930.96881.58331.2784
PFE1.38753.25530.94762.6841
Table 5. The mean absolute percentage error of three deep learning models.
Table 5. The mean absolute percentage error of three deep learning models.
ModelStockHalf-Day Trading Delay (m = 43)One-Day Trading Delay (m = 79)
Traning SetValidation SetTraning SetValidation Set
MLPMSFT0.75260.43632.53063.4690
JNJ0.68420.56470.97880.7641
PFE0.68301.42430.52631.0548
CNNMSFT1.04150.43540.83970.4300
JNJ0.39780.35790.49210.4233
PFE2.57934.15961.57332.8311
LSTMMSFT0.93710.43081.68870.4560
JNJ0.51930.45350.70050.6004
PFE3.01395.31562.07814.4788
Table 6. Evaluation metrics of the test set on three stocks obtained from the single and the combination forecast methods.
Table 6. Evaluation metrics of the test set on three stocks obtained from the single and the combination forecast methods.
ModelMethodRMSEMAPE
MSFTJNJPFEMSFTJNJPFE
MLPHalf-day delay3.03971.39150.65080.85170.61091.0583
One-day delay3.84861.95520.50701.08620.90750.7439
EW3.40571.65850.52960.95910.75480.8050
INV-RMSE3.70751.61100.52071.04580.72970.7851
VAR-NO-CORR3.39781.67540.53360.95690.76370.8138
DE2.65791.06920.50150.72430.38290.7373
CNNHalf-day delay4.59791.76181.88701.40790.79683.3803
One-day delay3.80232.33911.24751.09191.10652.0414
EW4.12682.04251.55181.23130.95052.6694
INV-RMSE4.08922.00191.48661.21620.92872.5308
VAR-NO-CORR4.14372.06161.55481.23800.96072.6757
DE3.67081.07170.86131.00150.34081.3758
LSTMHalf-day delay2.99641.03492.48390.85100.39374.5097
One-day delay5.08452.99081.97641.59241.47323.5079
EW3.97911.90142.22891.20180.90354.0077
INV-RMSE3.70931.42522.20001.10590.63843.9507
VAR-NO-CORR3.99962.12582.24041.20911.02354.0303
DE2.14200.91250.61500.54020.29790.9034
Table 7. Prediction models of the MSFT, JNJ and PFE stocks.
Table 7. Prediction models of the MSFT, JNJ and PFE stocks.
ModelStockTwo-Delay Combination Model
MLPMSFT y ^ c = 1.2046 y ^ ( m = 43 ) + 2.2046 y ^ ( m = 79 )
JNJ y ^ c = 1.8013 y ^ ( m = 43 ) + 2.8013 y ^ ( m = 79 )
PFE y ^ c = 0.1517 y ^ ( m = 43 ) + 0.8483 y ^ ( m = 79 )
CNNMSFT y ^ c = 0.7466 y ^ ( m = 43 ) + 1.7466 Y ^ ( m = 79 )
JNJ y ^ c = 3.0376 y ^ ( m = 43 ) 2.0376 y ^ ( m = 79 )
PFE y ^ c = 1.0764 y ^ ( m = 43 ) + 2.0764 y ^ ( m = 79 )
LSTMMSFT y ^ c = 1.8434 y ^ ( m = 43 ) 0.8434 y ^ ( m = 79 )
JNJ y ^ c = 1.2072 y ^ ( m = 43 ) 0.2072 y ^ ( m = 79 )
PFE y ^ c = 3.5525 y ^ ( m = 43 ) + 4.5525 y ^ ( m = 79 )
Table 8. One-step-ahead prediction of MSFT, JNJ and PFE stocks obtained from the two-delay combination model on 1 July 2022 at 9.30 a.m.
Table 8. One-step-ahead prediction of MSFT, JNJ and PFE stocks obtained from the two-delay combination model on 1 July 2022 at 9.30 a.m.
ModelStock
MSFTJNJPFE
MLP255.07176.7352.13
CNN258.44176.8151.56
LSTM258.69177.5852.17
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ratchagit, M.; Xu, H. A Two-Delay Combination Model for Stock Price Prediction. Mathematics 2022, 10, 3447. https://doi.org/10.3390/math10193447

AMA Style

Ratchagit M, Xu H. A Two-Delay Combination Model for Stock Price Prediction. Mathematics. 2022; 10(19):3447. https://doi.org/10.3390/math10193447

Chicago/Turabian Style

Ratchagit, Manlika, and Honglei Xu. 2022. "A Two-Delay Combination Model for Stock Price Prediction" Mathematics 10, no. 19: 3447. https://doi.org/10.3390/math10193447

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop