In recent times, stock price prediction helps to determine the future stock prices of any financial exchange. Accurate forecasting of stock prices can result in huge profits to the investors. The prediction of stock market is a tedious process which involves different factors such as politics, economic growth, interest rate, etc. The recent development of social networking sites enables the investors to discuss the stock market details such as profit, future stock prices, etc. The proper identification of sentiments posted by the investors in social media can be utilized for predicting the upcoming stock prices. With this motivation, this paper focuses on the design of effective stock price prediction using dragonfly algorithm (DFA) based deep belief network (DBN) model. The DFA-DBN technique aims to properly determine the sentiments of the investors from Twitter data and forecast future stock prices. From Twitter data, the DFA-DBN technique attempts to accurately determine the sentiments of investors, as well as predict future stock prices. For accurate stock price prediction, the proposed DFA-DBN model includes the development of a DBN model. The proposed DFA-DBN model involves the design of DBN model for accurate prediction of stock prices. Besides, the hyperparameter tuning of the DBN technique is performed by utilize of DFA and thereby boosts the overall prediction performance. For validating the supremacy of the DFA-DBN model, a comprehensive experimental analysis takes place and the results demonstrate the accurate prediction of stock prices. A predicted DFA-DBN algorithm with a higher accuracy of 94.97 percent is available. On the basis of the data in the tables and figures above, the DFA-DBN approach has been demonstrated to be an effective instrument for anticipating stock price fluctuations.
The popularity of microblogging could be described by their distinctive features like accessibility and convenience that enables user to instantaneously disseminate and respond data with no restrictions/with limited on content. Currently, Twitter is the 10th most widespread website around the world with 300 million active users once-a-month. Microblogging is a social media platform that blends short messaging with the creation of content. A microblog can be used to transmit short messages to an online audience in order to enhance interaction. Twitter, Instagram, Facebook, and Pinterest are all popular social media platforms for microblogging. Certain microblogging systems allow users to restrict who has access to their microblogs or to publish entries in ways other than the web-based interface. Texting, instant messaging, e-mail, digital audio, and digital video are all examples of these technologies. Twitter. In the world of microblogging, Twitter is the most well-known platform. The following image is a representation of the popularity of microblogging as a result of its distinguishing characteristics. Microblogging sites are popular because they provide content in formats that are appealing to today’s users. While there are several microblogging platforms available, we’ve determined that Twitter, Pinterest, Tumblr, Instagram, and Facebook are the frontrunners. Additionally, Reddit and LinkedIn are catching up quickly. Twitter has been upgrading hundreds of millions of times a day with contents differing to an individual everyday life update to global events and news [
Content analysis study has concentrated on exploring the motivation, content, and virality of twitters. Deepak Kumar et al. [
Stock market predictions aim is to decide the future movement of the stock values of a financial transaction. The precise predictions of stake price movements would lead to additional profit investors could generate [
Motivated by the intrinsic relationship between the sentiments and stock prices, this study designs a new stock price prediction using dragonfly algorithm (DFA) based deep belief network (DBN) model. The proposed DFA-DBN technique comprises preprocessing prediction and hyperparameter tuning. Moreover, the DBN technique has been implemented for predicting the upcoming stock prices by analyzing the sentiments in Twitter data. Furthermore, the hyperparameter optimizer using DFA is derived to optimally choose the hyperparameters involves in it. A comprehensive simulation analysis is carried out on Twitter data and the results are inspected under varying aspects.
Generally, Zach [
Most recent surveys appear to confirm the presence of relationships among stock market movements and political events and news. The stock market returns (Israeli) are further extreme follows political events, when [
Vinothini et al. [
Jin et al. [
Gupta et al. [
In order to accomplish effective stock price prediction using Twitter data, this study has designed a new DFA-DBN model and it operates on three major stages. At the initial stage, the Twitter data is preprocessed to get rid of unwanted data and transform it into a meaningful format. Next, in the second stage, the predictive process using DBN model is carried out. Finally, the parameter tuning of the DBN technique is performed by utilize of DFA and it results in improved prediction results.
In the preprocessing step, distinct twitter data sets are developed for manipulation. This type of tweet contains several numbers, HTML tags, punctuation, multiple spaces, and single characters. Some functions have been utilized for cleaning datasets in these steps. The symbol ‘⟨⟩’ has been replaced by an empty space. Again, all characters that don’t specify any useful transmission has been replaced by a space correspondingly. Lastly, all multiple spaces have been detached from this tweet. Afterward the preprocessing step, tokenization procedure is utilized for generating a word to index dictionary where every single word is generated as a key in the corpus. Using word embedded was helpful for extracting important words and explore semantic and similarity relations accurately. Lastly, an embedding matrix is produced where every single row number matches with index of words in the corpus. The raw tweet contains text instances that could not deal with ML process. Thus, run tokenization and data preprocessing procedure for making it implementable for classification and clustering computations.
The next stage of preprocessing is the prediction process which can be performed by the use of DBN model. DBN is a class of deep generative method which made up of l stack of RBM. The primary objective of DBN is the weight initiation of a DNN method for producing optimal methods compared to the models through an arbitrary weight. This method makes the prediction very efficient. On the other hand, DBN could be efficiently utilized for performing layer-wise pre-training proposed to initiate training of a BP model. The energy based probabilistic method is a general model utilized for making a joint distribution among observed data, x. and hidden variable, h, according to the following formula:
whereas
RBM is a type of Boltzmann machine without internal layer connections in the hidden and visible layers. During this method, the likelihood of joint configuration
In which
The derivation of the logarithm of likelihood formula abovementioned is determined by:
Let
In which
Lastly, the hidden units will turn on when the likelihood is higher when compared to the threshold. In order to update visible unit, it is widely used likelihood,
Afterward evaluating the gradient, it is potential to upgrade parameters, bias, and weight. The 2 major variables, momentum learning and rate, could enhance the upgraded parameter based on the prior one. Learning rate is multiplied with
At the final stage, the hyperparameter optimizer using DFA is derived which helps to optimally select the hyperparameters involved in the DBN model. The DFA is dependent upon the swarming performance of dragonflies, which follow 3 fundamental principles:
Separation: Static collision avoidance of individual dragonflies in neighborhoods.
Alignment: The velocity corresponding of individual dragonflies in neighborhoods.
Cohesion: The tendency of individual dragonflies towards neighborhood centers of a mass.
In addition, any swarm of living creatures could follows its survival instinct. Therefore, each dragonfly individual also needs to be attracted towards food source (food attraction) and distract outwards predator (predator distraction). In conclusion, the swarm behaviors of the dragonfly community could be described with these 5 major aspects.
To simulate the swarm behaviors of the dragonfly, the above-mentioned features have to be arithmetically modeled in the following. The separation motion is formulated by:
where
The alignment motion is estimated as:
Let
The cohesion motion is quantified as:
where
Let
where
The integration of above-mentioned motion could forecast the corrective patterns of the individual dragonfly in all iterations. The position of individual dragonfly is upgraded in all iterations with the present location of an individual dragonfly
Let
By interfering with the predator weight, separation, alignment, cohesion, and food attraction
In this section, the performance validation of the DFA-DBN technique takes place on Twitter dataset. The results are examined in-terms of training, validation, and testing dataset.
Measures | Training set | Validation set | Testing set |
---|---|---|---|
Precision | 0.9536 | 0.9526 | 0.9521 |
Sensitivity | 0.9084 | 0.9069 | 0.9060 |
Specificity | 0.9748 | 0.9742 | 0.9739 |
Accuracy | 0.9506 | 0.9497 | 0.9492 |
F-Score | 0.9304 | 0.9292 | 0.9285 |
Mathews Correlation Coefficient | 0.8928 | 0.8909 | 0.8898 |
False Positive Rate | 0.0252 | 0.0258 | 0.0261 |
Next,
Eventually, a detailed comparative outcomes analysis of the DFA-DBN manner with recent techniques takes place in
Methods | Precision | Recall | F-score | Accuracy | FPR | Time |
---|---|---|---|---|---|---|
Proposed DFA-DBN | 0.9536 | 0.9069 | 0.9292 | 0.9497 | 0.0258 | 11.07 |
MDNN-ELM | – | – | – | 0.9340 | 6.60 | 19.90 |
DeepClue | – | – | – | 0.8850 | 11.50 | 21.80 |
MFNN | – | – | – | 0.8350 | 16.50 | 27.80 |
Random Forest | 0.7110 | 0.7020 | 0.6900 | 0.7018 | – | – |
Logistic Regression | 0.6210 | 0.6240 | 0.6210 | 0.6242 | – | – |
RNN | 0.6345 | 0.6365 | 0.6246 | 0.6429 | – | – |
This study has presented a DFA-DBN technique to predict future stock prices using Twitter data. The proposed DFA-DBN technique involves preprocessing, DBN based prediction, and DFA based hyperparameter optimization. The application of DFA to properly adjust the hyperparameters involved in the DBN model helps to accomplish maximum prediction results. A comprehensive simulation analysis is carried out on Twitter data and the results are inspected under varying aspects. The resultant comparative analysis demonstrated that the DFA-DBN technique results in improved stock price predictive performance on the other approaches with respect to distinct measures. As a part of future scope, the presented DFA-DBN technique can be deployed in big data environment and validate on large scale real time datasets.