According to the Efficient Market Hypothesis, financial market movements are dependent on news and external events that have a significant impact on the market value of companies. Thus, a great amount of applications has arisen to explore this knowledge through automatic sentiment and opinion extraction. The technique known as Sentiment Analysis (SA) aims to analyze opinions, sentiments, and emotions present in unstructured data, leading many papers to address the impact of news and social media publications on the financial market. However, the literature lacks works considering the effects of sentiment available on social media and its impacts on the Brazilian stock market. This work aims to conduct a study of the Brazilian stock market movement through SA in Twitter considering tree perspectives: (i) absolute number of tweet sentiments; (ii) tweets sentiments weighted by favorites; and (iii) tweets sentiments weighted by retweets. The analyzed period was the Brazilian electoral period of 2018 (01-Oct-2018 to 31-Dec-2018). In this paper, we first developed a comparison study with SA Machine Learning techniques (Naive Bayes, Support Vector Machines, Maximum Entropy, and Multilayer Perceptron) and then applied the best algorithm to establish the relations between sentiments and the Brazilian stock market movement considering different time frames (windows sizes). Results indicate that Multilayer Perceptron was the best technique to perform SA in Portuguese. In addition, we observed that the predominant sentiment in social media relates to the stock market movement, improving accuracy as long as windows sizes are increased.
The application of time series analysis and forecasting to stock markets is particularly relevant to Technical Analysis, which uses historical values to obtain indicators that highlight possible trends in stock prices. In practice, most of these indicators are evaluated graphically and their direct impact on the quality of stock price forecasting has not been appraised so far. Therefore, the impact of different technical indicators on the prediction of stock closing prices was evaluated in this paper. Under the machine learning perspective, each technical indicator was used as input for artificial neural networks (multilayer perceptrons) trained to forecast the daily stock closing prices of five companies with high representation in the Brazilian IBovespa index. The results have led to two main conclusions: (i) lagging technical indicators such as the Exponential Moving Average and Weighted Moving Average, when used as isolated inputs of the neural networks, can improve the accuracy of the stock forecast when compared to forecasts made with the original series of closing prices; and (ii) the combination of different indicators as inputs to the same neural network can improve even more the forecasting performance. These results may contribute to the development of more robust forecasting techniques for stock prices in the future.