Assistive Technology in Stock Market Decision Making Radu Adrian Ciora1, Marius Cioca1 and Carmen Mihaela Simion1 1 Lucian Blaga University of Sibiu, Sibiu, Romania {radu.ciora,marius.cioca,carmen.simion}@ulbsibiu.ro Abstract. Stock markets are probably the most dynamic business field. Fast in- formation processing is necessary for proper asset management. Thus, a machine assistive technology would be a very important asset for stock traders. In this context, we come up with the idea of an information processing solution based on semantic that would give stockbrokers a recommendation tool, which gives them suggestions for when and what to buy and sell. The system that we called STOMADESUS – STOck MArket Decision Support System is based on fast in- formation retrieval and processing from news feeds. The processed information interpretation is the biggest challenge as it is the key for the proper recommen- dation of the broker's actions. Keywords: information processing, semantics, stock markets, business intelli- gence, ontologies. 1 Overview The Financial stock market and industry are information-focused domains. Thus, the information is the most important aspect in decision making of financial stakeholders. The information that these stakeholders require for a good decision is spread throughout internet. In order to process this information, it first needs to be harvested. The study of stock market evolution is a topic with high volatility nowadays. Choos- ing the right information sources is also important. If we look at stock market prices evolution in time, we see a very complex price variation, no matter the timeframe taken into account. This happens because of the technological advances in information technology and communications industries, both playing key roles in the stock markets’ high volatility. If we watch any of the stock exchange markets, we see almost every second modifications both in the bids but also in the asked prices, to various traded products. This is the consequence of using infor- mation technology in the stock exchange markets, which delivers information almost instantly around the globe [1]. Until now, the tools that the traders had at hand were based on applications that analyse price behaviour from past price recordings. There is no such solution that takes into account the news feeds. Previous solutions are usually based on recorded stocks’ prices, and predictions are based price evolution in time. In this paper, we propose a novel way to improve stock decision-making process. Thus, with the aid of ontologies and news feeds we created a decision support system 2 capable of providing the trader real-time valuable information about future stock mar- ket evolution. 2 Related Work Sentiment analysis from financial news has been described in several papers in the literature. In [2] an algorithm for feature extraction from financial news is proposed. Their solution is based on a methodology, which involves a classifier that annotates financial news with positive or neg- ative markers, based on ontology. The annotated information is than passed to a semantic ana- lyser. The results are a set of news grouped by their degree of positivism or negativism. The system was tested with 900 financial news and it offered an 87% aggregate mean accuracy. Semantic information annotation is presented by [3]. In their approach, they processed Reu- ters financial news feeds. They manually annotated the collected headlines into various catego- ries. Afterwards, they defined an ontology with four major categories: social, economic, financial and environmental. Then they refined the main categories into subclasses. For example, econom- ics has subclass stock market, currency, investment and so on. After they identified the concepts, their focus shifted in defining the attributes that characterize these concepts. The attributes con- sisted of the name of the company referred in the news, the date of extraction and the category the news belongs to. The system was tested on 227 headlines, and returned 136 reliable results. One of the major drawbacks of these approaches is the manual categorization of the news and so some headlines that can belong to more than one category are omitted. A stock market ontology is described in [4]. It is part of a larger financial ontology created for an e-banking application. It allows user to realize complex operations in stock exchange mar- ket using a natural language processing features. The stock market ontology has several layers of abstraction. At the top level, it comprises of services, products, channels, users and currencies, which are further refined into subclasses and in the leaves, there are entities and attributes that characterize these entities. The ontology was implemented in WSML using wsmostudio. All the presented papers present good information processing techniques, which have strengths and weaknesses. However, they have different usage capabilities and perform differ- ently. The analysis of work in this domain, has taken us to a set of essential characteristics that an information processing application should posses: • It should accept information from multiple sources • It should be able to filter the information received • It should have a labelling system; • It should provide dynamic ontology extensibility • It should make predictions dynamically. What distinguish our approach from the existing work in the literature is a dynamic ontology extensibility and also the live predictions. 3. Problem Definition In order to be a good trader, one needs to be informed. Apart from basic training, the trader needs to stay updated about what happens in the market. Thus, news websites such as Google Finance and Yahoo Finance come in handy for this task. Other influential websites are Wall Street Journal 3 and Bloomberg. Nowadays investors ought to read and process a lot of information that is essen- tial for making correct judgments and acquire profitable assets. As soon as a company makes its initial public offering, its shares become available for trading on the stock market. There are many stock markets throughout the world, which are linked to- gether electronically. This results in more liquid and more efficient markets. The prices of share in a stock market can be set in various way but the most common is through a bidding process. A bid represents the price at which a trader is willing to buy assets. An offer represents the price at which another trader is willing to sell his assets. When the two values become equal, a transaction takes place. What drives the fluctuations of shares in the stock market? The person that holds the answer to this key question is a winner, because he should be able to know when it is the best time to buy or to sell certain assets. Stock prices change very often even several times a minute as the result of market trends. By this we mean that share prices change because of variations of supply and demand. If people are interested in buying an asset at a given moment – it is called high demand, then selling it – which is called a surplus in supply, then the price moves up. The reciprocity property is also valid: if people are more inclined to sell a stock than buy it, there would be greater supply than demand, and the price would go down. Therefore, for any trade to actually happen there needs to be exactly one buyer and one seller – so the number of buyers and sellers is technically equal. What we mean here is the number of motivated buyers or sellers, for example those that are willing to buy for higher or sell for lower. The price of a stock represents the “value” of the corporation. However, what does a com- pany’s value represent? A company has assets and it sells products. The assets it has – buildings, hardware, patents, cash in bank accounts, etc. – represent its register value, or the price a company would get if they sold all this stuff at once. Nevertheless, companies are primarily in business of trying to make a profit, and therefore they earn cash by selling products or services, so the total value of a company has to do with the stuff it owns now and the cash flows it will receive in the future. The value of the stuff it owns now is straightforward to determine, but the value of the future cash flow is not a trivial task and there is no key solution to it – and it is this piece that is responsible for market gyrations. In general, financial stock markets are influenced by two kinds of events: programmed ones and unforeseen ones. Programmed events refer to financial reports that are presented on a regular basis, central bank interest rates and reports, companies’ trimestral reports. Unforeseen events refer to anything that cannot be predicted or that happens spontaneously like for example natural calamities or disasters. In addition to individual stocks, many investors are concerned with stock indices (also called indexes). Indices represent aggregated prices of a number of different stocks, and the movement of an index is the net effect of the movements of each individual component. When people talk about the stock market, they often are actually referring to one of the major indices such as the Dow Jones Industrial Average (DJIA) or the S&P 500. The DJIA is a price-weighted index of 30 large American corporations. Because of its weighting scheme and that it only consists of 30 stocks – when there are many thousand to choose from – it is not really a good indicator of how the stock market is doing. The S&P 500 is a market cap-weighted index of the 500 largest companies in the U.S., and is a much more valid indicator. Indices can be broad such as the Dow Jones or S&P 500, or they can be specific to a certain industry or market sector. 4 There are many competing theories that try to explain the way stock prices move the way they do. Unfortunately, there is no one theory that can explain everything, but news are of crucial importance when it comes to stock market fluctuation. The information sources that this news come from are also of great importance. As news authors, we can have public institutions, or privately held companies, as well as individuals which are domain experts. The market can be affected by hype about a certain company or mare specif- ically about its products or services. Companies as well as their shareholders are the most inter- ested in promoting their owned assets, by presenting positive financial reports, glamourous news- letters, blogs, press releases and news reports, tools that can create high expectations in the mar- ket, which obviously translates into a raise of the stock prices. This can happen even if the hype has no foundation in reality. Investors do not wait to check if the news is true or false, instead they follow the reaction of the crowd to the hype and invest accordingly. The hype can be started by well-known personalities like Warren Buffett, Bill Gross or Peter Lynch and as of their well- known success in the field; they can sometimes affect the movement of markets by simply sug- gesting that developments might occur. After having identified the proper information sources, the next thing that needs to be ana- lysed is the subject itself – the company whose shares are of interest. The main aspects that need to be taken into account are presented below. The management of a company is a very sensitive aspect that definitely affects the shares prices. Changes in the management – in either the board of directors or the main shareholders of the company affect the shares prices, either in a positive but can also affect them in a negative way, depending how the large public perceives the changes. The products of the company are also important assets that affect the shares’ price of an or- ganization. Whether there is news about launches of new products, or test results of existing ones – all these pieces of information form a puzzle that in the end affect the company’s shares price. Information presented in the news about the organization’s financial health, either through term reports or reports written by independent financial analysts also translate into the assets prices. The geographical exposure of a company has also a significant impact in the shares prices, because there is more general news that affect geographical areas, for example about natural dis- asters or conflict zones. As a conclusion, any news or information that links to a certain organization might influence either in a positive way or in a negative way that particular organisation’s shares’ price. Thus, information cannot be treated alone, as a single piece of information. The solution for processing all these pieces of information that can be found into a grid-based decision support system [5]. 4. Methodology By analysing the existing literature, we come up with the idea of using natural language pro- cessing, statistics and semantic web features in order to infer the useful information that is present in news [6]. In order to successfully identify the meaning of this information ontology was developed. The reason why an ontology was chosen is because an ontology allows us to infer knowledge by interrogating it, but also it allows for software flexibility, as new pieces of information can be added dynamically into the ontology without the need for software recompilation. 5 News feeds harvesting is not a trivial task. As presented in the work of [7], the term entropy comes as relevant measure of a given text, both at character level but also at word level. Thus, the bigger the entropy of a text, the more complex the text is and it contains more information. In this paper, we do not take into account the complexity of words, but rather only the seman- tics. This can be achieved by using hierarchical concepts like those depicted in WordNet or the multiple meanings of a word as suggest by [8]. In the previous section, we described the aspects of a company that need to be taken into account when evaluating its assets. Now if we look at the actual news that give us the information about these companies, there are certain intrinsic aspect of the news that are of great interest and these are: type, subject, age and impact. With regard to the source of the news, one should be interested int the source rank, but also credibility. The quantitative interpretation of economic and financial has been used as a mean of demon- strating the predictivity of financial markets. The impact of news should be studied in terms of volatility and trade volume implications [9]. Firstly, information needs to be filtered and categorised. In order to achieve this, we created an ontology called STOck Market ONTology (STOMAONT). The main classes of STOMAONT are those depicted in Figure1. Thing Indexes (DJIA, Geolocation S&P500 ) Products and News Services Shares’ Price Company Fig 1. STOMAONT Ontology Apart from these classes, there are several attributes that these classes possess, which are particular for the objects stored in the ontology. The semantics of the stock market domain is expressed by the properties stored within the ontology. We used the ontology to map the seman- tics of the news and thus enabling our application to work at human conceptual level. The ontol- ogy provides the common vocabulary that is needed for proper information extraction. The mapping of the news information into the ontology is achieved by the aid of a text parser that also categorizes the information into positive or negative information. Then the information is timestamped and fed into the ontology. There are a number of features that are clear markers for negative information about a company or an organisation. These include works like shortfall, negative and investigation. On the other hand, words like forthcoming, positive and investment definitely are part of positive news. As an example, let us take the following statement: “Apple sales increase as of launch of iPhone X.” Morphological analysis of the sentence results in the following: the subject is Apple Inc.; the predicate is increase; the complements are sales and iPhone X. As this sentence is broken down into these pieces of information, a positive news can be inferred and stored into the ontol- ogy. 6 Moreover, this ontology helps us infer more information from news feeds, by making corre- lations among them. It contains a vocabulary and a set of rules that allows the ontology to be queried in real time, using SPARQL. The SPARQL queries are triggered based on predefined events and have as parameters names of organisations or companies that are subject of invest- ment. What the ontology needs to infer is it is geolocation and the news that affect it, directly or indirectly. The queries return results about the opportunity of investing in a certain company. In case of non-existing information, alternative solutions may be suggested. 5. Conclusions and Perspectives What our system tries to do is to put in information into context. It does this with the aid of geotagging and geolocation, both for the news it parses but also for the company of interest. We believe that this research comes a possible answer to just-in-time information processing and on the spot trade recommendations regarding current assets, based on existing information on the market, thus proving brokers with a consultative tool in the trading process. The system is capable of instantly adjusting its recommendations dynamically whenever it finds relevant news related to the investigated field. As future work, we aim to improve its functionality by extending our ontology concepts with new attributes and classes. In addition, we are interested to provide recommendations for buying new assets, similar to those already acquired and provide viable alternatives for those, which prove less productive. Another direction of future investigations is to take into account not only the companies local context, but also regional one, maybe also continental one and why not the global context. References 1. Schwert, W.G.: Stock Market Volatility, Financial Analysts Journal, pp.23-34, CFA Insti- tute, https://doi.org/10.2469/faj.v46.n3.23 (1990). 2. Ruiz-Martínez, J.M., Valencia-García, Rafael, García-Sánchez, F.: Semantic-Based Senti- ment analysis in financial news, Proceedings of the 1st International Workshop on Finance and Economics on the Semantic Web (2012). 3. Mellouli, S., Bouslama, F., Akande, A.: An ontology for representing financial headline news, Web Semantics: Science, Services and Agents on the World Wide Web, Volume 8, Issue 2, 2010, pp. 203-208, ISSN 1570-8268, http://dx.doi.org/10.1016/j.web- sem.2010.02.001 (2010). 4. Alonso, L. S., Bas, L. J., Bellido, S., Contreras, J., Benjamins, R., Gomez, M. J.: WP10: case study eBanking D10. 7 financial ontology. Data, information and process integration with semantic web services ((2005). 5. Buraga, S.C., Cioca, M., Cioca, A.: Grid-based decision support system used in disaster management, Studies in Informatics and Control-SIC, 16 (3), pp. 283-296 (2007). 6. Cioca, M., Ghete, A.-I., Cioca, L.-I., Gîfu, D.: Machine learning and creative methods used to classify customers in a CRM system, Applied Mechanics and Materials, 371, pp. 769-773 (2013). 7 7. Gîfu, D.: Semantic Particularities of Journalistic Text, at the 3rd International Conference Literature, Discourse and Multicultural Dialogue, section: Communication, Public Rela- tions, Journalism, LDMD-2015, 3-4 Dec. 2015, "Petru Maior" University of Târgu-Mureș. In: Proceedings of the International Conference Literature, Discourse and Multicultural Dialogue, I. Boldea (coord.), vol. 3, Arhipelag XXI Press, pp. 182-196 (2015). 8. Gîfu, D.: Lexical Semantics in Text Processing. Contrastive Diachronic Studies on Roma- nian Language, PhD thesis, “Alexandru Ioan Cuza” University of Iași, Romania (2016). 9. Vázsonyi, M.: Overview of quantitative news interpretation methods applied in financial market predictions, Periodica Polytechnica: Social and Management Sciences, Volume 17/1, pp. 17-29 (2009).