Sentiment analysis in the stock market based on Twitter data
Autor(a) principal: | |
---|---|
Data de Publicação: | 2021 |
Tipo de documento: | Dissertação |
Idioma: | eng |
Título da fonte: | Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
Texto Completo: | http://hdl.handle.net/10071/24237 |
Resumo: | In this dissertation, we discuss how Twitter can help detecting public sentiment towards companies listed in the stock market, in particular listed in the S&P 500 index (S&P 500). The collection of data is done through a web scrapper that collects tweets from Twitter, using advanced search features based on queries related to the companies under scrutiny. The content of tweets are classified as positive, neutral or negative sentiments and the outcome is then compared against stock market prices. To do so, it is proposed and implemented a framework with different Sentiment Analysis (SA) models and Machine Learning (ML) techniques. Also, to establish which models are more appropriate in detecting and classifying sentiments, a series of visual representations were created to evaluate and compare results. As a conclusion, the results obtained show that an increase in the volume of tweets leads to oscillations in both stock price and trading volume. Furthermore, the data analysis performed in relation to some companies under scope shows that the use of moving averages of sentiment scores makes the analysis clearer and more insightful, which is particular useful when measuring the strength or weakness of the price of a stock. In the end, it can be perceived as a momentum indicator for the stock market. |
id |
RCAP_a4fd54399a541338a8c3d7b781b65ec0 |
---|---|
oai_identifier_str |
oai:repositorio.iscte-iul.pt:10071/24237 |
network_acronym_str |
RCAP |
network_name_str |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
repository_id_str |
7160 |
spelling |
Sentiment analysis in the stock market based on Twitter dataSentiment analysisMedia sociais -- Social mediaTwitterStock marketPolarity detectionAnálise de sentimentosMercado financeiroDetecção de polaridadeIn this dissertation, we discuss how Twitter can help detecting public sentiment towards companies listed in the stock market, in particular listed in the S&P 500 index (S&P 500). The collection of data is done through a web scrapper that collects tweets from Twitter, using advanced search features based on queries related to the companies under scrutiny. The content of tweets are classified as positive, neutral or negative sentiments and the outcome is then compared against stock market prices. To do so, it is proposed and implemented a framework with different Sentiment Analysis (SA) models and Machine Learning (ML) techniques. Also, to establish which models are more appropriate in detecting and classifying sentiments, a series of visual representations were created to evaluate and compare results. As a conclusion, the results obtained show that an increase in the volume of tweets leads to oscillations in both stock price and trading volume. Furthermore, the data analysis performed in relation to some companies under scope shows that the use of moving averages of sentiment scores makes the analysis clearer and more insightful, which is particular useful when measuring the strength or weakness of the price of a stock. In the end, it can be perceived as a momentum indicator for the stock market.Nesta dissertação, é analisada a forma como a plataforma Twitter pode ajudar a detectar sentimento público relativamente a empresas cotadas em bolsa, com foco em empresas que fazem parte do indíce americano S&P 500. A obtenção de dados é feita através de um web scrapper, que recolhe tweets através de funções de pesquisa avançada, baseada em queries associadas às empresas em análise. O conteúdo dos tweets são classificados como positivos, neutros ou negativos, sendo os resultados comparados de seguida com os preços das ações. Nesse sentido, é proposta um arquitectura de trabalho, com a respetiva implementação, que inclui vários modelos de análise de sentimento e técnicas de Machine Learning. Por outro lado, de modo a estabelecer quais são os modelos mais adequados para detectar e classificar sentimentos, são criados várias representações visuais para avaliar e comparar resultados. Como conclusão, os resultados obtidos mostram que um aumento do número de tweets conduz a oscilações, quer no preço, quer na quantidade de ações transacionadas. Além disso, a análise de dados levada a cabo relativamente a algumas empresas em estudo, mostra que a utilização de médias móveis de resultados de sentimento torna a leitura da análise mais clara e evidente, o que é bastante útil para medir a força ou fraqueza do preço de determinada ação. Acima de tudo, tal poderá ser percecionado como um indicador de momento para o mercado de capitais.2022-01-21T12:51:08Z2021-12-02T00:00:00Z2021-12-022021-11info:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisapplication/pdfhttp://hdl.handle.net/10071/24237TID:202855074engSacramento, José Maria Guerreiro Ferreira Félix doinfo:eu-repo/semantics/openAccessreponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãoinstacron:RCAAP2023-11-09T17:27:54Zoai:repositorio.iscte-iul.pt:10071/24237Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireopendoar:71602024-03-19T22:12:27.362099Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãofalse |
dc.title.none.fl_str_mv |
Sentiment analysis in the stock market based on Twitter data |
title |
Sentiment analysis in the stock market based on Twitter data |
spellingShingle |
Sentiment analysis in the stock market based on Twitter data Sacramento, José Maria Guerreiro Ferreira Félix do Sentiment analysis Media sociais -- Social media Stock market Polarity detection Análise de sentimentos Mercado financeiro Detecção de polaridade |
title_short |
Sentiment analysis in the stock market based on Twitter data |
title_full |
Sentiment analysis in the stock market based on Twitter data |
title_fullStr |
Sentiment analysis in the stock market based on Twitter data |
title_full_unstemmed |
Sentiment analysis in the stock market based on Twitter data |
title_sort |
Sentiment analysis in the stock market based on Twitter data |
author |
Sacramento, José Maria Guerreiro Ferreira Félix do |
author_facet |
Sacramento, José Maria Guerreiro Ferreira Félix do |
author_role |
author |
dc.contributor.author.fl_str_mv |
Sacramento, José Maria Guerreiro Ferreira Félix do |
dc.subject.por.fl_str_mv |
Sentiment analysis Media sociais -- Social media Stock market Polarity detection Análise de sentimentos Mercado financeiro Detecção de polaridade |
topic |
Sentiment analysis Media sociais -- Social media Stock market Polarity detection Análise de sentimentos Mercado financeiro Detecção de polaridade |
description |
In this dissertation, we discuss how Twitter can help detecting public sentiment towards companies listed in the stock market, in particular listed in the S&P 500 index (S&P 500). The collection of data is done through a web scrapper that collects tweets from Twitter, using advanced search features based on queries related to the companies under scrutiny. The content of tweets are classified as positive, neutral or negative sentiments and the outcome is then compared against stock market prices. To do so, it is proposed and implemented a framework with different Sentiment Analysis (SA) models and Machine Learning (ML) techniques. Also, to establish which models are more appropriate in detecting and classifying sentiments, a series of visual representations were created to evaluate and compare results. As a conclusion, the results obtained show that an increase in the volume of tweets leads to oscillations in both stock price and trading volume. Furthermore, the data analysis performed in relation to some companies under scope shows that the use of moving averages of sentiment scores makes the analysis clearer and more insightful, which is particular useful when measuring the strength or weakness of the price of a stock. In the end, it can be perceived as a momentum indicator for the stock market. |
publishDate |
2021 |
dc.date.none.fl_str_mv |
2021-12-02T00:00:00Z 2021-12-02 2021-11 2022-01-21T12:51:08Z |
dc.type.status.fl_str_mv |
info:eu-repo/semantics/publishedVersion |
dc.type.driver.fl_str_mv |
info:eu-repo/semantics/masterThesis |
format |
masterThesis |
status_str |
publishedVersion |
dc.identifier.uri.fl_str_mv |
http://hdl.handle.net/10071/24237 TID:202855074 |
url |
http://hdl.handle.net/10071/24237 |
identifier_str_mv |
TID:202855074 |
dc.language.iso.fl_str_mv |
eng |
language |
eng |
dc.rights.driver.fl_str_mv |
info:eu-repo/semantics/openAccess |
eu_rights_str_mv |
openAccess |
dc.format.none.fl_str_mv |
application/pdf |
dc.source.none.fl_str_mv |
reponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação instacron:RCAAP |
instname_str |
Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação |
instacron_str |
RCAAP |
institution |
RCAAP |
reponame_str |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
collection |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
repository.name.fl_str_mv |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação |
repository.mail.fl_str_mv |
|
_version_ |
1799134679619600384 |