Source-linked AI summary
A Novel Ensemble Deep Learning Model for Stock Prediction Based on Stock Prices and News
Yang Li, Yi Pan
TL;DR
Stock prediction is difficult because prices respond continuously to timely information and prior studies often used limited data types or omitted relevant context. This paper combines multi-source news sentiment and stock data in a two-level recurrent blending ensemble, whose reported results outperform the compared models across evaluation categories. The authors describe the study as preliminary and identify further improvement through tuning, larger training data, and additional sources.
Problem
Stock prediction remains challenging because prices react continuously to timely news, while earlier studies often used incomplete information sources or omitted relevant competitors, industries, and time-series context.
Method
The method combines sentiment analysis of multiple textual sources with a two-level blending ensemble using RNNs, LSTM, GRU, and a fully connected meta-learner.
Results
The Blending Ensemble model outperforms the compared models across the reported evaluation categories, including MSE, MPA, Precision, Recall, and F1-Score.
Takeaways & Limitations
The approach is presented as a way to predict stock-price trends and assist investors in making investment decisions within the study’s supported scope.
Takeaways & Limitations
The study is preliminary, with improvement opportunities identified in hyperparameter tuning, training-set size, and additional data sources such as 10-K reports.
Abstract
from arXiv · showhide
In recent years, machine learning and deep learning have become popular methods for financial data analysis, including financial textual data, numerical data, and graphical data. This paper proposes to use sentiment analysis to extract useful information from multiple textual data sources and a blending ensemble deep learning model to predict future stock movement. The blending ensemble model contains two levels. The first level contains two Recurrent Neural Networks (RNNs), one Long-Short Term Memory network (LSTM) and one Gated Recurrent Units network (GRU), followed by a fully connected neural network as the second level model. The RNNs, LSTM, and GRU models can effectively capture the time-series events in the input data, and the fully connected neural network is used to ensemble several individual prediction results to further improve the prediction accuracy. The purpose of this work is to explain our design philosophy and show that ensemble deep learning technologies can truly predict future stock price trends more effectively and can better assist investors in making the right investment decision than other traditional methods.
1 Introduction
Stock prices respond to many interacting factors, while prior prediction studies often used limited information sources or omitted relevant time-series context. The paper therefore combines sentiment from multiple textual sources with numerical stock data in a blending ensemble model.
- Stock prices reflect interacting supply, demand, sentiment, political, international, company, industry, and economic factors.The paper emphasizes that this combination makes stock-price prediction complicated.
- Selecting an appropriate historical window matters because overly long windows may include obsolete information, while overly short windows may omit relevant news or sentiment.The authors connect window size to investors’ limited memory and changing information relevance.
- Stock prediction requires continuous forecasting because prices continually react to timely news and announcements.
- Previous studies often used either textual or numerical data, leaving potentially useful information unused for forecasting stock-price trends.
- Some prior studies omitted competitors, related industries, or time-series structure, making their information inputs insufficient for stock-movement prediction.
- The proposed approach extracts sentiment from multiple textual sources and combines recurrent models with a fully connected neural network to predict future stock movement.The first level uses RNN, LSTM, and GRU models; the second level ensembles their predictions.
2 Related Work
The paper builds on prior work applying differential privacy to LSTM-based stock prediction and combining numerical and textual information. These studies motivate a different approach to stock-movement prediction.
- Differential Privacy-inspired LSTM was proposed to make LSTM stock prediction more robust and improve prediction results.
- The cited prior work on numerical and textual information provides a foundation for using multiple information types in stock prediction.The supplied passage introduces this work but does not provide further details about its method or results.
3 Preliminaries
The study uses financial news and stock data, converts news into sentiment scores, and prepares time-ordered windows for model evaluation. Data are split into training, validation, and test sets, with values normalized to [0,1].
- 3.2 Data Pre-processing: VADER converts financial-news text into compound sentiment scores ranging from -1 to +1, where 0 represents neutral news.The compound score sums lexicon ratings and normalizes the result.
- 3.2 Data Pre-processing: The dataset removes null values, excludes weekends, and contains 121 trading days with six columns.
- 3.2 Data Pre-processing: Training, validation, and test data are assigned separate periods and roles for fitting sub-models, preparing the second-level model, and evaluating predictions.The supplied passage gives the periods as 12/07/2017–04/09/2018, 04/10/2018–05/04/2018, and 05/07/2018–06/01/2018, respectively.
- 3.2 Data Pre-processing: A fixed-size rolling window uses the past 10 days of multi-source news and stock prices to predict the next day’s stock price.Shifting the window by one day produces successive time steps, and the training data contain 83 time steps.
4 Methodology
The methodology combines sentiment information from multiple textual sources with time-series neural networks in a two-level blending ensemble. LSTM and GRU sub-models generate validation predictions that a fully connected meta-learner combines for final stock predictions.
- Model rationale: Stock prediction is treated as a continual time-series task, motivating recurrent models that process sequential inputs.The paper identifies RNNs as suitable for variable-length sequences and notes limitations of individual LSTM or GRU models across different datasets.
- LSTM component: LSTM uses memory cells and gates to retain important past information while forgetting less relevant information in time-series processing.The forget, input, and output gates regulate information entering, remaining in, and leaving the cell state.
- Input design: The implemented LSTM uses a 10-day window containing adjusted closing prices and four news sentiment compound scores to predict the next day’s adjusted closing price.
- GRU component: GRU regulates information with update and reset gates without a separate memory cell, making it computationally more efficient than LSTM.The paper states that the gates store and filter relevant information and address the traditional RNN vanishing-gradient problem.
- Training procedure: The first-level models are trained on training data, their validation predictions form the meta-learner dataset, and intermediate test predictions produce final outputs.The validation predictions are combined into a p×m dataset, where p is the number of predictions and m is the number of models.
- Ensemble architecture: The blending ensemble uses LSTM and GRU sub-models at the first level and a fully connected neural network as the second-level meta-learner.The architecture overview describes ensemble learning as combining multiple model decisions into a final output.
5 Evaluation Metrics
The evaluation uses error, accuracy, movement-direction, and classification metrics to assess the blending ensemble’s stock predictions. These include MSE, MPA, MDA, confusion-matrix measures, precision, recall, and F1-score.
- Prediction error: MSE measures the average squared difference between predicted and actual stock values.The paper describes MSE as a risk function and states that it penalizes extreme values.
- Classification metrics: The confusion matrix visualizes model performance when actual values are known, with precision, recall, and F1-score used for evaluation.Precision concerns the correctness of positive predictions, recall concerns captured actual positives, and F1-score combines precision and recall.
- Prediction accuracy: MPA evaluates prediction accuracy using actual and predicted stock prices across stocks and days.The supplied metric description identifies X as the actual price, X̂ as the predicted price, l as the stock, and t as the day.
- Direction accuracy: MDA reports the percentage of correct positive or negative stock-movement predictions over all movement predictions.It is computed as the number of correct movement predictions divided by the total number of movement predictions.
6 Experimental Results
The Blending Ensemble model was evaluated against recurrent and ensemble baselines using error, classification, movement-direction, and prediction-trajectory measures. It outperformed the comparison models across reported evaluation categories, with especially large gains in MSE, Recall, F1-Score, and MDA.
- The Blending Ensemble model outperformed all other models in every reported evaluation category.The comparison included MSE, Precision, Recall, F1-Score, MPA, and MDA-related analyses.
- Mean Square Error: 57.55%: MSE fell from 438.94 to 186.32 versus baseline LSTM.MSE was also reported as approximately 43.7% lower than DP-LSTM, 25.27% lower than GRU, and around 20% lower than both averaging ensembles.
- Precision: Precision increased by at least 20% versus GRU and Weighted Average Ensemble, and by up to 40% versus DP-LSTM.
- Recall: Recall increased by 50% versus LSTM, DP-LSTM, and Averaging Ensemble, and by 25% versus GRU and Weighted Average Ensemble.
- F1-Score: F1-Score increased by 44.78% versus DP-LSTM, 42% versus LSTM and Averaging Ensemble, and 22.56% versus GRU and Weighted Average Ensemble.
- Movement Direction Accuracy: 66.67%: the Blending Ensemble model’s approximate movement-direction accuracy exceeded LSTM, averaging ensembles, DP-LSTM, and GRU on the test dataset.The reported comparison accuracies were approximately 33.33% for LSTM, Averaging Ensemble, and Weighted Average Ensemble, 22.22% for DP-LSTM, and 44.44% for GRU.
- Prediction Results: The Blending Ensemble prediction line was closer to the actual stock price and followed its pattern more closely.
7 Conclusion
The paper introduces a blending ensemble architecture that combines multiple recurrent neural networks for stock-price prediction. Experiments using several evaluation metrics found that it outperformed previous methods and test models, reaching approximately 67% movement-direction accuracy on a hold-out test set.
- The proposed architecture combines multiple recurrent neural networks into a Blending Ensemble model for stock-price prediction.The model captures changes in time-series influence on stock price.
- The Blending Ensemble model outperformed previous methods in every reported evaluation category.The evaluation used MSE, MPA, Precision, Recall, F1-score, and MDA.
- Approximately 67%: movement-direction accuracy on the hold-out test dataset.The conclusion relates this result to the paper’s evaluation of future stock-price or movement-direction prediction.
8 Future Research
The authors identify several directions for improving the ensemble model and its input data, including richer models, additional data, adaptive time windows, and interdisciplinary integration. They also characterize the study as preliminary and an initial step toward interdisciplinary research.
- The current model and input data have substantial room for improvement, motivating the proposed future research directions.The authors explicitly describe the current work as having considerable improvement space.
- Fine-tuning hyperparameters, enlarging the training dataset, and adding sources such as 10-K annual reports may improve results.These are identified as possible ways to improve the current results.
- Future model extensions include adding attention-based LSTMs, combining more models, and using parallel level-1 models to mine different data sources.The proposed extensions aim to make models complement one another.
- The authors propose reinforcement learning as a possible second-level model to explore stock prediction and seek an optimal policy for sequential actions.The intended objective is to obtain a strategy associated with better reward or profit.
- Other directions include fuzzy deep learning for ambiguous news impacts and dynamically varying historical windows according to news type and duration.The paper gives long-lasting housing-cost news and short-lived sudden disasters as contrasting examples.
- The authors suggest combining findings from psychology, economics, and political science, while describing the study as preliminary and a starting point for interdisciplinary research.The proposed interdisciplinary combination is presented as potentially improving prediction.