Next Article in Journal
In Situ Technological Innovation Diffusion Rate Accuracy Assessment
Next Article in Special Issue
Applications of the Investor Sentiment Polarization Model in Sudden Financial Events
Previous Article in Journal
Assessing the Dual Innovation Capability of National Innovation System: Empirical Evidence from 65 Countries
Previous Article in Special Issue
Evolutionary Game of Small and Medium-Sized Enterprises’ Accounts-Receivable Pledge Financing in the Supply Chain
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Analyzing the Stock Exchange Markets of EU Nations: A Case Study of Brexit Social Media Sentiment

1
Department of Management Sciences, Bahria University, Islamabad 44000, Pakistan
2
Department of Computer Science, COMSATS University Islamabad, Attock Campus, Attock 43600, Pakistan
3
Department of Media Design and Technology, Faculty of Engineering & Informatics, University of Bradford, Bradford BD7 1DP, UK
4
Department of Industrial Security, Chung-Ang University, Seoul 06974, Korea
*
Author to whom correspondence should be addressed.
Systems 2022, 10(2), 24; https://doi.org/10.3390/systems10020024
Submission received: 16 January 2022 / Revised: 16 February 2022 / Accepted: 19 February 2022 / Published: 23 February 2022
(This article belongs to the Special Issue Computational Modeling Approaches to Finance and Fintech Innovation)

Abstract

:
Stock exchange analysis is regarded as a stochastic and demanding real-world setting in which fluctuations in stock prices are influenced by a wide range of aspects and events. In recent years, there has been a great deal of interest in social media-based data analytics for analyzing stock exchange markets. This is due to the fact that the sentiments around major global events like Brexit or COVID-19 significantly affect business decisions and investor perceptions, as well as transactional trading statistics and index values. Hence, in this research, we examined a case study from the Brexit event to assess the influence that feelings on the subject have had on the stock markets of European Union (EU) nations. Brexit has implications for Britain and other countries under the umbrella of the European Union (EU). However, a common point of debate is the EU’s contribution preferences and benefit imbalance. For this reason, the Brexit event and its impact on stock markets for major contributors and countries with minimum donations need to be evaluated accurately. As a result, to achieve accurate analysis of the stock exchanges of different EU nations from two different viewpoints, i.e., the major contributors and countries contributing least, in response to the Brexit event, we suggest an optimal deep learning and machine learning model that incorporates social media sentiment analysis regarding Brexit to perform stock market prediction. More precisely, the machine learning-based models include support vector machines (SVM) and linear regression (LR), while convolutional neural networks (CNNs) are used as a deep learning model. In addition, this method incorporates around 1.82 million tweets regarding the major contributors and countries contributing least to the EU budget. The findings show that sentiment analysis of Brexit events using a deep learning model delivers better results in comparison with machine learning models, in terms of root mean square values (RMSE). The outcomes of stock exchange analysis for the least contributing nations in relation to the Brexit event can aid them in making stock market judgments that will eventually benefit their country and improve their poor economies. Likewise, the results of stock exchange analysis for major contributing nations can assist in lowering the possibility of loss in relation to investments, as well as helping them to make effective decisions.

1. Introduction

A stock market, also referred to as a stock exchange, is a venue wherein a company’s shares or stocks are traded. For each share or stock granted by a publicly traded corporation, a price is associated with this, called a stock price. On any particular day, the total number of shares traded by any corporation is called the stock trading volume. Generally, the data in stock markets are greatly fluctuating and non-linear. These data are collected over time to determine the state of an event [1]. Usually, analysis of the stock market is accomplished using the historical stock prices; however, some recent studies have invalidated the use of historical data to forecast stock prices. According to the efficient market hypothesis (EMH), fluctuations in stock prices are heavily influenced by current news, events, and marketing activity [2]. Currently, social media is rising in importance as a way of shaping people’s reactions to each given event or piece of news. Any favorable or negative public opinion about a certain firm might have an impact on its stock values [3].
Social media sentiment analysis-based big data analytics for a particular event has garnered a great deal of attention in recent years [4,5,6]. Social media sentiment analysis regarding a particular event provides an insight for investors into better planning and decision-making. For instance, some research studies have conducted sentiment analysis using various social media platforms, e.g., Twitter regarding different events, such as the Nigerian presidential election of 2019 [5]. Furthermore, this type of sentiment analysis regarding particular events is also employed in determining the trends in stock markets, e.g., studying the influence of the COVID-19 pandemic on stock market prices [7]. Sentiment analysis of financial news articles regarding different events is also a source of information when analyzing stock market trends [8]. Analyzing the stock exchanges regarding specific countries is also being studied with regard to the COVID-19 pandemic, e.g., a sentiment analysis-based strategy using the Twitter platform is adopted in [9] to assess Italy’s reputation and the trends of its stock prices. As indicated before, major events like the coronavirus (COVID-19) pandemic or the British exit from Europe (Brexit) have serious implications for stock exchanges. As a consequence, analyzing the stock markets of the European Union (EU) member states in light of the Brexit event is a primary goal of this research study.
Brexit is an acronym made up of two words: “Britain” and “exit”, and it refers to Great Britain’s departure from the European Union (EU). The European Union (EU) is a political and unified economic partnership between 27 European countries predominantly found in Europe, aimed at breaking down trading, financial, and social hurdles and promoting prosperity in these areas. The essential goals of the EU are to increase well-being and values for its citizens and to promote peace among EU members. The EU also aims to support technological and scientific progress and establish a monetary as well as an economic union, using the euro (EUR) as its official currency. The EU GDP is one of the largest in the world because of its trade structure [10]. The EU maintains its budget to support funding policies, the administrative costs of research, agriculture, or international aid and development [10]. The EU has been surrounded by controversies regarding its funding since it began in the 1970s; this is considered one of several reasons that have prompted Brexit [10]. On 31 January 2020, Britain left the EU because the country voted against EU membership. The UK held a referendum on 23 June 2016 to end its forty-three-year-long European Union membership [11]. There were mixed opinions and reactions about Brexit, such as financial constraints. Furthermore, the net contribution by Britain to the EU was GBP 20.0 billion in 2018, although the amount was not transferred to the EU but was instead considered as a theoretical liability. Moreover, in 2018, ten EU member states contributed more than they received in the form of direct monetary contributions from the EU. Germany led the ranking, with a donation of EUR 17.2 billion, while Britain came in second with a net contribution of approximately EUR 10 billion [12]. This disparity in contributions and returns were further discussed after Brexit, as the UK was a major contributor. Furthermore, this leads to an interesting research area to assess what effect Brexit has had on the top contributing countries and countries contributing least; it does seem that there is potentially a substantial difference in what the major contributors are getting back from the EU, compared to the countries contributing least. This disparity causes volatility in the stock exchange markets of EU countries [13]. The decision-making of many businesses revolves around the stock market and customers’ attitudes and opinions, as exchanged on social media platforms. Many businesses were established in the UK to take advantage of EU trade benefits and Brexit will inevitably have an impact on their approach from now on. Therefore, opinions and sentiments about Brexit can be helpful for decision-makers to prepare better strategies and make intelligent decisions.
Presently, in this era of artificial intelligence, various researchers are attempting to determine the influence of opinions expressed by people on different social media platforms, and their effect on forecasting the eventual movement of stock prices using different automated methods of machine learning and deep learning [4,5,6,14,15]. For instance, some research studies exist in which stock exchange forecasting is carried out using traditional machine learning methods [16,17,18]. In addition, some hybrid approaches, such as hybrid naive Bayes classifiers, are also designed to perform classification of the stock market using sentiment analysis with Twitter [19]. An ensemble learning technique involving different ensemble regressors and classifiers, such as support vector machines (SVM), random forest (RF), decision trees (DT), etc., is also utilized in the analysis of stock markets [20]. However, in some recent methods, deep learning-based frameworks are also widely used in stock market predictions [21]. It has been observed that the deep learning-based approach works better than machine learning approaches [22]. Due to the accurate and high-performance results reported with deep learning-based methods in stock exchange predictions, we have also opted for the approach of deep learning and have proposed a convolutional neural network to predict stock exchange prices with regard to the Brexit event. For comparison, we have also employed machine learning models, namely, support vector regression and linear regression, to carry out stock exchange prediction. Furthermore, while existing research studies are explicitly studied in relation to this Brexit event, we attempt to give a detailed account of its impact on the stock markets in various EU nations. However, there are some studies in which various assessments of Brexit have been made. For instance, the influence of the Brexit vote on the stock exchange of London has been studied in [23]. The impact of Brexit on the stock markets of India has also been studied in [24], as well as on European market co-movements [25]. Nevertheless, the proposed study is different in comparison with these methods, as sentiment analysis regarding Brexit events is also taken into account when analyzing the stock exchanges of EU countries. However, the studies mentioned above have employed different statistical and traditional correlational-based methods to analyze the general impact of Brexit events on stock exchanges.
More precisely, in this research study, we considered Brexit as a case study and evaluated the impact of social media sentiment on this event, collected from 24 February 2016 to 3 May 2016, consisting of 1,826,290 tweets regarding the stock markets of different EU economies [26]. Social media sentiment analysis has been proved to provide better insight into stock price prediction [27,28,29,30,31,32,33]. The objective here is to analyze the effect of a major event on different economies, especially in terms of the highest and lowest contributors to the EU. We used three algorithms—linear regression, support vector regression, and deep learning—to predict the stock exchange prices in EU countries. We selected two groups, from those EU countries with the highest contributions to the EU budget and those countries with the lowest contributions to the EU budget. The proposed work evaluated the effect of social media [30] on the stock markets of EU countries. It also evaluates whether social media sentiment analysis, specifically in terms of Brexit event data analytics, gives improved results or not. The paper offers the following contributions:
  • The impact of social media sentiment for a major event, namely Brexit, is evaluated regarding the stock exchange markets of different EU countries.
  • For efficient data analytics, a deep learning-based method, along with comparative machine learning models, are suggested to perform stock exchange prediction.
  • The proposed sentiment-based algorithm evaluates the effect of the Brexit event on the stock markets for both the greatest and the least contributing EU countries.
The rest of the paper is organized as follows: Section 2 explains related work in the field of social media-based stock prediction, Section 3 explains the methodology, and Section 4 presents the results; the discussion is followed by a conclusion and an outline of future research.

2. Related Work

Stock market prediction is one of the evolving topics of research in academia and real-world businesses. This stock-market forecasting helps researchers to understand better and plan according to business financials. The concept of this research is based on the random walk theory and the efficient market hypothesis (EMH). The researchers evaluated the effects on the current stock market, based on available information, by using the EMH [34,35]. With the help of random walk theory, they have forecasted the stocks’ future prices, which have the peculiar habit of constantly changing and a dependency on uncertain news. According to [36], the ability to predict accurately is not more than 50% in such cases. It has been argued that random walk theory does not help in predicting, as forecasting of stock market prices is accurate to some degree [37,38]. Researchers predict that in the case of directional stock forecasting the 56% accuracy is considered substantial [39,40,41,42]. To forecast the stock market, fundamental and technical analysis are two other viewpoints employed, apart from EMH and random walk theory. To predict the stock market with the help of financial conditions, each company’s operations, macroeconomic factors, and fundamental analysis are used. The technical analysis is used to study historical prices and the time-series effect. Fluctuations in the stock prices can be analyzed using trends since historical trends repeat themselves. Researchers forecast the stock prices with only the help of historical prices. A Bayesian network was also used for an analysis of the time-series data, using the moving average and autoregressive model and the autoregressive moving average model. Most researchers only used one stock for forecasting [35,36,39] and, to test the instances (transaction dates), they keep the number as low as 14 or 15 [37,43]. This low test-set of instances might not be sufficient for result evaluation.
Moreover, some current research studies and approaches to stock market prediction and analysis involve more sophisticated and advanced algorithms. For instance, a case study of the Chinese stock exchange market is taken into consideration in [44]. In this work, a combined framework of knowledge graphs and deep learning is employed to predict stock prices. It is observed that their suggested method shows the best results in comparison with other methods. Similarly, in [45], a case study of the Tehran exchange is taken into account to examine the impact of daily stock rates by employing a genetic algorithm and multi-layer perceptron. The goal of applying these models in conjunction is to predict one-day returns. In [21], several types of deep learning models, including a multi-layer perceptron (MLP), recurrent neural networks (RNNs), long short-term memory (LSTM), and convolutional neural networks (CNNs) are employed to predict the prices of stocks, utilizing the historical data of companies. This study has employed the data from two stock exchanges, namely, the National Stock Exchange (NSE) and the New York Stock Exchange (NYSE). A special kind of capsule network, namely, a TI-capsule (text and image information-based capsule neural network) is employed by the authors of [46] to predict stock behavior. One of the most dominant features of a TI-capsule is the preservation of features in a vector, and, hence, shows 91% accuracy. It has also been observed that deep learning-based data analytics and artificial intelligence-based decision-making algorithms show better results in stock exchange prediction, and they are extensively adopted methods in this area. Due to their superior performances, they are also employed as a data-analytics approach to industrial big data, such as the planning of smart processes in cognitive automation [47], the comprehension of a cognitive Internet of Things [48], and product decision-making information systems [49]. Furthermore, a relationship among machine learning-based data analytics is considered with regard to stock exchange prediction with data-driven Internet of Things systems and interconnected sensor networks, while there are other research studies where these frameworks have applications such as in smart cities [50]. For instance, a data-driven Internet of Things system, along with machine learning-based assessments, was utilized to determine the COVID-19 pandemic response and recovery rate, for the administration and development of smart sustainable cities [51].
Furthermore, in other applications, such as tourism, the effect of social media influencers (SMIs) is analyzed through statistical data-analytics approaches to decision-making regarding the travel habits of customers [52]. These data analytics systems also have numerous applications in the planning procedures of smart processes in sustainable cyber-physical manufacturing frameworks [53] and the sustainable management of organizational performance [54].

2.1. Social Media Sentiment Analysis for Stock Exchange Prediction

Twitter is considered an important social media platform for gathering information and influencing public opinion [55]. It has been shown that social media sentiment analysis plays an integral role in product and restaurant reviews [56,57]. Researchers used information sources to apply sentimental analysis for the improvement of the stock prediction model. Currently, social media is the source from which to gather all the information [58,59]; previously, this information was collected through news forums [55]. Then, the prediction model was used to combine all the sentiments. Linear regression-based frameworks were used for the integration of the textual content with historical prices. Previously, a model was widely used to merge “bags-of-words”, which are the text representations used in the prediction model. Schumaker et al. used different textual representation techniques for analysis, such as bag-of-words, name entities, and noun phrases to mine the financial news [39]. Later, they incorporated the information to support vector machine regression and linear regression, acting as the predictive models. The model forecast the stock prices 20 min after the release of the news article. The result showed 57.1% directional accuracy, 0.04261 mean square error, and 2.06% return in a simulated trading engine. From the message boards, messages were also segmented into three classes—hold, sell and buy—using a naive Bayes model. All those messages that fall under these three segments were collectively considered as bullishness, with further analysis of three functions classified as an alternative to bullishness. All this was integrated into the regression model. Their prediction model was not capable of forecasting stock returns effectively. The relationship between the collective indices, such as investors’ hopes and fears, was evaluated against stock market indicators on a regular basis [60]. Based on the keywords, the tweets were classified as voicing worry, fear, hope, and so on. According to the authors, a positive relationship of emotional tweets was linked with VIX, and negative relation to the Dow Jones, NASDAQ, and S&P 500. However, they were not using their model to predict stock prices. To evaluate all the stock forecasting, a keyword-based algorithm was created and reported approx. 75% accuracy, on the basis of 14 transactions in mid-September 2012 [43].

2.2. Impact of Brexit on Stock Markets

In the existing literature, there are many research studies in which the impact of various social events on the stock markets of different countries is studied. These events include the COVID-19 pandemic [9], the Nigerian presidential election of 2019 [5], and Brexit [23]. In addition, the approaches employed in these studies to study the impact on stock prices vary greatly. For instance, in [9], the impact is studied via a sentiment analysis-based strategy using the Twitter platform. However, specific to the event of Brexit, there do exist some studies in which stock exchange analysis is performed. As an example, in [61], a survey of UK firms is conducted to study the impact of Brexit. This study demonstrates several key findings, such as that Brexit resulted in a significant, widespread, and long-term rise in uncertainty. An empirical study using autoregressive models has been employed by the authors of [24] to study the impact of Brexit on the Indian stock exchange. This study demonstrated that by using the test results of the last four years, it can be observed that Brexit has had a major influence on the Indian stock market. Moreover, the uncertainty in financial markets with regard to Brexit has been studied by the authors of [62]. In this work, both parametric and semi-parametric approaches are employed to analyze whether Brexit has had any major influence on the degree of determination of the FTSE (Financial Times Stock Exchange index). Another empirical analysis has been conducted in [63] to study the influence of Brexit’s pre- and post-referendum effects on some chosen stock exchanges. This study concludes that a structural break appeared in every stock index, due to the results of the Brexit referendum. Furthermore, in one study [64], a special case of the New Zealand stock market is analyzed with regard to the Brexit announcement. This impact was analyzed using data from the NZX50 index and details of the closing price of the 50 highest stocks, as well as legitimate stocks available on the Main Board (NZSX). The findings of the study show that the NZX50 index is negatively influenced by Brexit but, on the other hand, NZX50 stock’s returns were better during the period of the Brexit referendum. A relational dynamics impact on stock exchanges was studied in [65], regarding pre- and post-Brexit referendum figures. In this work, detrended fluctuation analysis (DFA), along with a detrended cross-correlation coefficient, is employed to study its influence.

3. Methodology

In the proposed study, we have performed stock exchange forecasting using a sentiment analysis of tweets related to the Brexit event. In the first stage, we acquired the tweets data, followed by the refining and sentiment analysis of the data. Subsequently, we have proposed both linear and non-linear formworks to carry out the stock exchange forecasting. More specifically, linear regression is used as a linear model to determine the value of an independent variable, using a linear combination of dependent variables and their respective coefficients. Support vector regression and convolutional neural networks are used as a non-linear model to estimate the value of stock markets. In addition, several linear and non-linear artificial intelligence-based models, such as support vector analysis and linear regression, are employed as the existing methods for this purpose. However, choosing the best model for stock forecasting is a critical field of study. Deep learning developments have resulted in a full shift toward adopting these models for data analytics [21,46]. Due to their best and most accurate performance being in the domain of data analytics, we have adopted them for our analysis of stock exchanges of EU nations with regard to Brexit sentiment. Furthermore, we have employed the sentiments data from 1,826,290 tweets regarding the stock markets of different EU economies, which is a substantial volume of data; therefore, the deep learning model appears to be a better fit for this analysis as it performs very efficiently when there is a large amount of data. It is crucial to compare the performance of the deep learning model with certain traditional machine learning methods, such as linear regression and support vector regression, in order to assess its ability to handle such large amounts of data since they are widely used for regression problems. We chose linear regression since it is perfectly suited for determining how strong the correlations among variables are.
Furthermore, it is more versatile, easier to interpret, and provides a better comprehension of statistical inference. However, it does not perfectly capture the non-linearity in the dataset, and outliers in the data also affect its accuracy. Similarly, the reason for choosing support vector regression is that it perfectly handles the outliers in the data, along with offering the best generalization ability. However, both these methods do not scale up well for large datasets; hence, we used the deep learning model. In addition, deep learning can work with noisy data and perfectly captures the non-linearity. Moreover, it is observed that the proposed deep learning method outperforms these traditional methods. The proposed methodology is explained in Figure 1 and the details of each subsection are given below.

3.1. Dataset Collection

The dataset has been collected for the following countries given in Table 1, from Yahoo! Finance. The starting dates vary for each country but we have used the same end date for each country, according to the availability of a sentiment dataset related to the Brexit event [26]. More precisely, we have collected the data of EU nations that are major contributing countries and those which contribute the least. This selection (i.e., countries of greatest and least contributions) is based on their statistical contribution, in terms of values obtained from a European Commission poll from 2019 [66,67]. The highest-contributing countries to the EU budget include Germany, the UK, France, Netherlands, and Spain, with their stock markets in Frankfurt, London, Paris, Euronext, and Madrid, respectively. Similarly, the lowest-contributing countries to the EU budget include Poland, Hungary, Portugal, and Romania, with their stock markets in Warsaw, Budapest, Euronext Lisbon, and Bucharest, respectively. The dataset incorporates several attributes, such as “open”, “close”, “high”, “low”, “volume”, and “adj close”. More precisely, the “open” attribute provides the opening value of the stock, while the “close” attribute provides the closing prices of stocks on a specific trading day; likewise, the “high” and “low” attributes provide the highest and lowest values of stock traded on that day. In addition, the volume attribute shows the total volume of stock on that particular day, and, after the dividends have been certified, then the remaining stock values are denoted by the “adj close” attribute.

3.2. Social Media Sentiment Analysis for Brexit

In this proposed study, social media sentiment analysis plays an important role in efficient stock exchange prediction. For this sentiment analysis, Alex Davies’ assertion list is used [68] to analyze the effect of sentiment on market development. More specifically, a list of about 5000 words has been used and categorized into positive, negative, and neutral classes. The process that was originally assigned then converted the tweets into tokens. The blank spaces, emojis, and URL links are removed using parsing algorithms. The three sentiment values, i.e., the negative, neutral, and positive classes are used to categorize the tweets. Then, we interchanged our own generated list, consisting of more than 4000 words, with the previous list for sentiment classification. This assists in achieving improved results because it considers the multi-word associations between each word. In this study, we use a different approach for daily sentiment calculation rather than simply considering the probability or just taking the average of the tweet. The results presented in this study are in terms of the percentage value of all three categories of daily tweets. Along these lines, we only considered the positive and negative categories of the tweets and ignored the neutral category of tweets. More precisely, the percentage values of sentiments of a particular day can be computed using Equations (1)–(3):
S + v e = T o t a l   P s T o t a l   T n × 100  
S v e = T o t a l   N s T o t a l   T n × 100  
S n = T o t a l   U s T o t a l   T n × 100  
In the above equations, S + v e shows the percentage values of positive sentiments, P s , S v e shows the percentage values of negative sentiments, N s , U s shows the percentage values of neutral tweets, U s , while T n shows the total tweets on the day or the total number of sentiments recorded on the day.

3.3. Linear Regression

Nunno et al. [69] demonstrate that stock market values can be forecasted by using various machine learning-based regression models, such as support vector regression, linear regression, and deep learning models. Among all these, the linear model is utilized most widely because of its strong and simple nature. For this purpose, single and multi-dependent factors are used; therefore, we utilized a multi-linear regression framework [70]. This is a generalized regression algorithm that helps when dealing with various dependent variables.
Consider the following equation, where y denotes the independent variable, while the dependent variables are denoted as x 1 , x 2 , …, x k through parameters β 1 , β 2 , …, β k , as shown below in Equation (4).
y = x 1 β 1 + x 2 β 2 + + x k β k + ε  
The β 1 , β 2 , …, β k values represent the regression co-efficient, with a relationship with x 1 , x 2 , …, x k , separately, and ε shows the value of random error between the actual and the predicted values.
In addition, β j is the j th coefficient, representing the foreseen alteration in y per unit alteration in the j th independent variable, x j . Let us suppose that e(ε) = 0; then, the β j value can be determined, utilizing Equation (5).
β j = δ e y δ x j  

3.4. Support Vector Regression

Cortes et al. [71] proposed the use of SVM, which is based on statistical machine learning. The objective behind SVM was to handle structural risks. Since then, many researchers have used a modified SVM for regression problems and employed it for a wide range of applications. These applications include fault prediction, forecasting time-series data, and forecasting power load demand [72].
Let us assume that the data is in the form of a time-series, which is given below in Equation (6):
v = [ x i ,   y i ] ,   1 i n  
where x i denotes the information given at period i , with components n , and the output data, y i . At that point, the regression can be defined using Equation (7):
f ( x i ) = w 2 θ ( x i ) + b  
where w and b represent the weight and bias, respectively. Here, x is the input vector, and this vector can be mapped by the kernel, ( x i ), into a higher dimensional space. By solving the optimization problems in Equations (8) and (9), we can find out the values of w and b .
m i n i m u m   1 2   w 2 + C i = 1 n ( ε i + ε i )  
This is subject to:
w T ( θ ( x ) ) + b y i ε i + ε i  
Here, C represents the tradeoff between model simplicity and generalizability, whereas the cost is measured using the ε i and ε i factors.
Data in non-linear form is plotted from the original vector space to the high dimensional space using kernels, where linear regression can be used. Therefore, the regression models for support vector machines can be obtained as follows, using Equation (10):
y i = f ( x i ) n i = 0 n ( α i α i )   k ( x i , x j ) + b  
where α i and α i represent the Lagrange factor multipliers. In SVM, the most commonly utilized kernel is the RBF kernel, which is also known as the Gaussian radial function. Its width can be calculated using Equation (11):
k ( x i , x j ) = e ( x i x j 2 / ( 2 σ 2 )  
In this research study, open, high, low, volume, sentiment, and adj close values of stock data are considered as input variables, while the output variable is the “close” attribute which is the stock closing price on a specific day of trading.

3.5. Convolutional Neural Network

Deep learning models are used to achieve better results in different application areas such as medical imaging [73,74], biometric systems [75], as well as natural language-based tasks [76]. In addition, as compared to linear regression or support vector regression models, they perform better. For this purpose, Convolutional Neural Network (CNN) is used as a deep learning model in this study. The neural network algorithms use a strategy whereby input data is linearly transformed into a new feature space on each hidden layer, then, a non-linear function is applied. This same process will continue until the final layer of CNN, i.e., the output layer. Hence, deep learning models are defined as an information flow from the input layer to the output layer, through hidden layers. Deep learning models are generally defined as a model consisting of a large number of neurons, hidden layers, and hyperparameters that are interconnected and learn through examples. A typical class of utilization for this framework includes the mathematical regression models to approximate and forecast data. The performance of such models is generally improved by using extra information during the training phase. We have utilized the default settings for deep learning-based CNNs for this reason.
In our proposed framework, at the first layer of the network, the input data contains seven column values, namely, open, high, low, volume, sentiment, and adj close. The output acquired from the CNN framework approach is evaluated using the mean absolute error and root mean square error. In this research, the “close” value is predicted using the remaining attributes mentioned above. All these seven parameters are already available in the datasets utilized for stock trade forecasts, and sentiment value regarding the Brexit event is taken from Twitter information. The architecture is explained in Figure 2.

4. Experimental Setup and Results

4.1. Results and Discussion

This section presents the results of a stock exchange prediction, without applying sentiment analysis for the impact of Brexit, and considering sentiment regarding Brexit for all countries. The results are divided into four parts; the first two parts present and explain results for both the top and lowest contributing EU countries, without using Brexit variables, and the second and last section gives the findings of the sentiment analysis, incorporating the Brexit event. The evaluation metrics used for both of these experiments are the mean absolute error (MAE) and root mean squared error (RMSE) [54,55,75,76].

4.1.1. Stock Exchange Prediction without Incorporating Sentiment Analysis of the Brexit Event with Major Contributing Countries

In our first experiment, we have used three different algorithms for stock exchange prediction. The algorithms are linear regression, support vector regression, and deep learning. These algorithms were applied to the stock exchange dataset obtained for different European Union countries. These countries are divided into two parts. The first part includes countries that are the major contributors to the EU budget, and we have considered Germany, the UK, France, the Netherlands, and Spain to comprise this set. This selection is based on their contribution in terms of statistical values collected from a survey of the European commission in 2019 [66]. More precisely, we chose two countries with very high statistical values and some countries making lower contributions that still fall under the umbrella of high, i.e., on two different scales, very high and high.
In the first experiment, we collected a huge dataset for these countries and projected stock exchange prices, without taking into account any social media sentiment analysis of the Brexit event. As discussed in Section 3, that dataset was collected from Yahoo! Finance for each of the country’s stock exchanges, according to the dates given in Table 1. Later, this dataset was divided into training and test sets followed by applying the algorithms to forecast the stock prices. The results are presented in Table 2 for the above-mentioned five countries. More precisely, Table 2 is divided into two parts. The first part provides the mean absolute error (MAE) of all three algorithms for stock exchange prediction results. Similarly, the second part provides the root mean squared error (RMSE) values of all algorithms for each country. It is clear from Table 2 that the prediction error for all countries is higher using linear regression and support vector regression compared to deep learning in most cases. The highest error observed among these major contributors is for the UK and Spain. However, the least errors observed among these countries were Germany, France, and the Netherlands. The best mean absolute error for Germany, the UK, France, Netherlands, and Spain are 0.403, 4.586, 0.140, 0.824, and 10.580, respectively. The values show that there is a certain fluctuation from the Brexit point of view, and this is most noticeable for the UK and Spain. The results are also presented in graphical form in Figure 3 for Germany, the UK, France, the Netherlands, and Spain. It is obvious from the corresponding graphs that there are certain fluctuations in the stock market for each country. These results are predicted especially when the Brexit discussion was at its peak, back in 2016. Investors usually consider such events before making investment decisions. However, the error rate is higher for stock exchange prediction using linear regression and support vector regression, while deep learning produced better results overall among these techniques.

4.1.2. Stock Exchange Prediction without Sentiment Analysis of the Brexit Event, with Lowest-Contributing Countries

In our second experiment, the same three algorithms were used to predict the stock exchange values for the group of countries making the smallest contributions to the EU budget. The dataset is collected in the same manner as in the first experiment. Later, the collected data is divided into two non-overlapping sets of training and tests. More precisely, in this experiment, the dataset includes the data from the countries contributing least i.e., Portugal, Poland, Romania, and Hungary. This selection is founded on their statistical contribution, in terms of the values obtained from a European Commission study in 2019 [66,67]. For low-contributing countries, we chose countries having a statistical value of 1 or greater. All three algorithms, in this case, linear regression, support vector regression, and convolutional neural networks are applied. The results of these algorithms in terms of MAE and RMSE are given in Table 3. The first part of Table 3 provides the values of MAE for each of the lowest-contributing countries, using all three algorithms.
Similarly, the second part of Table 3 lists the RMSE values of all three algorithms. It can be seen that the results are extremely interesting; these are weak economies and their corresponding stock exchanges are also not very strong. Portugal and Romania have relatively better stock exchanges among the group of countries mentioned in this set. The variations in all these countries are also evident from the results, but these variations are less significant compared to the major contributing economies considered in this study. In this scenario, the results for all three algorithms are good, but deep learning presents even better results in terms of MAE. The best results achieved are 0.140, 0.000, 0.012, and 0.001 for Portugal, Poland, Romania, and Hungary, respectively, as can be seen in Table 3. The results are also presented in graphical form in Figure 4 for the countries contributing least. The related graphs show that there are specific variations in the stock market for each country. These outcomes were notably foreseen when the Brexit debate was at its climax in 2016. In these circumstances, the influence appears to be minimal, maybe because they are not well-established economies. However, the error rate for linear regression and support vector regression is also very good, but deep learning produced better results overall among these techniques.

4.1.3. Stock Exchange Prediction with Sentiment Analysis of Brexit Event, with Major Contributing Countries

In our third experiment, the same three different algorithms for stock exchange prediction were used. However, in this experiment, we have also considered the sentiments regarding the Brexit event in the dataset, to evaluate all of the algorithms. More explicitly, these algorithms were applied to the stock exchange dataset obtained from different European Union countries like Germany, the UK, France, the Netherlands, and Spain. A large dataset was collected for these countries. We predicted the stock exchange values using sentiment analysis regarding the Brexit event, from 24 February 2016 to 3 May 2016, consisting of 1,826,290 tweets. In this particular experiment, we have employed the data regarding major contributing countries, as listed in Table 1. After the collection of data, the whole dataset is divided into training and test sets. The training set is employed to train the algorithm and, later, the results are analyzed with the test set. Table 4 shows the results of this experiment. Similar to the previous two experiments, the results of this experiment are also validated in terms of MAE and RMSE. The first part of Table 4 provides the values for MAE, while the second part provides the RMSE values. It is clear that the prediction results have been improved using a sentiment analysis of Brexit events, especially within the small window available for the dataset. The training dataset before Brexit is huge and we have not used any other event. The algorithms were intended to adapt and learn quickly, to provide better results in these scenarios, and they performed satisfactorily except in the case of Spain. The error for all countries is higher using linear regression and support vector regression compared to deep learning in most of the cases.
The highest error observed among these major contributors is still found in the case of the UK and Spain. However, the least errors observed among these countries were for Germany, France, and the Netherlands. The best mean absolute errors for Germany, the UK, France, Netherlands, and Spain are 0.330, 4.197, 0.148, 0.417, and 12.144, respectively. The values show that there is a certain fluctuation from the Brexit point of view; mostly, it can be seen in the UK and Spain. The results are also presented in graphical form in Figure 5 for Germany, the UK, France, the Netherlands, and Spain. It is obvious from the corresponding graphs that there are certain fluctuations in the stock market for each country. These results are particularly clearly predicted using the sentiment dataset of the Brexit event, which was available for 68 days, during which Brexit discussions were at their peak back in 2016. Such information can be useful for intelligent decision-making. The results have been improved using the sentiment analysis of the Brexit event, and deep learning performed better than linear regression and support vector regression.

4.1.4. Stock Exchange Prediction with Sentiment Analysis of the Brexit Event, with Countries Contributing Least

In our last experiment, the same three algorithms were used to predict the stock exchange values for the group of countries making the least contributions to the EU budget. These countries include Portugal, Poland, Romania, and Hungary. Similar to the third experiment, we have also used sentiment information related to the Brexit event for stock prediction. The same patterns of results are visible here; these are weak economies and their corresponding stock exchanges are also not very strong, except in the case of Portugal and Romania, found among this group. The variations in all these countries are also evident from the results but these variations are less compared to those of the major contributing economies considered in this study. In this scenario, the results for all three algorithms are good, but deep learning offers even better results in terms of MAE, except in the case of Romania. The best results achieved are 0.138, 0.000, 3.177, and 0.001 for Portugal, Poland, Romania, and Hungary, respectively, as shown in Table 5. The results are also presented in graphical form in Figure 6 for Portugal, Poland, Romania, and Hungary. These results are predicted using the sentiment dataset of the Brexit event in this research. Back in 2016, the Brexit debate was at an all-time high. The results have improved using sentiment analysis of the Brexit event; deep learning performed better than both linear regression and support vector regression. It can be concluded that the effect of Brexit is more clearly visible for countries contributing greatly to the EU budget as there is an assumption that these countries might have to compensate for the disappearance of the UK share in monetary terms. On the other hand, for the UK, it is obvious from the stock exchange predictions and fluctuations that investors are, as yet, indecisive about the future. Therefore, the fluctuations that happened to most of the large contributing economies can be related to sentiments regarding the Brexit event.
Britain has already endured the consequences of Brexit, as its currency reaches an almost 30-year-low value. It has also been reported that a few major firms indicated that the decline in the currency would increase their costs. Many businesses are moving their headquarters to the EU, which has slowed down the UK economy. As far as the public sector is concerned, the EU contribution can be utilized for other projects by the government. Britain had an important position in the EU; around 14.8% of the economic area of the EU consisted of the UK, with a population of around 12.5%. The most debated discussion in Britain is about the future of British trade with the EU after Brexit. The EU’s trade deficit, which Britain runs, prompts the question of whether the EU needs Britain more than Britain needs the EU.

4.1.5. Discussion

Contribution to the Literature

Social media data analytics is one of the emerging topics in research since individual opinions and sentiments play a vital role in different events and aspects, such as companies, products, or any current issue [4,5,6]. Furthermore, this social media data analysis also assists in determining trends in the stock markets. Advanced models, like artificial neural networks and traditional intelligence-based models, have been used to perform this data analysis [19,35,36,39]. In the last few years, the tendency to use artificial intelligence-based stock forecasting models, specifically deep learning models, has increased [21,46]. However, there are also some other traditional artificial intelligence-based models, like support vector and linear regression analyses, which are used for this purpose [77,78]. Still, finding the most suitable model for stock forecasting is a vital area of research. With the current advancements in deep learning, there has been a complete shift toward using these models for data analytics. The results of deep learning-based models are exceptional for classification and prediction purposes [73,74]. From this perceptive, the current work has employed a deep learning model, namely, a convolutional neural network (CNN), to carry out social media sentiment analysis with regard to the Brexit event, to assess its impact on stock exchange markets. More precisely, we have performed a detailed analysis of stock exchanges of different EU nations, with regard to Brexit event sentiment. For comparison, we have also proposed machine learning-based data analytics models, namely, linear regression and support vector regression. It is clear from the analysis of the results that a convolutional neural network shows better results in comparison with the other two methods. One possible reason for the improved results with deep learning is the volume of data we used. We have employed sentiments from about 1,826,290 tweets regarding Brexit, which is a substantially large number that, hence, become an important factor in improving the performance of deep learning algorithms since they are data-hungry and perform better if a large amount of data is employed. In addition, we have validated all the models and reported our findings with two different experimental settings. In the first experimental setting, we performed a stock exchange prediction of both major contributors and least contributing nations without taking Brexit into account; later, in the second experimental setup, we performed the stock exchange prediction including sentiments regarding Brexit for both major contributors and countries contributing least. The results are presented in terms of MAE and RMSE for all three algorithms in each of the experiments.
Further, if an in-depth analysis of results is performed, then it becomes clear that the results of stock exchange predictions are greatly dependent on the incorporation of sentiments related to mega-events. However, in this study, the mega-event that is under consideration is Brexit. The deep learning-based frameworks provide efficient stock exchange prediction, especially when the sentiment analysis of a larger set of tweets is conducted utilizing Twitter, a social media platform, as a feature. This is owing to the fact that deep learning models are data-hungry, and, as more data is utilized, their performance improves. In a previous study, a linear model was used that showed a weak correlation between stock forecasting and the sentiments of investors [79]. The authors reported strong results that showed the substantial link between fluctuations in stock prices and the sentiments of the investors. They used only 3 hashtags in 60,000 tweets from the UK local election of 2016. The future return on volatile stocks, medium stocks, non-profitable stocks, small stocks, dividend-paying stocks, and non-dividend-paying stocks is considerably lower when the sentiments of the investors are high, and vice versa. Similarly, Economou et al. [80] also predicted stock returns through the use of social media tweets. They projected that social media tweets will have a significant impact on stock price fluctuations. Stock forecasting is also impacted by the volume of tweets. According to Chiang et al. [60], different expressions of sentiments on Twitter give the complete “set of predictors”, which in turn help to minimize the margin of error while analyzing the stock fluctuations. Investors have stochastic beliefs that cause sentiments of over-pessimism or optimism, which deviate the stock prices from their actual value. According to researchers, the correction of deviated stock prices is possible, once the economic fundamentals are revealed and the investors’ sentiments fade [68,81]. As a result of this correction of stock prices, future stock returns and the sentiments of investors are linked inversely.
In addition, investors’ sentiments become an important factor in forecasting stock returns fluctuations. Our results are in line with the statement that mega-events such as Brexit, COVID-19, or any other event related to current issues and the sentiments of investors play an important role in forecasting stock returns. Previously, it was argued that the investors’ sentiments are enough to predict small stock returns but recently, the shreds of evidence showed that stocks’ characteristics, like firm size, age, and volatility, depended on the predictive pattern of investor sentiments [82]. Most of the research has been conducted over a short period, just to forecast stock returns with the help of social media sentiments and in terms of domestic or international political events. However, our study contributes to the already existing knowledge base of a major event, namely, Brexit, to analyze sentiments and stock return fluctuation in the EU’s stock markets. Apart from this, we have used 1.82 million tweets, which is a sufficiently large dataset. This shows that our study presents intensive information supporting the importance of stock forecasting and sentiment analysis. Furthermore, in previous studies [22,60,62], the impact of the Brexit event is analyzed using different statistical approaches, as shown in Table 6. Moreover, from Table 6, it is also clear that in the existing studies, the analysis is performed for specific countries and states. However, in this study, a large group of EU nations, viewed from two different perspectives, i.e., major contributors and countries contributing least, have been considered to analyze the impact of the Brexit event on their stock exchanges. We have elicited and examined the results of stock exchange predictions with two different experimental scenarios. In the first scenario, we examined the impact without considering Brexit sentiment; however, in the second scenario, we have taken Brexit-related sentiment into account and conducted stock-exchange prediction. It can be observed that the prediction results have been improved by involving sentiment analysis of the Brexit event. In addition, this study has employed the most sophisticated and accurate approach, which is convolutional neural networks, along with two machine learning-based models used instead of statistical tools and methodologies to study the impact. It is reasonable to conclude that the proposed study presents a more in-depth and comprehensive analysis of stock exchanges with regard to a case study of Brexit social media sentiment. More specifically, all the empirical results are thoroughly illustrated by the specified list of contributions in the first section. Furthermore, Table 7 shows the comparison with existing studies, in terms of forecasting stock prices, wherein different methods are employed. It is clear from Table 7 that different research studies have employed several methods, including convolutional neural networks (CNNs) and machine learning models, such as SVR.
Furthermore, a neuro-fuzzy, two-stage ensemble approach and ARIMA models with parameter tuning, using evolutionary algorithms, are also exploited. These studies have performed a stock market prediction on the stock markets of different countries, as shown in column 4 of Table 7. It is evident from Table 7 that the method proposed in this study is optimal in comparison with existing studies.

Implications for Practice

It has been shown that recent researchers are keen to figure out the relationship and effect of public opinion exchange, on different social media platforms, on stock market fluctuations with regard to different political and social events [22,60,62]. This research used intensive data of a large event, namely, Brexit, to analyze investor sentiments through their declared mood on social media, as a means to calculate whether or not they bear any relation. The results highlight that the stock price fluctuation is related to Brexit and that it has played a role in the stock forecasting of different EU countries. Hence, this study offers numerous guidelines for policymakers, managers, and investors as it depicts the ways in which the investors’ sentiments can become a predictive force for stock forecasting; therefore, investors should be vigilant while investing in stocks that are more vulnerable to domestic and global events, e.g., COVID-19 or Brexit, etc. Market inefficiency is caused by these sentiments, followed by rumors that can seriously damage the investors’ portfolios. This irregularity happens in the market because investors mimic each other’s trade habits, based on such sentiments, causing volatility in the market. Therefore, there should be proper systems in place to educate investors, to avoid such consequences being triggered by sentiment. To this end, we have analyzed a large event in a particular set of countries. The results showed that Brexit affected most of the stock exchanges in EU countries. Hence, individual investors must be very vigilant regarding the sentiment surrounding mega-events, such as Brexit in this case, especially while making financial decisions.
Furthermore, the strength of this study includes the fact that it also helps in guiding policymakers and managers, especially in keeping the stocks’ sensitivity in mind when it comes to the responses of investors to Brexit. More precisely, it helps them to decide about stock selling and buying while keeping an eye on market trends regarding Brexit. This might not necessarily be about Brexit; there may be other events where sentiments are employed not only from Twitter but also from other platforms to examine their impact on future stock prices. One of the most daunting challenges for investors is to find an ideal moment to either purchase or sell the stocks since there are many essential factors that affect stock prices and the investors’ decisions. The perception of investors is increased, related to the influence of Brexit sentiments on the stock exchanges of EU nations, and this ultimately generates the appropriate responses. If investors can foresee how stock prices would behave in certain situations, they can move swiftly and will benefit more. To prevent any instability in the stock market, caused by social media sentiments, there is a need to design policies, safety nets, and circuit breakers to avoid such situations. There must be a system that helps individual investors to deal with the rumors that spread on social media regarding volatile macroeconomic parameters; this will also help them to avoid ending up in noise trading by surviving uncertain situations. As the findings of our study show, policymakers should keep an eye on such sensitive markets concerning the Brexit event. Furthermore, by analyzing our results from two different perspectives, i.e., the lowest contributing and major contributing countries, the results of this stock analysis indicate that by taking into account the sentiments of the Brexit event, the stock analysis becomes more meaningful and accurate, since these major events have a significant impact. It is also worth noting the impact of this research on two distinct groups of nations. As stated in the introductory section, the United Kingdom was formerly one of the most powerful and well-established members of the EU, paying significantly into the EU budget. As Brexit continues, the remaining nations paying into the EU budget, some of which have poor economies and some of which have strong economies, will see a significant financial effect as a result of the UK’s decision, in terms of investments. For example, the lowest contributing nations, which do not generally have a good economy and have a poorer financial standing, must contribute more to the budget to compensate for the impact of Brexit. Furthermore, as a result of this occurrence, the countries contributing least will be incurring expenditures since the EU budget is reduced, i.e., less support is available to them owing to a lack of funds in the budget. Similarly, on the one hand, the major contributing countries that contribute the most are under pressure to contribute more in order to offset the financial impact of Brexit. Hence, the results on stock exchange markets with regard to Brexit event sentiment play a huge role in forward planning and making the best business decisions. On the other hand, this stock analysis aids the major contributing nations in determining how to effectively compensate for the shortfall in the EU budget as a result of Brexit without bearing the excessive load of contribution, effectively take optimal decisions regarding stocks, and continue to propagate the primary objective of the EU.
The limitations of the current study include the possibility that the news or opinions of the people related to Brexit on social media platforms, such as Twitter, might be fake but, ultimately, they can affect stock market trends and results. More specifically, if certain individuals, for example, post fake tweets or news about a certain event, such as Brexit, from either a positive or negative perspective, then the actual sentiments of such individuals are disguised, and the consequences are dire as a result. For example, if there are 100 people, and 80 of them post fake news (e.g., intentionally fake tweets) about the Brexit event, and we predict stock prices based on the sentiment voiced in these fake tweets, we will end up with incorrect results and investors or business decision-makers will make poor investment decisions, based on this misleading analysis. This situation might be improved and remedied by adding one extra module by which fake tweets are removed before considering their impact on stock exchanges. One another limitation is that stock data have sequential characteristics and, to better describe such data, the advanced set of deep learning algorithms, namely, recurrent neural networks and long short-term memory (LSTM) analysis works better than the simple CNN employed in this study. Moreover, the proposed framework can be extended to evaluate the impact of any other major events on stock markets.

5. Conclusions and Future Work

Stock exchange forecasting is one of the most challenging subjects in financial markets. Currently, stock exchange forecasting using social media sentiment analysis for major social and political events is an important research area. This is because emotion and the sentiment expressed by the public influence the stock exchanges and the buying patterns of investors, as well as business decisions. In addition, the analysis of sentiments on social media platforms regarding specific events leads to providing more information, since they have significant consequences for stock exchanges. There are many such events whose impact on stock exchanges was studied in the past; however, in this particular analysis, an important event, namely, Brexit is considered as a case study. More specifically, as a primary goal of this research, we used the case study of the Brexit event to analyze the influence of its sentiment on stock markets. We have proposed an efficient deep learning approach, namely, a convolutional neural network, to accomplish this analysis. In addition to that, we also proposed machine learning frameworks, i.e., linear regression and support vector regression. For sentiments, we used the Twitter dataset of Brexit tweets to check the effect of sentiments regarding Brexit events, in terms of the major contributors and lowest contributing EU countries. In comparison with existing methods, overall, we processed more than 1.8 million tweets and extracted the sentiments related to Brexit, which data were then used for stock exchange prediction. The results are presented, both without and with sentiment analysis. The results show that sentiment analysis of Brexit improves stock exchange prediction, especially for major contributing countries. Furthermore, the major contributing nations contribute more to the EU budget, and, when Brexit is complete, it will be necessary to examine the impact on their stock markets and how their contribution is affected, in terms of profit or loss. However, for the countries contributing least, the results of the analysis will guide the decision-makers and indicate how to safeguard the countries from going over budget if the UK leaves the EU, as the countries contributing least do not have powerful economies and a misjudgment will result in wrong investment opportunities and loss. Hence, the result of stock analysis with respect to Brexit for both groups of countries is essential, to take an optimal decision regarding stock investments. Moreover, it is also clear that the proposed deep learning model works better than traditional machine learning algorithms, i.e., linear regression and support vector regression, in terms of RMSE and MAE. In major contributing countries, the MAE of the deep learning algorithm is about 49.35 less than linear regression and 1.7 times less than support vector regression, when analyzing tweets in the UK. Similarly, in the countries contributing least, the deep learning method also outperformed when analyzing tweets in Portugal, in comparison with other machine learning classifiers. This study is helpful for the various business investors and decision-makers, as it completely portrays an analysis of the stock exchanges of EU nations from two different perspectives.
In the future, this work can be extended by adding more events, including economic and political happenings from each country, to analyze its impact on stocks. As the growth of social media that has been seen in the last few years is enormous, researchers are mining opinions from them according to their needs. Many social media platforms have seen such growth, but Twitter is the only platform being used for sentiment analysis, even though a huge audience is also on Facebook. In future studies, the use of more than one social media platform will be used to extract sentiments for any specific event. This collection of sentiments from more than one platform will be stronger and more authentic. In the future, we also want to incorporate more parallel events that occur during this phase, to improve the prediction results.

Author Contributions

Conceptualization, H.M. and M.M.; data curation, S.Y.; formal analysis, M.M. and S.Y.; investigation, H.M., I.M.; methodology, M.M., I.M. and S.R.; visualization, M.M., S.Y.; writing—original draft, H.M.; writing—review and editing, J.M. and S.R. All authors have read and agreed to the published version of the manuscript.

Funding

This study was supported by the BK21 FOUR program (Education and Research Center for Securing Cyber-Physical Space) through the National Research Foundation (NRF) funded by the Ministry of Education of Korea (5199990314137).

Informed Consent Statement

Not Applicable.

Data Availability Statement

The datasets are publicly available and can also be obtained from the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Hamzaçebi, C.; Akay, D.; Kutay, F. Comparison of direct and iterative artificial neural network forecast approaches in multi-periodic time series forecasting. Expert Syst. Appl. 2009, 36, 3839–3844. [Google Scholar] [CrossRef]
  2. Fama, E.F. The behavior of stock-market prices. J. Bus. 1965, 38, 34–105. [Google Scholar] [CrossRef]
  3. Mankar, T.; Hotchandani, T.; Madhwani, M.; Chidrawar, A.; Lifna, C. Stock market prediction based on social sentiments using machine learning. In Proceedings of the 2018 International Conference on Smart City and Emerging Technology (ICSCET), Mumbai, India, 5 January 2018; pp. 1–3. [Google Scholar]
  4. Nemes, L.; Kiss, A. Social media sentiment analysis based on COVID-19. J. Inf. Telecommun. 2021, 5, 1–15. [Google Scholar] [CrossRef]
  5. Oyebode, O.; Orji, R. Social media and sentiment analysis: The Nigeria presidential election 2019. In Proceedings of the 2019 IEEE 10th Annual Information Technology, Electronics and Mobile Communication Conference (IEMCON), Vancouver, BC, Canada, 17–19 October 2019; pp. 140–146. [Google Scholar]
  6. Mustaqim, T.; Umam, K.; Muslim, M. Twitter text mining for sentiment analysis on government’s response to forest fires with vader lexicon polarity detection and k-nearest neighbor algorithm. Proc. J. Phys. Conf. Ser. 2020, 1567, 032024. [Google Scholar] [CrossRef]
  7. Biswas, S.; Sarkar, I.; Das, P.; Bose, R.; Roy, S. Examining the effects of pandemics on stock market trends through sentiment analysis. J. Xidian Univ. 2020, 14, 1163–1176. [Google Scholar]
  8. Li, X.; Xie, H.; Chen, L.; Wang, J.; Deng, X. News impact on stock price return via sentiment analysis. Knowl.-Based Syst. 2014, 69, 14–23. [Google Scholar] [CrossRef]
  9. Zammarchi, G.; Mola, F.; Conversano, C. Impact of the COVID-19 outbreak on Italy’s country reputation and stock market performance: A sentiment analysis approach. arXiv 2021, arXiv:2103.13871. [Google Scholar]
  10. Kiprop, V. Which Country Contributes the Most to the Budget of the European Union? 2019. Available online: https://www.worldatlas.com/articles/which-country-contributes-the-most-to-the-budget-of-the-european-union.html (accessed on 10 January 2022).
  11. Walker, N. Brexit Timeline: Events leading to the UK’s Exit from the European Union; House of Commons Library: London, UK, 2018. [Google Scholar]
  12. Buchholz, K. Which Countries are EU Contributors and Beneficiaries? Available online: https://www.statista.com/chart/18794/net-contributors-to-eu-budget/ (accessed on 16 March 2021).
  13. Trivedi, J.; Spulbar, C.; Birau, R.; Mehdiabadi, A. Modelling volatility spillovers, cross-market correlation and co-movements between stock markets in European Union: An empirical case study. Bus. Manag. Econ. Eng. 2021, 19, 70–90. [Google Scholar] [CrossRef]
  14. Ghazanfar, M.A.; Alahmari, S.A.; Aldhafiri, Y.F.; Mustaqeem, A.; Maqsood, M.; Azam, M.A. Using machine learning classifiers to predict stock exchange index. Int. J. Mach. Learn. Comput. 2017, 7, 24–29. [Google Scholar] [CrossRef]
  15. Nazir, F.; Ghazanfar, M.A.; Maqsood, M.; Aadil, F.; Rho, S.; Mehmood, I. Social media signal detection using tweets volume, hashtag, and sentiment analysis. Multimed. Tools Appl. 2019, 78, 3553–3586. [Google Scholar] [CrossRef]
  16. Bogle, S.; Potter, W. SentAMaL-a sentiment analysis machine learning stock predictive model. In Proceedings of the International Conference on Artificial Intelligence (ICAI), Las Vegas, NV, USA, 27–30 July 2015; p. 610. [Google Scholar]
  17. Pathak, A.; Shetty, N.P. Indian stock market prediction using machine learning and sentiment analysis. In Computational Intelligence in Data Mining; Springer: Berlin/Heidelberg, Germany, 2019; pp. 595–603. [Google Scholar]
  18. Bourezk, H.; Raji, A.; Acha, N.; Barka, H. Analyzing Moroccan Stock Market using Machine Learning and Sentiment Analysis. In Proceedings of the 2020 1st International Conference on Innovative Research in Applied Science, Engineering and Technology (IRASET), Meknes, Morocco, 16–19 April 2020; pp. 1–5. [Google Scholar]
  19. Alkubaisi, G.A.A.J.; Kamaruddin, S.S.; Husni, H. Stock Market Classification Model Using Sentiment Analysis on Twitter Based on Hybrid Naive Bayes Classifiers. Comput. Inf. Sci. 2018, 11, 52–64. [Google Scholar] [CrossRef] [Green Version]
  20. Nti, I.K.; Adekoya, A.F.; Weyori, B.A. A comprehensive evaluation of ensemble learning for stock-market prediction. J. Big Data 2020, 7, 20. [Google Scholar] [CrossRef]
  21. Hiransha, M.; Gopalakrishnan, E.A.; Menon, V.K.; Soman, K. NSE stock market prediction using deep-learning models. Procedia Comput. Sci. 2018, 132, 1351–1362. [Google Scholar]
  22. Nikou, M.; Mansourfar, G.; Bagherzadeh, J. Stock price prediction using DEEP learning algorithm and its comparison with machine learning algorithms. Intell. Syst. Account. Financ. Manag. 2019, 26, 164–174. [Google Scholar] [CrossRef]
  23. Arshad, S.; Rizvi, S.A.R.; Haroon, O. Impact of Brexit vote on the London stock exchange: A sectorial analysis of its volatility and efficiency. Financ. Res. Lett. 2020, 34, 101240. [Google Scholar] [CrossRef]
  24. Madhavi, E.; Reddy, N.R. The Effect of Brexit on Indian Stock Market: An Empirical Study. IUP J. Financ. Risk Manag. 2018, 15, 59–71. [Google Scholar]
  25. Ameur, H.B.; Louhichi, W. The Brexit impact on European market co-movements. Ann. Oper. Res. 2021, 1–17. [Google Scholar]
  26. Zubiaga, A. A longitudinal assessment of the persistence of twitter datasets. J. Assoc. Inf. Sci. Technol. 2018, 69, 974–984. [Google Scholar] [CrossRef] [Green Version]
  27. Symeonidis, S.; Effrosynidis, D.; Arampatzis, A. A comparative evaluation of pre-processing techniques and their interactions for twitter sentiment analysis. Expert Syst. Appl. 2018, 110, 298–310. [Google Scholar] [CrossRef]
  28. Chatzis, S.P.; Siakoulis, V.; Petropoulos, A.; Stavroulakis, E.; Vlachogiannakis, N. Forecasting stock market crisis events using deep and statistical machine learning techniques. Expert Syst. Appl. 2018, 112, 353–371. [Google Scholar] [CrossRef]
  29. Metawa, N.; Hassan, M.K.; Elhoseny, M. Genetic algorithm based model for optimizing bank lending decisions. Expert Syst. Appl. 2017, 80, 75–82. [Google Scholar] [CrossRef]
  30. Nguyen, T.H.; Shirai, K.; Velcin, J. Sentiment analysis on social media for stock movement prediction. Expert Syst. Appl. 2015, 42, 9603–9611. [Google Scholar] [CrossRef]
  31. Hassan, M.K.; Hassanien, A.E.; Elhoseny, M.; Metawa, N. Expert Systems in Finance: Smart Financial Applications in Big Data Environments; Routledge: London, UK, 2019. [Google Scholar]
  32. Metawa, N.; Elhoseny, M.; Hassan, M.K.; Hassanien, A.E. Loan portfolio optimization using genetic algorithm: A case of credit constraints. In Proceedings of the 2016 12th international computer engineering conference (ICENCO), Cairo, Egypt, 28–29 December 2016; pp. 59–64. [Google Scholar]
  33. Metawa, N.; Elhoseny, M.; Hassanien, A.E.; Hassan, M.K. Expert Systems in Finance; Taylor & Francis: New York, NY, USA, 2019. [Google Scholar]
  34. Fama, E.F. Efficient capital markets: II. J. Financ. 1991, 46, 1575–1617. [Google Scholar] [CrossRef]
  35. Fama, E.F.; Fisher, L.; Jensen, M.C.; Roll, R. The adjustment of stock prices to new information. Int. Econ. Rev. 1969, 10, 1–21. [Google Scholar] [CrossRef]
  36. Walczak, S. An empirical analysis of data requirements for financial forecasting with neural networks. J. Manag. Inf. Syst. 2001, 17, 203–222. [Google Scholar]
  37. Bollen, J.; Mao, H.; Zeng, X. Twitter mood predicts the stock market. J. Comput. Sci. 2011, 2, 1–8. [Google Scholar] [CrossRef] [Green Version]
  38. Qian, B.; Rasheed, K. Stock market prediction with multiple classifiers. Appl. Intell. 2007, 26, 25–33. [Google Scholar] [CrossRef]
  39. Schumaker, R.P.; Chen, H. Textual analysis of stock market prediction using breaking financial news: The AZFin text system. ACM Trans. Inf. Syst. (TOIS) 2009, 27, 12. [Google Scholar] [CrossRef]
  40. Si, J.; Mukherjee, A.; Liu, B.; Li, Q.; Li, H.; Deng, X. Exploiting topic based twitter sentiment for stock prediction. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), Sofia, Bulgaria, 4–9 August 2013; pp. 24–29. [Google Scholar]
  41. Tsibouris, G.; Zeidenberg, M. Testing the efficient markets hypothesis with gradient descent algorithms. In Neural Networks in the Capital Markets; John Wiley & Sons: Hoboken, NJ, USA, 1995; pp. 127–136. [Google Scholar]
  42. Tsibouris, G.; Zeidenberg, M. Neural networks as an alternative stock market model. In Neural Networks in the Capital Markets; John Wiley & Sons: Hoboken, NJ, USA, 1995; pp. 127–136. [Google Scholar]
  43. Vu, T.-T.; Chang, S.; Ha, Q.T.; Collier, N. An Experiment in Integrating Sentiment Features for Tech Stock Prediction in Twitter. Available online: https://aclanthology.org/W12-5503/ (accessed on 16 March 2021).
  44. 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]
  45. Ramezanian, R.; Peymanfar, A.; Ebrahimi, S.B. An integrated framework of genetic network programming and multi-layer perceptron neural network for prediction of daily stock return: An application in Tehran stock exchange market. Appl. Soft Comput. 2019, 82, 105551. [Google Scholar] [CrossRef]
  46. Mousa, R.; Nazari, S.; Abadi, A.K.; Shoukhcheshm, R.; Pirzadeh, M.N.; Safari, L. TI-Capsule: Capsule Network for Stock Exchange Prediction. arXiv 2021, arXiv:2102.07718. [Google Scholar]
  47. Valaskova, K.; Ward, P.; Svabova, L. Deep learning-assisted smart process planning, cognitive automation, and industrial big data analytics in sustainable cyber-physical production systems. J. Self-Gov. Manag. Econ. 2021, 9, 9–20. [Google Scholar]
  48. Blake, R.; Michalikova, K.F. Deep Learning-based Sensing Technologies, Artificial Intelligence-based Decision-Making Algorithms, and Big Geospatial Data Analytics in Cognitive Internet of Things. Anal. Metaphys. 2021, 20, 159–173. [Google Scholar]
  49. Grant, E. Big Data-driven Innovation, Deep Learning-assisted Smart Process Planning, and Product Decision-Making Information Systems in Sustainable Industry 4.0. Econ. Manag. Financ. Mark. 2021, 16, 9–19. [Google Scholar]
  50. Townsend, J. Interconnected sensor networks and machine learning-based analytics in data-driven smart sustainable cities. Geopolit. Hist. Int. Relat. 2021, 13, 31–41. [Google Scholar]
  51. Scott, R.; Poliak, M.; Vrbka, J.; Nica, E. COVID-19 response and recovery in smart sustainable city governance and management: Data-driven Internet of Things systems and machine learning-based analytics. Geopolit. Hist. Int. Relat. 2020, 12, 16–22. [Google Scholar]
  52. Pop, R.-A.; Săplăcan, Z.; Dabija, D.-C.; Alt, M.-A. The impact of social media influencers on travel decisions: The role of trust in consumer decision journey. Curr. Issues Tour. 2021, 1–21. [Google Scholar] [CrossRef]
  53. Blake, R.; Michalkova, L.; Bilan, Y. Robotic Wireless Sensor Networks, Industrial Artificial Intelligence, and Deep Learning-assisted Smart Process Planning in Sustainable Cyber-Physical Manufacturing Systems. J. Self-Gov. Manag. Econ. 2021, 9, 48–61. [Google Scholar]
  54. Kovacova, M.; Lăzăroiu, G. Sustainable organizational performance, cyber-physical production networks, and deep learning-assisted smart process planning in Industry 4.0-based manufacturing systems. Econ. Manag. Financ. Mark. 2021, 16, 41–54. [Google Scholar]
  55. Wu, B.; Shen, H. Analyzing and predicting news popularity on Twitter. Int. J. Inf. Manag. 2015, 35, 702–711. [Google Scholar] [CrossRef]
  56. Maqsood, H.; Mehmood, I.; Maqsood, M.; Yasir, M.; Afzal, S.; Aadil, F.; Selim, M.M.; Muhammad, K. A local and global event sentiment based efficient stock exchange forecasting using deep learning. Int. J. Inf. Manag. 2020, 50, 432–451. [Google Scholar] [CrossRef]
  57. Yasir, M.; Durrani, M.Y.; Afzal, S.; Maqsood, M.; Aadil, F.; Mehmood, I.; Rho, S. An intelligent event-sentiment-based daily foreign exchange rate forecasting system. Appl. Sci. 2019, 9, 2980. [Google Scholar] [CrossRef] [Green Version]
  58. Aswani, R.; Kar, A.K.; Ilavarasan, P.V.; Dwivedi, Y.K. Search engine marketing is not all gold: Insights from Twitter and SEOClerks. Int. J. Inf. Manag. 2018, 38, 107–116. [Google Scholar] [CrossRef] [Green Version]
  59. Grover, P.; Kar, A.K.; Dwivedi, Y.K.; Janssen, M. Polarization and acculturation in US Election 2016 outcomes—Can twitter analytics predict changes in voting preferences. Technol. Forecast. Soc. Chang. 2019, 145, 438–460. [Google Scholar] [CrossRef]
  60. Chiang, T.C.; Zheng, D. An empirical analysis of herd behavior in global stock markets. J. Bank. Financ. 2010, 34, 1911–1921. [Google Scholar] [CrossRef]
  61. Bloom, N.; Bunn, P.; Chen, S.; Mizen, P.; Smietanka, P.; Thwaites, G. The impact of Brexit on UK Firms; National Bureau of Economic Research: Cambridge, MA, USA, 2019. [Google Scholar]
  62. Caporale, G.M.; Gil-Alana, L.; Trani, T. Brexit and uncertainty in financial markets. Int. J. Financ. Stud. 2018, 6, 21. [Google Scholar] [CrossRef] [Green Version]
  63. Kurecic, P.; Kokotovic, F. Empirical analysis of the impact of Brexit referendum and post-referendum events on selected stock exchange indexes. South East Eur. J. Econ. Bus. 2018, 13, 7–16. [Google Scholar] [CrossRef] [Green Version]
  64. Abraham, M. Brexit anouncement effect on the New Zealand stock market: Theory and evidence. N. Z. J. Appl. Bus. Res. 2018, 16, 1–18. [Google Scholar]
  65. Bashir, U.; Zebende, G.F.; Yu, Y.; Hussain, M.; Ali, A.; Abbas, G. Differential market reactions to pre and post Brexit referendum. Phys. A Stat. Mech. Its Appl. 2019, 515, 151–158. [Google Scholar] [CrossRef]
  66. Amount Contributed to the Budget of the European Union (EU) in 2019, by Member State. Available online: https://www.statista.com/statistics/316691/eu-budget-contributions-by-country/ (accessed on 16 March 2021).
  67. An Official Website of the European Union. Available online: https://ec.europa.eu/info/strategy/eu-budget_en (accessed on 16 March 2021).
  68. Christie, W.G.; Huang, R.D. Following the pied piper: Do individual returns herd around the market? Financ. Anal. J. 1995, 51, 31–37. [Google Scholar] [CrossRef]
  69. Nunno, L. Stock Market Price Prediction Using Linear and Polynomial Regression Models; Computer Science Department, University of New Mexico: Albuquerque, NM, USA, 2014. [Google Scholar]
  70. Klein, M.D.; Datta, G.S. Statistical disclosure control via sufficiency under the multiple linear regression model. J. Stat. Theory Pract. 2018, 12, 100–110. [Google Scholar] [CrossRef]
  71. Cortes, C.; Vapnik, V. Support-vector networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
  72. Sousa, J.C.; Jorge, H.M.; Neves, L.P. Short-term load forecasting based on support vector regression and load profiling. Int. J. Energy Res. 2014, 38, 350–362. [Google Scholar] [CrossRef]
  73. Maqsood, M.; Bukhari, M.; Ali, Z.; Gillani, S.; Mehmood, I.; Rho, S.; Jung, Y. A Residual-Learning-Based Multi-Scale Parallel-Convolutions-Assisted Efficient CAD System for Liver Tumor Detection. Mathematics 2021, 9, 1133. [Google Scholar] [CrossRef]
  74. Maqsood, M.; Yasmin, S.; Mehmood, I.; Bukhari, M.; Kim, M. An Efficient DA-Net Architecture for Lung Nodule Segmentation. Mathematics 2021, 9, 1457. [Google Scholar] [CrossRef]
  75. Bukhari, M.; Bajwa, K.B.; Gillani, S.; Maqsood, M.; Durrani, M.Y.; Mehmood, I.; Ugail, H.; Rho, S. An efficient gait recognition method for known and unknown covariate conditions. IEEE Access 2020, 9, 6465–6477. [Google Scholar] [CrossRef]
  76. Santhanavijayan, A.; Kumar, D.N.; Deepak, G. A semantic-aware strategy for automatic speech recognition incorporating deep learning models. In Intelligent System Design; Springer: Berlin/Heidelberg, Germany, 2021; pp. 247–254. [Google Scholar]
  77. Dash, R.K.; Nguyen, T.N.; Cengiz, K.; Sharma, A. Fine-tuned support vector regression model for stock predictions. Neural Comput. Appl. 2021, 1–15. [Google Scholar] [CrossRef]
  78. Emioma, C.; Edeki, S. Stock price prediction using machine learning on least-squares linear regression basis. Proc. J. Phys. Conf. Ser. 2021, 1734, 012058. [Google Scholar] [CrossRef]
  79. Demirer, R.; Kutan, A.M.; Chen, C.-D. Do investors herd in emerging stock markets?: Evidence from the Taiwanese market. J. Econ. Behav. Organ. 2010, 76, 283–295. [Google Scholar] [CrossRef]
  80. Economou, F.; Kostakis, A.; Philippas, N. Cross-country effects in herding behaviour: Evidence from four south European markets. J. Int. Financ. Mark. Inst. Money 2011, 21, 443–460. [Google Scholar] [CrossRef]
  81. Bai, J.; Perron, P. Computation and analysis of multiple structural change models. J. Appl. Econom. 2003, 18, 1–22. [Google Scholar] [CrossRef] [Green Version]
  82. Davies, R.B. Hypothesis testing when a nuisance parameter is present only under the alternative. Biometrika 1987, 74, 33–43. [Google Scholar]
  83. Mehtab, S.; Sen, J. Stock price prediction using convolutional neural networks on a multivariate timeseries. arXiv 2020, arXiv:2001.09769. [Google Scholar]
  84. Henrique, B.M.; Sobreiro, V.A.; Kimura, H. Stock price prediction using support vector regression on daily and up to the minute prices. J. Financ. Data Sci. 2018, 4, 183–201. [Google Scholar] [CrossRef]
  85. Zhang, J.; Li, L.; Chen, W. Predicting stock price using two-stage machine learning techniques. Comput. Econ. 2021, 57, 1237–1261. [Google Scholar] [CrossRef]
  86. Rajab, S.; Sharma, V. An interpretable neuro-fuzzy approach to stock price forecasting. Soft Comput. 2019, 23, 921–936. [Google Scholar] [CrossRef]
  87. Kumar, R.; Kumar, P.; Kumar, Y. Multi-step time series analysis and forecasting strategy using ARIMA and evolutionary algorithms. Int. J. Inf. Technol. 2021, 1–15. [Google Scholar] [CrossRef]
Figure 1. The proposed methodology for stock exchange prediction, based on social media sentiment analysis for Brexit.
Figure 1. The proposed methodology for stock exchange prediction, based on social media sentiment analysis for Brexit.
Systems 10 00024 g001
Figure 2. The deep learning architecture used for stock exchange prediction.
Figure 2. The deep learning architecture used for stock exchange prediction.
Systems 10 00024 g002
Figure 3. The stock prediction results for major contributing countries, without sentiment analysis of the Brexit event, shown in a graphical form.
Figure 3. The stock prediction results for major contributing countries, without sentiment analysis of the Brexit event, shown in a graphical form.
Systems 10 00024 g003aSystems 10 00024 g003b
Figure 4. The stock prediction results for countries contributing least, without sentiment analysis of the Brexit event, shown in a graphical form.
Figure 4. The stock prediction results for countries contributing least, without sentiment analysis of the Brexit event, shown in a graphical form.
Systems 10 00024 g004aSystems 10 00024 g004b
Figure 5. The stock prediction results for major contributing countries, with sentiment analysis of the Brexit event, shown in a graphical form.
Figure 5. The stock prediction results for major contributing countries, with sentiment analysis of the Brexit event, shown in a graphical form.
Systems 10 00024 g005aSystems 10 00024 g005b
Figure 6. The stock prediction results for countries contributing least, with sentiment analysis of the Brexit event in graphical form.
Figure 6. The stock prediction results for countries contributing least, with sentiment analysis of the Brexit event in graphical form.
Systems 10 00024 g006
Table 1. The details of the stock exchanges of the EU’s highest- and lowest-contributing countries.
Table 1. The details of the stock exchanges of the EU’s highest- and lowest-contributing countries.
Stock Exchange Dataset
Major Contributor to EU Budget
Country NameStock Market NameStarting DateEND DATE
GermanyFrankfurt18 November 199614 April 2020
UKLondon14 April 200314 April 2020
FranceParis20 June 201414 April 2020
NetherlandsEuronext12 April 199614 April 2020
SpainMadrid4 December 199614 April 2020
Least Contributor to EU Budget
Country NameStock Market NameStarting DateEnd Date
PolandWarsaw28 December 200714 April 2020
HungaryBudapest23 October 200714 April 2020
PortugalEuronext Lisbon20 June 201414 April 2020
RomaniaBucharest31 December 200414 April 2020
Table 2. The stock prediction results for major contributing countries, without sentiment analysis of the Brexit event.
Table 2. The stock prediction results for major contributing countries, without sentiment analysis of the Brexit event.
Most Contributing CountriesMean Absolute Error (MAE)Root Mean Squared Error (RMSE)
Linear RegressionSupport Vector RegressionDeep LearningLinear RegressionSupport Vector RegressionDeep Learning
Germany0.403 ± 0.4180.287 ± 0.2980.403 ± 0.2820.5800.4140.492
UK53.856 ± 49.0576.277 ± 6.4754.586 ± 4.22472.8509.0186.235
France0.313 ± 0.4610.116 ± 0.1040.140 ± 0.3400.5580.1560.368
Netherlands2.200 ± 2.2190.202 ± 0.1480.824 ± 0.4393.1250.2510.934
Spain63.757 ± 69.4114.814 ± 3.76610.580 ± 7.35894.2506.11312.887
Table 3. The stock prediction results for countries contributing least, without sentiment analysis of the Brexit event.
Table 3. The stock prediction results for countries contributing least, without sentiment analysis of the Brexit event.
Least Contributing CountriesMean Absolute Error (MAE)Root Mean Squared Error (RMSE)
Linear RegressionSupport Vector RegressionDeep LearningLinear RegressionSupport Vector RegressionDeep Learning
Portugal0.313 ± 0.4610.116 ± 0.1040.140 ± 0.3400.5580.1560.368
Poland0.001 ± 0.0040.000 ± 0.0010.000 ± 0.0000.0040.0010.000
Romania0.061 ± 0.0670.024 ± 0.0270.012 ± 0.0110.0910.0360.016
Hungary0.004 ± 0.0070.000 ± 0.0000.001 ± 0.0010.0080.0000.001
Table 4. The stock prediction results for major contributing countries, with sentiment analysis of the Brexit event.
Table 4. The stock prediction results for major contributing countries, with sentiment analysis of the Brexit event.
Major Contributing CountriesMean Absolute Error (MAE)Root Mean Squared Error (RMSE)
Linear RegressionSupport Vector RegressionDeep LearningLinear RegressionSupport Vector RegressionDeep Learning
Germany0.402 ± 0.4170.288 ± 0.2980.330 ± 0.2690.5790.4140.426
UK53.822 ± 48.9356.291 ± 6.4594.197 ± 3.67272.7429.0165.652
France0.310 ± 0.4590.123 ± 0.1030.148 ± 0.1810.5540.1600.234
Netherlands2.200 ± 2.2190.202 ± 0.1480.417 ± 0.6743.1250.2510.850
Spain63.757 ± 69.4103.615 ± 3.49712.144 ± 13.14094.2505.03018.582
Table 5. The stock prediction results for countries contributing least, with sentiment analysis of the Brexit event.
Table 5. The stock prediction results for countries contributing least, with sentiment analysis of the Brexit event.
Countries Contributing LeastMean Absolute Error (MAE)Root Mean Squared Error (RMSE)
Linear RegressionSupport Vector RegressionDeep LearningLinear RegressionSupport Vector RegressionDeep Learning
Portugal0.310 ± 0.4590.123 ± 0.1030.138 ± 0.1810.5540.1600.234
Poland0.001 ± 0.0040.000 ± 0.0010.000 ± 0.0000.0040.0010.001
Romania0.056 ± 0.0630.024 ± 0.0263.177 ± 1.8270.0840.0363.665
Hungary0.004 ± 0.0070.000 ± 0.0000.001 ± 0.0010.0080.0000.001
Table 6. Comparison with existing studies, with regard to Brexit event-based stock exchange analysis.
Table 6. Comparison with existing studies, with regard to Brexit event-based stock exchange analysis.
Impacts of Brexit Reported in Existing Studies
AuthorsApproachCountry/Stock ExchangesAnalysis
Bloom et al. [61] A surveyUK firms Impact of Brexit on UK firms
Madhavi et al. [24] Autoregressive modelsIndian Stock exchangeImpact of Brexit on Indian Stock exchange
Caporale et al. [62]Long memory techniquesFinancial marketsImpact of Brexit with regard to uncertainty in financial markets
Bashir et al. [65] Detrended fluctuation analysis (DFA) and detrended cross-correlation coefficient EU countries including UKExchanges rates in EU countries and relational dynamics of the stock market
Current studyMachine learning and deep learning techniquesStock exchanges of EU major and countries contributing leastImpact of Brexit social media sentiments on EU stock exchanges
Table 7. Comparison with existing studies, in terms of forecasting of stock prices.
Table 7. Comparison with existing studies, in terms of forecasting of stock prices.
Existing Studies for Forecasting Stock Prices
AuthorsApproachTaskSocial Media Sentiments
Mehtab et al. [83] Convolutional Neural networkNational stock exchange (NSE) anlsysis of IndiaNo
Henrique et al. [84] Support Vector RegressionBrazilian, American, and Chinese stock markets analysisNo
Zhang et al. [85]Two stage-ensemble models (SVR and ENANFIS)Shanghai and Shenzhen Stock exchangesNo
Rajab et al. [86]Neuro-fuzzy approachBombay stock exchange markets, CNX Nifty Index, S&P 500 indexNo
Kumar et al. [87]ARIMA + Evolutionary algorithms (DE + ABC)National stock exchange and Bombay stock exchange No
Current StudyConvolutional neural networkStock exchanges of EU major and countries contributing leastYes (impact of Brexit social media sentiments)
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Maqsood, H.; Maqsood, M.; Yasmin, S.; Mehmood, I.; Moon, J.; Rho, S. Analyzing the Stock Exchange Markets of EU Nations: A Case Study of Brexit Social Media Sentiment. Systems 2022, 10, 24. https://doi.org/10.3390/systems10020024

AMA Style

Maqsood H, Maqsood M, Yasmin S, Mehmood I, Moon J, Rho S. Analyzing the Stock Exchange Markets of EU Nations: A Case Study of Brexit Social Media Sentiment. Systems. 2022; 10(2):24. https://doi.org/10.3390/systems10020024

Chicago/Turabian Style

Maqsood, Haider, Muazzam Maqsood, Sadaf Yasmin, Irfan Mehmood, Jihoon Moon, and Seungmin Rho. 2022. "Analyzing the Stock Exchange Markets of EU Nations: A Case Study of Brexit Social Media Sentiment" Systems 10, no. 2: 24. https://doi.org/10.3390/systems10020024

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